/* Google Fonts - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body {
  background-color: #bce1fb;
}

/* For Scrollbar */

/* width */
::-webkit-scrollbar {
  width: 6px;
}
/* Track */
::-webkit-scrollbar-track {
  background: #efeeee;
}
/* Handle */
::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #f4f3f3;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #f7f6f6;
}

.container {
  position: relative;
  max-width: 480px;
  width: 100%;
  border-radius: 8px;
  flex-direction: column;
  padding: 25px;
  margin: 40px auto 0;
  background-color: #fbfad4;
  box-shadow: 0 5px 10px rgba(14, 14, 14, 0.1);
}
.container .input-field {
  position: relative;
  height: 64px;
  width: 100%;
}
h1 {
  text-align: center;
  margin-bottom: 10px;
  color: rgb(252, 254, 255);
}

footer {
  text-align: center;
  margin-top: 20px;
  color: rgb(250, 251, 252);
}
/* Text Area Border Before Click*/
.input-field textarea {
  height: 100%;
  width: 100%;
  outline: none;
  font-size: 18px;
  font-weight: 400;
  border-radius: 8px;
  padding: 18px 45px 18px 15px;
  border: 1px solid #758df9;
  resize: none;
}
/* Text Area Border After Click */
.input-field textarea:focus {
  border-color: #fe709f;
}
textarea::-webkit-scrollbar {
  display: none;
}

/* Text Area Note Icon Before Click */ 
.input-field .note-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 24px;
  color: #64e90b;
}

/* Text Area Note Icon After Click */ 
.input-field textarea:focus ~ .note-icon {
  color: #4070f4;
}
.container .todoLists {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 10px;
}

/* list's Background */
.todoLists .list {
  display: flex;
  align-items: center;
  list-style: none;
  background-color: #e6f8fd;
  padding: 20px 15px;
  border-radius: 8px;
  margin-top: 10px;
  position: relative;
  cursor: pointer;
}
.todoLists .list input {
  height: 16px;
  min-width: 16px;
  accent-color: #4070f4;
  pointer-events: none;
}
.todoLists .list .task {
  margin: 0 30px 0 15px;
  word-break: break-all;
}
.list input:checked ~ .task {
  text-decoration: line-through;
}

/* Delete Icon */
.todoLists .list i {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #0e0e0e;
  padding: 5px;
  opacity: 0.6;
  display: none;
}
.todoLists .list:hover i {
  display: inline-flex;
}
.todoLists .list i:hover {
  opacity: 1;
}
.container .pending-tasks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 25px;
}

/* For You Have ... Pending Task: */
.pending-tasks span {
  color: #f49005;
}

/* Clear Button: */
.pending-tasks .clear-button {
  padding: 6px 12px;
  outline: none;
  border: none;
  background: #4070f4;
  color: #fff;
  font-size: 20px;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: none;
  white-space: nowrap;
}

/* Clear Button During Mouse Hover */
.clear-button:hover {
  background-color: #fd4343;
}
@media screen and (max-width: 350px) {
  .container {
    padding: 25px 10px;
  }
}

/* Dark mode */
body.dark {
  background: #737777; /* Dark mode background */
}
* Dark mode styling */
body {
  position: relative; /* Ensures that the positioning context is set for the page */
  min-height: 100vh; /* Make sure body takes up at least the height of the viewport */
  margin: 0; /* Remove default margin */
}

.toggle-button {
  position: fixed; /* Use fixed to keep it in view even on scroll */
  top: 10px;  /* Adjust this value to change the vertical position */
  right: 10px; /* Adjust this value to change the horizontal position */
  width: 50px;  /* Set the width of the button */
  height: 50px; /* Set the height of the button */
  background-color: #fff; /* Light mode background color */
  border-radius: 50%; /* Makes it circular */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Optional: Adds shadow for better visibility */
  transition: background-color 0.3s;
}

.toggle-button i {
  position: absolute;
  transition: opacity 0.3s;
}

.toggle-button .fa-moon {
  opacity: 1; /* Moon visible by default */
}

.toggle-button .fa-sun {
  opacity: 0; /* Sun hidden by default */
}

body.dark .toggle-button {
  background-color: #f8fc06; /* Dark mode background color */
}

body.dark .toggle-button .fa-moon {
  opacity: 0; /* Hide moon in dark mode */
}

body.dark .toggle-button .fa-sun {
  opacity: 1; /* Show sun in dark mode */
}
/* Light mode styles (default) */

footer {
  color: #060c16; /* Dark color for light mode */
}

body.dark footer {
  color: #10f3ba; /* Light color for dark mode */
}