/*---------- COLOR PALETTE 1 ----------*/
/*
    COLOR PALETTE
    #2D2B24 - n/a
    #29313D - Gunmetal
    #D9CFB6 -  Bone - rgb(217, 207, 182)
    #B9B19D - Khaki Web
    #B49275 - Camel
*/

/*---------- COLOR PALETTE 2 ----------*/
/*
    COLOR PALETTE
    #242038 - Dark-purple
    #9067C6 - Amethyst
    #8D86C5 - Tropical Indigo
    #F7ECE1 - Linen
    #CAC4CE - French Gray
*/

/*---------- CSS Variables  ----------*/
:root {
  --primaryDark: #242038;
  --secondaryDark: #dddbee;
  --TertiaryDark: #9067c6;
  --primaryLight: #f7ece1;
  --secondaryLight: #cac4ce;
  --hover: #8d86c5;
}

/*---------- Global styles ----------*/

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

html,
body {
  font-size: 16px;
  font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
  color: var(--primaryDark);
  width: 100%;
  min-height: 100%;
}

@media screen and (min-width: 768px) {
  html,
  body {
    font-size: 22px;
  }
}

body {
  padding: 15px;
  background-color: var(--primaryDark);
}

.wrapContainer {
  width: 90%;
  max-width: 700px;
  margin: auto;
  padding: 0.75rem;
  background-color: var(--secondaryDark);
  border-radius: 10px;
  min-height: 95vh;
}

.visually-hidden {
  position: absolute;
  left: -10000px;
}

/*---------- statsContainer ----------*/
#statsContainer {
  width: 99%;
  margin: 0 auto 1rem;
  padding: 1rem;
  position: relative;
  display: flex;
  justify-content: space-between;
  border-radius: 10px;
  border: 2px solid var(--primaryDark);
}

.details {
  width: 100%;
}
.statNumbers {
  float: right;
}

#numbers {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 4.5rem;
  height: 4.5rem;
  background-color: var(--primaryDark);
  color: var(--primaryLight);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
}

#progressBar {
  width: 100%;
  height: 10px;
  background-color: var(--primaryLight);
  border-radius: 5px;
  margin-top: 1rem;
}

#progress {
  width: 80%;
  height: 10px;
  background-color: var(--primaryDark);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/*---------- form styles ----------*/

#newEntryContainer {
  margin: 0 auto 1rem;
  width: 99%;
}

form {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}

#itemEntryForm input {
  outline: none;
  border: none;
  width: 0;
  flex: 1;
  padding: 1rem;
  background: var(--primaryLight);
  border: 2px solid var(--primaryDark);
  border-radius: 10px;
  font-size: 1.2rem;
  color: var(--primaryDark);
}

#itemEntryForm input:focus,
#itemEntryForm input:hover {
  box-shadow: 4px 2px 5px var(--primaryDark);
}

#itemEntryForm button {
  outline: none;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  background-color: var(--primaryDark);
  color: var(--primaryLight);
  font-size: 2rem;
  font-weight: bold;
}

#itemEntryForm button:hover,
#itemEntryForm button:focus {
  box-shadow: 4px 2px 5px var(--hover);
}

#itemEntryForm button:active {
  transform: scale(1.1);
  opacity: 0.8;
}

/*---------- Controls Container ----------*/

.controlsContainer {
  width: 99%;
  margin: 0 auto 1rem;
  padding-bottom: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--primaryDark);
}

.filters .filterButton {
  margin: 0;
  all: unset;
  cursor: pointer;
  font-size: 17px;
  color: var(--TertiaryDark);
}

.filters .filterButton:first-child {
  margin-right: 0.2rem;
}

.filters .filterButton.active {
  color: var(--primaryDark);
  font-weight: bold;
}

.controlsContainer #clearTasksButton {
  outline: none;
  border: none;
  color: var(--primaryLight);
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primaryDark);
}

.controlsContainer #clearTasksButton:hover,
.controlsContainer #clearTasksButton:focus {
  box-shadow: 4px 2px 5px var(--hover);
}

.controlsContainer #clearTasksButton:active {
  transform: scale(1.1);
  opacity: 0.8;
}
/*---------- taskList ----------*/

#taskList {
  width: 99%;
  margin: auto;
}

.task {
  display: flex;
  align-items: center;
  border-radius: 10px;
  margin-bottom: 0.77rem;
  padding: 0.4rem 0.5rem 0.4rem 0.5rem;
  background-color: var(--secondaryLight);
  border: 2px solid var(--primaryDark);
}
.focusEdit {
  box-shadow: -4px 1px 8px var(--primaryDark);
}

.task.over {
  color: var(--primaryLight);
  background-color: var(--primaryDark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(1.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
/*---------- actions ----------*/
.actions {
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.actions .fa-bars {
  margin-right: 0.5rem;
}

.actions .fa-bars:hover {
  transform: scale(1.3);
}

.actions input[type="checkbox"] {
  appearance: none; /* Removes default styling */
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  border-radius: 50%; /* Makes it perfectly circular */
  border: 2px solid #333;
  /* background-color:  var(--secondaryDark); */
  background-color: #fff;
  position: relative;
}

.actions input[type="checkbox"]:focus,
.actions input[type="checkbox"]:hover {
  box-shadow: -4px 1px 8px var(--primaryLight);
}

.actions input[type="checkbox"]:checked {
  border: 2px solid #333;
  background-color: var(--primaryDark);
}

/*---------- content ----------*/

#taskList .task .content {
  flex: 1 1 0%;
}

.content input[type="text"] {
  appearance: none;
  border: none;
  outline: none;
  background: none;
  width: 100%;
  margin: 0;
  font-size: 1rem;
  color: var(--primaryDark);
}
.content input[type="text"]:not(:read-only) {
  color: red;
}
.content input[type="text"].checked {
  text-decoration: line-through;
  opacity: 0.6;
}
.content input[type="text"].over {
  color: var(--primaryLight);
}

/*---------- Settings Menu ----------*/

.settings {
  cursor: pointer;
  position: relative;
}

.fa-ellipsis:hover {
  transform: scale(1.3);
}

.settings .task-menu {
  position: absolute;
  z-index: 2;
  right: 0rem;
  bottom: -3.2rem;
  transform: scale(0);
  border-radius: 0.5rem;
  background-color: var(--secondaryLight);
  transform-origin: top right;
  transition: transform 0.2s ease;
  border: 2px solid var(--primaryDark);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

/* .settings:hover .task-menu {
  transform: scale(1);
} */

.settings .task-menu.show {
  transform: scale(1);
}

li {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-menu li {
  height: 1rem;
  padding: 1rem 0.5rem 1rem;
  margin-bottom: 2px;
  justify-content: flex-start;
}

.task-menu li:last-child {
  margin-bottom: 0;
}

.task-menu li:hover {
  background-color: var(--primaryLight);
  border-radius: 0.5rem;
}
.task-menu li i {
  padding-right: 1rem;
}
