* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
}

html {
  height: 100%;
}

body {
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  background-color: #fafafa;
  flex-direction: column;
  overflow: hidden;
}

li {
  list-style: none;
}

.todoList-container {
  width: 100%;
  padding: 10px;
  background-color: #fafafa;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.todoList {
  margin: 100px auto 40px;
  background: #fff;
  max-width: 600px;
  width: 100%;
  /* width: 600px; */
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgb(224, 224, 224);
  padding: 20px;
}

.todoList h1 {
  font-size: 1.5rem;
  color: #1a1a1a;
  padding: 30px 30px 15px 30px;
}

.row {
  background-color: rgb(247, 247, 247);
  margin: 0px 30px 30px 30px;
  border-radius: 30px;
  display: flex;
  border: 1px solid transparent;
  box-shadow: 5px 5px 10px rgb(227, 227, 227, 0.8);
}

.row:focus-within {
  box-shadow: 0px 0px 0px 1px rgb(127, 255, 0, 0.5);
  border: 1px solid #7fff00;
}

.task-input {
  background-color: rgb(247, 247, 247);
  border-radius: 30px;
  height: 50px;
  padding: 20px;
  outline: none;
  border: none;
  flex: 1;
  font-size: 1rem;
}

.task-input::placeholder {
  font-size: 1rem;
}

.row button {
  justify-content: end;
  width: 80px;
  border-radius: 30px;
  outline: none;
  border: none;
  background-color: #7fff00;
  font-size: 1rem;
  cursor: pointer;
  color: black;
}

.row button:hover {
  background-color: #6fe000;
}

.tasks {
  margin: 0px 30px 30px 30px;
  max-height: 300px;
  overflow-y: auto;
}
.tasks::-webkit-scrollbar {
  width: 8px;
}
/* .tasks::-webkit-scrollbar-track {
  background: #f1f1f1;  cor do trilho do scrollbar
  border-radius: 10px;
} */

.tasks::-webkit-scrollbar-thumb {
  background: #2a4e06;
  border-radius: 10px;
  min-height: 40px; /* evita o thumb ficar pequenininho */
}

.tasks::-webkit-scrollbar-thumb:hover {
  background: rgba(42, 78, 6, 0.5);
}

.tasks li {
  padding: 15px 10px 15px 50px;
  position: relative;
  margin: 10px 0px;
  background-color: rgb(247, 247, 247, 0.2);
  box-shadow: 5px 5px 10px rgb(237, 237, 237, 0.5);
  border: 1px solid rgb(247, 247, 247);
  border-radius: 10px;
  color: #1a1a1a;
  font-size: 1rem;
  user-select: none;
  margin-right: 20px;
}

.tasks li:hover {
  background: rgb(247, 247, 247);
  box-shadow: 5px 5px 10px rgb(237, 237, 237);
  cursor: pointer;
}

.tasks li::before {
  content: "";
  width: 25px;
  height: 25px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 5px;
  background-image: url(./imgs/Uncomplete.png);
  background-size: cover;
}

.tasks li .task-text {
  display: inline-block;
  max-width: 40ch;
  word-break: break-word;
}

.delete-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  width: 25px;
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: darkgray;
  border-radius: 50%;
}

.delete-btn:hover {
  color: rgb(220, 20, 60);
  background-color: rgb(255, 170, 170);
  cursor: pointer;
}

.completed .task-text {
  text-decoration: line-through;
}
li.completed::before {
  background-image: url(./imgs/Complete.png);
  width: 25px;
  height: 25px;
}

footer {
  height: 60px;
  padding: 15px;
  text-align: center;
  font-size: 1.3rem;
  color: #000;
}
footer a {
  text-decoration: none;
  color: #0051ff;
  position: relative;
  transition: color 0.5s ease;
}

footer a:hover {
  color: #0041cc;
}

footer a::after {
  content: "";
  position: absolute;
  width: 0%;
  left: 0;
  bottom: -4px;
  background: #0051ff;
  height: 2px;
  transition: width 0.5s ease;
}
footer a:hover::after {
  width: 100%;
  background: #0041cc;
}

.toastcontainer {
  position: fixed;
  right: 16px;
  top: 16px;
}

.toast-message {
  background-color: #fff;
  border-radius: 10px;
  max-width: 220px;
  padding: 12px 16px;
  line-height: 1.4;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateX(16px);
  transition:
    opacity 0.25s,
    transform 0.25s;
}

.toast-message.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-message.hide {
  opacity: 0;
  transform: translateX(16px);
}

.toast-message.first {
  border: 2px solid #64c900;
}

.toast-message.notText {
  border: 2px solid rgb(220, 20, 60);
}

@media (max-width: 600px) {
  .todoList {
    margin: 50px auto 20px;
    max-width: 90%;
  }
  .todoList h1 {
    font-size: 1.25rem;
    padding: 15px 15px 10px 15px;
  }
  .todoList-container {
    padding: 0px;
  }
  .row {
    margin: 0px 0px 15px 0px;
  }
  .tasks {
    max-height: 350px;
    margin: 0px;
  }
  .tasks li .task-text {
    max-width: 35ch;
  }
}

@media (max-width: 500px) {
  .tasks {
    max-height: 350px;
    margin: 0px;
  }

  .tasks li .task-text {
    max-width: 25ch;
  }
  .todoList {
    margin: 25px auto 20px;
  }

  .todoList h1 {
    font-size: 1.25rem;
    padding: 15px 15px 10px 15px;
  }

  .row {
    margin: 0px 0px 15px 0px;
  }
  .toastcontainer {
    position: fixed;
    left: 8px;
    top: 8px;
  }
  button {
    z-index: 1000;
  }
  .toast-message.first {
    display: none;
  }
}

@media (max-width: 400px) {
  .tasks li .task-text {
    max-width: 20ch;
  }
  .toastcontainer {
    position: fixed;
    left: 8px;
    top: 8px;
  }
}
