/* =====================================
   GLOBAL SETTINGS VARIABLES
===================================== */

:root {
  --page-bg: #f4f5f9;
  --card-bg: white;
  --text-color: #222;
  --muted-color: #777;
  --border-color: #eee;
  --input-bg: white;
  --input-text: #222;
  --text-scale: 1;
  --font-family: Arial, sans-serif;
  --animation-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  padding: 0px;
  background: var(--page-bg);
  color: var(--text-color);
  font-size: calc(16px * var(--text-scale));
  transition:
    background-color var(--animation-speed),
    color var(--animation-speed);
  overflow-x: hidden;
}

/* MENU BUTTON */

.menu {
  cursor: pointer;
  position: fixed;
  z-index: 1000;
  background: transparent;
  padding: 8px;
}

.menu span {
  display: block;
  width: 25px;
  height: 3px;
  background: black;
  margin: 5px;
  transition: 0.3s;
}

textarea{
  resize: vertical;
}

textarea.vertical-only { resize: vertical; }

.menu.xmark span:first-child {
  transform: translateY(8px) rotate(45deg); 
  background-color: white;
}

.menu.xmark span:nth-child(2) {
  opacity: 0;
}

.menu.xmark span:last-child {
  transform: translateY(-8px) rotate(-45deg);
  background-color: white;
}



/* SIDE MENU */

.side-menu {
  position: fixed;
  top: 0;
  left: -85%;
  bottom: 0;
  width: 75%;
  height: 100vh;
  background-color: hwb(248 2% 64%);
  z-index: 999;
  padding: 30px 20px;
  transition: left 0.5s ease-in-out;
}

.side-menu.active {
  left: 0;
}

/* MENU LIST */

.menu-list {
  list-style: none;
  margin-top: 50px;
  padding: 15px;
}

.menu-list ul li {
  padding: 10px 5px;
  list-style-type: none;
  transition: 0.2s ease-in-out;
}

.menu-list ul li i {
  padding: 5px;
  color: white;
}

.menu-list ul li a {
  color: white;
  text-decoration: none;
}

.menu-list ul li:hover {
  border-left: 1px solid yellow;
  padding-left: 18px;
}

.menu-list ul li a:hover {
  color: hwb(56 0% 4%);
}

.menu-list #logout{
  background-color: hwb(20 0% 0%);
  transition: 0.3s ease-in-out;
}

.menu-list #logout:hover{
  background-color: hwb(0 0% 0%);
  transform: scale(0.93);
}

/* HEADER */

header {
  padding: 15px;
  text-align: center;
  margin-bottom: 15px;
}

header h2,
header h1 {
  margin-bottom: 5px;
}

header p {
  margin-top: 5px;
  color: var(--muted-color);
}

/* MAIN */

main {
  margin: 5px 15px;
  padding: 15px;
  max-width: 600px;
  margin: auto;
}

/* SECTIONS */

section {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 10px;
  margin-bottom: 25px;
}

section h2 {
  margin-bottom: 10px;
}

/* FORM */

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-size: calc(14px * var(--text-scale));
  font-weight: bold;
}

input,
textarea,
select {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: none;
  background: var(--input-bg);
  color: var(--input-text);
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #7257e8;
}

/* BUTTONS */

button {
  padding: 12px;
  background: #7257e8;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
  transition: 0.3s ease-in-out;
}

button:hover{
  transform: scale(0.94);
}

.task-item .editbtn {
  background-color: hwb(175 0% 18%);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);;
}

.task-item .danger-btn {
  background-color: hwb(0 0% 9%);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);;
}

/* TASK ITEMS */

.task-item {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
}

.task-item>div:not(.task-actions) {
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.task-item div small {
  padding: 5px;
  background-color: hwb(0 84% 16% / 0.26666666666666666);
  border-radius: 2px;
  font-weight: 500;
  text-transform: lowercase;
}

.task-item div small::first-letter {
  text-transform: uppercase;
}

.task-item h3 {
  margin-bottom: 8px;
}

.subtitle {
  color: darkblue;
  text-transform: uppercase;
  font-size: calc(13px * var(--text-scale));
  padding-top: 5px;
  padding-bottom: 2px;
}

.task-item p {
  color: var(--muted-color);
  font-size: calc(13px * var(--text-scale));
  margin-top: 5px;
}

/* DESCRIPTION */

#description {
  text-align: left;
  height: 200px;
  padding: 8px;
}

/* =====================================
   SETTINGS PAGE
===================================== */

.settings-main {
  width: 100%;
  max-width: 750px;
  margin: 15px auto;
  padding: 15px;
}

/* SETTINGS SECTIONS */

.settings-main .settings-section {
  background: var(--card-bg);
  padding: 22px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.settings-main .section-heading {
  margin-bottom: 18px;
}

.settings-main .section-heading h3 {
  font-size: calc(18px * var(--text-scale));
  color: var(--text-color);
  margin-bottom: 6px;
}

.settings-main .section-heading p {
  font-size: calc(12px * var(--text-scale));
  color: var(--muted-color);
  line-height: 1.5;
}

/* SETTING CARDS */

.settings-main .setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
  border-radius: 0;
  background: transparent;
}

.settings-main .setting-card:last-child {
  border-bottom: none;
}

.settings-main .setting-info {
  flex: 1;
  min-width: 0;
}

.settings-main .setting-info h4 {
  font-size: calc(14px * var(--text-scale));
  color: var(--text-color);
  margin-bottom: 5px;
}

.settings-main .setting-info p {
  font-size: calc(11px * var(--text-scale));
  color: var(--muted-color);
  line-height: 1.5;
}

/* SELECT INPUTS */

.settings-main select {
  width: auto;
  min-width: 120px;
  max-width: 150px;
  padding: 9px 10px;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: calc(12px * var(--text-scale));
  cursor: pointer;
}

/* COLOR INPUT */

.settings-main input[type="color"] {
  width: 42px;
  height: 35px;
  padding: 3px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-bg);
  cursor: pointer;
}

/* TOGGLE SWITCH */

.settings-main .switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  flex-shrink: 0;
}

.settings-main .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-main .slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--animation-speed);
}

.settings-main .slider::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--animation-speed);
}

.settings-main .switch input:checked+.slider {
  background: #7257e8;
}

.settings-main .switch input:checked+.slider::before {
  transform: translateX(19px);
}

/* ACTION BUTTONS */

.settings-main .action-btn,
.settings-main .danger-btn {
  width: auto;
  padding: 9px 12px;
  margin-top: 0;
  font-size: calc(11px * var(--text-scale));
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.settings-main .action-btn {
  background: #eeeaff;
  color: #7257e8;
}

.settings-main .action-btn:hover {
  background: #dfd9ff;
}

.settings-main .danger-btn {
  background: #ffe9eb;
  color: #e53950;
}

.settings-main .danger-btn:hover {
  background: #ffd5d9;
}

/* SETTINGS FOOTER */

.settings-main .settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid var(--border-color);
}

.settings-main .save-btn,
.settings-main .reset-btn {
  width: auto;
  padding: 11px 18px;
  margin-top: 0;
  font-size: calc(12px * var(--text-scale));
  font-weight: bold;
}

.settings-main .save-btn {
  background: #7257e8;
  color: white;
}

.settings-main .reset-btn {
  background: #e9e9ee;
  color: #444;
}

.settings-main .reset-btn:hover {
  background: #dcdce3;
}

/* =====================================
   RESPONSIVE DESIGN
===================================== */

@media (max-width: 480px) {

  .settings-main {
    padding: 8px;
  }

  .settings-main .settings-section {
    padding: 17px 12px;
  }

  .settings-main .setting-card {
    gap: 8px;
    padding: 14px 5px;
  }

  .settings-main .setting-info h4 {
    font-size: calc(13px * var(--text-scale));
  }

  .settings-main .setting-info p {
    font-size: calc(10px * var(--text-scale));
  }

  .settings-main select {
    min-width: 105px;
    max-width: 120px;
    padding: 8px 5px;
    font-size: calc(11px * var(--text-scale));
  }

  .settings-main .action-btn,
  .settings-main .danger-btn {
    padding: 8px;
    font-size: calc(10px * var(--text-scale));
  }

  .settings-main .settings-footer {
    gap: 7px;
  }

  .settings-main .save-btn,
  .settings-main .reset-btn {
    padding: 10px 13px;
    font-size: calc(11px * var(--text-scale));
  }
}

/* =====================================
   DARK THEME
===================================== */

body.dark-theme {
  --page-bg: #181818;
  --card-bg: #252525;
  --text-color: #f5f5f5;
  --muted-color: #bbb;
  --border-color: #444;
  --input-bg: #303030;
  --input-text: #fff;
}

body.dark-theme .task-item div small {
  background: #3a3a3a;
  color: #eee;
}

body.dark-theme .subtitle {
  color: #b8adff;
}

/* =====================================
   HIGH CONTRAST
===================================== */

body.high-contrast {
  --text-color: #000;
  --muted-color: #333;
  --border-color: #555;
}

body.dark-theme.high-contrast {
  --text-color: #fff;
  --muted-color: #fff;
  --border-color: #fff;
}

/* =====================================
   ANIMATIONS DISABLED
===================================== */

body.no-animations *,
body.no-animations *::before,
body.no-animations *::after {
  animation: none !important;
  transition: none !important;
}

/* =====================================
   USER TEXT COLOUR
===================================== */

body.custom-text-color {
  --text-color: var(--user-text-color);
}

.task-item .task-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 10px;
}

.task-actions button {
  flex: 1;
}

/* ABOUT PAGE */

.about-main {
  max-width: 900px;
  margin: 25px auto;
  padding: 0 15px;
}

.about-main section {
  margin-bottom: 35px;
}

.about-intro {
  padding: 25px 10;
}

.about-intro h1 {
  font-size: 2rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.about-main p,
.about-main li {
  line-height: 1.8;
  opacity: 0.85;
}

.about-section h2,
.about-closing h2 {
  margin-bottom: 15px;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.about-card {
  padding: 18px;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 10px;
}

.about-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.about-card p {
  margin: 0;
}

.about-section ul {
  padding-left: 22px;
}

.about-closing {
  padding: 25px;
  text-align: center;
  border-radius: 12px;
  background: rgba(128, 128, 128, 0.08);
}


/* =====================================
   TASK MANAGER
===================================== */

.search-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 100px;
  left: 0;
  padding: 5px;
  z-index: 99;
}


.search-wrapper {
  position: relative;
  width: 90%;
  display: flex;
  align-items: center;
}

.search-field #filter-category {
  position: absolute;
  top: 48px;
  right: 6%;
  width: 30%;
  height: 40px;
}

.search-field .input-of-filter {
  width: 100%;
  height: 40px;
  padding: 5px 35px 5px 10px;
  border-radius: 15px;
  border: none;
  font-size: 0.9rem;
}

#filter-input:focus {
  outline: 1px solid hwb(240 0% 10%);
}

#search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  pointer-events: none;
  cursor: pointer;
}



.listed-task-container {
  width: 100%;
  height: auto;
  position: relative;
  top: 100px;
}

/* =====================================
   TASK SCRIPT
===================================== */

.writing-box {
  display: none;
  transition: 0.5s ease-in-out;
}


.new-script {
  position: fixed;
  bottom: 50px;
  right: 10px;
  padding: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: hwb(24 0% 0%);
  font-size: 3rem;
  color: white;
  border: none;
  border-radius: 5px;
  border-top-right-radius: 10px;
  corner-top-right-shape: bevel;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 1px 3px,
    rgba(0, 0, 0, 0.24) 0px 1px 2px;
  transition: 0.2s ease-in-out;
  cursor: pointer;
}

.new-script:hover {
  background-color: hwb(108 0% 45%);
}

.new-script:active {
  transform: scale(0.9);
}

#file-icon {
  position: relative;
  font-weight: 400;
  z-index: 88;
}

#plus-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1.2rem;
  font-weight: 600;
  transform: translate(-50%, -50%);
  z-index: 99;
}


/* Script editor background */

.script-box-outer {
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  background-color: hwb(0 11% 0%);
  z-index: 99;
  overflow-y: scroll;
  overflow-x: hidden;
}


/* White editor container */

.scripting-box {
  position: relative;
  background: hwb(0 100% 0%);
  width: 100%;
  min-height: 90%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 10px 30px;
  overflow: visible;
}


/* Heading */

.script-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 5px 0px;
  padding: 30px 10px 10px 10px;
  border-bottom: 1px solid grey;
  z-index: 100;
  text-align: center;
  background-color: hwb(0 100% 0%);
}


/* Form */
#cancel-script {
  top: 0;
  right: 0;
  position: absolute;
  display: flex;
  justify-content: right;
  color: white;
}

#cancel-script i {
  padding: 4px 6px;
  background-color: red;
  border-radius: 2px;
}

#cancel-script i:hover {
  transform: scale(0.95);
  opacity: 0.8;
}

.script-body {
  width: 100%;
  max-width: 600px;
  padding: 10px;
}

.script-body form {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  border-radius: 5px;
  padding: 25px 15px;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 5px,
    rgba(0, 0, 0, 0.24) 0px 1px 5px;
}

.script-body .form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.script-body label {
  display: block;
  padding: 3px 0px;
  text-transform: uppercase;
}

.script-body #filter-input,
.script-body input,
.script-body textarea {
  width: 100%;
  box-sizing: border-box;
}

.script-body textarea {
  min-height: 180px;
  resize: vertical;
}

.upload-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.upload-section #save-script{
  background-color: hwb(173 0% 16%);
  text-shadow: 0px 0px 5px black;
  transition: 0.5s ease-in-out;
}

.upload-section #save-script:hover{
  transform: scale(0.95);
}

.upload-section p {
  margin: 0;
  text-align: center;
}

.task-for-script {
  padding: 5px;
  border-radius: 5px;
}

.task-for-script h3 {
  text-align: center;
  padding: 5px;
  color: hwb(235 0% 11%);
  text-shadow: 0px 0px 1px black;
}


.task-for-script b {
  text-transform: uppercase;
}

.task-script-container{
  width: 100%;
}

.task-script-container .tasks{
  width: 100%;
}

.task-card {
  background-color: hwb(212 93% 0% / 0.8196078431372549);
  margin: 8px 0px;
  border-radius: 6px;
}

.task-card.selected {
  background-color: hwb(164 0% 7%);
  border: 2px solid var(--amber);
  box-shadow: 0 0 8px rgba(51, 255, 82, 0.35294117647058826);
}

.script-task-selection{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.script-task-selection .confirm-task{
  color: red;
  text-shadow: 1px 1px 1px rgba(0,0,0, 0.01);
  font-weight: 700;
}


/* =====================================
   END
===================================== */