html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  min-height: 100vh;
  flex-direction: column;
  background-color: #7f8caa;
}

#taskInputLabel {
  font-size: 18.5px;
  font-weight: 500;
  color: white;
  margin-right: 4.5px;
}

#h1 {
  color: white;
  margin-left: 5px;
  font-size: 25px;
}

main {
  margin: 0 8.5px;
  flex: 1;
}

.task-container {
  margin: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#addTaskBtn {
  padding: 5px 7px;
  font-size: 15px;
  margin-left: 10px;
  cursor: pointer;
  background-color: green;
  border-radius: 5px;
  color: #fff;
  margin-right: 10px;
}

#addTaskBtn:hover {
  background-color: darkgreen;
}

#dateBtn {
  margin-right: 6px;
  margin-left: 0px;
  border-radius: 4px;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  background-color: white;
  border: 1px solid rgb(94, 88, 88);
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

button.remove-btn {
  background-color: red;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
}

button.remove-btn:hover {
  background-color: darkred;
}

#clearAllBtn {
  display: none;
  margin: 15px auto 0 auto;
  padding: 5px 10px;
  background-color: #ff4444;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  width: fit-content;
}

#clearAllBtn:hover {
  background-color: #cc0000;
}

#deleteCompletedBtn {
  display: none;
  margin: 15px auto 0 auto;
  padding: 5px 10px;
  background-color: #5555ff;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  width: fit-content;
}

#deleteCompletedBtn {
  background-color: #3333cc;
}

.editBtn {
  background-color: grey;
  color: white;
  border-radius: 5px;
  width: fit-content;
  padding: 4px 3px;
}

.editBtn:hover {
  background-color: #3498db;
}

.taskSpan {
  width: 350px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskInput {
  width: 290px;
  border-radius: 3px;
}

#searchInput {
  display: none;
}

.span {
  width: 100%;
}
.pAndB {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#taskStat {
  text-align: center;
  color: white;
  margin-top: 15px;
  font-weight: bold;
}

#pendingBtn {
  color: white;
  padding: 5px 10px;
  margin-right: 5px;
  border-radius: 5px;
  background-color: orange;
  display: none;
  position: absolute;
}

#taskDate {
  font-size: 12px;
  color: gray;
  margin-left: 1.1px;
  margin-right: 7px;
  display: none;
  padding: 2px 1px;
}

.taskTextContainer {
  border-radius: 5px;
}

.doneEmoji {
  position: absolute;
  font-size: 1rem;
  left: 20px;
  /* top: 50%;
  transform: translateY(); */
}

.taskLineContainer {
  display: flex;
  align-items: center;
  position: relative;
}

.completed {
  color: rgb(49, 155, 49);
}

.dragging {
  background-color: #3498db;
}

#taskInput {
  border-radius: 5px;
  padding: 10px;
  width: 200px;
  font-size: 16px;
  margin-right: 5px;
  padding: 5px 5px;
}

#footer {
  background-color: black;
  color: white;
  text-align: center;
  padding: 5px;
  font-size: 14px;
  margin-top: 40px;
  border-top: 2px solid #90b3ba;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

#navbar {
  border-bottom: 2px solid #90b3ba;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: #333446;
  color: white;
  padding: 3px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1000;
}

#searchIconBtn {
  margin-right: 5px;
  border-radius: 4px;
  border: 2px solid #90b3ba;
}

#right {
  display: flex;
}

#themeBtn {
  background-color: #d8c4b6;
  margin-right: 4px;
  border-radius: 4px;
  border: 1px solid #000000;
  font-weight: 400;
  max-width: fit-content;
}

@media (max-width: 500px) {
  .task-container {
    flex-direction: column;
    gap: 10px;
  }

  .taskLineContainer {
    gap: 5px;
  }

  .taskTextContainer {
    width: 300px;
    align-items: center;
    text-align: center;
  }

  .btnContainer {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #themeBtn {
    align-self: flex-end;
  }

  .btnContainer button {
    width: 100%; /* Let button fit content instead of 100% */
    align-self: flex-end; /* Optional: align buttons to right */
  }
  #right {
    flex-direction: column;
    gap: 5px;
  }
}
