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

body {
  width: 100%;
  min-height: 100vh;
  background: #ffcfb3;
  font-family: "Poppins", sans-serif;
  display: flex;
  align-items: start;
  justify-content: center;
}

input,
button {
  font-family: "Poppins", sans-serif;
}

/* to-do list card */
.todo__card {
  width: 90%;
  max-width: 450px;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  margin: 15px;
}

/* card title */
.todo__card h1 {
  display: flex;
  gap: 10px;
  font-size: 30px;
  margin-bottom: 15px;
}

/* add task container */
.todo__add {
  width: 100%;
  background-color: rgb(228, 228, 228);
  display: flex;
  border-radius: 50px;
  margin-bottom: 30px;
  position: relative;
}

/* task input */
.todo__add input {
  flex: 1;
  background-color: transparent;
  font-size: 15px;
  border: none;
  outline: none;
  padding: 20px;
}

/* add task button */
.todo__add button {
  background-color: #ff5945;
  color: white;
  border: none;
  border-radius: 50px;
  outline: none;
  font-size: 16px;
  padding: 16px 50px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.todo__add button:hover {
  background-color: rgb(223, 100, 87);
}

/* add task alert message */
.todo__add p {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: #8a5029;
  transition: opacity 0.5s ease, bottom 0.2s ease;
}
.hidden {
  opacity: 0;
  bottom: -15px;
  transition: opacity 0.5s ease, bottom 0.5s ease;
}
.visible {
  opacity: 1;
  bottom: -25px;
  transition: opacity 0.5s ease, bottom 0.2s ease;
}
.fade-out {
  opacity: 0;
  bottom: -20px;
  transition: opacity 0.5s ease, bottom 0.2s ease;
}

/* tasks list */
ul li {
  list-style: none;
  font-size: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 12px 50px;
  user-select: none;
  cursor: pointer;
  position: relative;
}

/* task check mark */
ul li::before {
  content: "";
  background-image: url(./icons/unchecked_icon.svg);
  background-size: cover;
  background-position: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  outline: none;
  position: absolute;
  top: 8px;
  left: 12px;
}

/* task checked check mark */
ul li.checked {
  color: #555;
  text-decoration: line-through;
}
ul li.checked::before {
  background-image: url(./icons/check_orange_icon.svg);
}

/* task cross ( x ) delete button */
ul li span {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #555;
  font-size: 22px;
  text-align: center;
  border-radius: 50%;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
ul li span:hover {
  background-color: #edeef0;
}

/* media queries */
@media (max-width: 450px) {
  /* to-do list card */
  .todo__card {
    min-width: 230px;
  }

  /* add task container */
  .todo__add {
    flex-direction: column;
    border-radius: 10px;
  }

  /* add task button */
  .todo__add button {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
  }
}
