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

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  height: 100vh;
  background-color: #2b2f37;
}

/*Main container*/

header > h1 {
  text-align: center;
  color: ghostwhite;
}

.main-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Input field */

.task-input-container {
  padding: 10px;
}

.input {
  font-size: 1rem;
  padding: 10px 5px;
  border-radius: 10px;
  margin: 5px;
}

.add-task-btn {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  background-color: #11a461;
  color: ghostwhite;
  font-weight: 700;
  transition: 150ms ease-in-out;
}

.add-task-btn:hover {
  background-color: #008949;
}

/* Sort Items Styling */

.sort-container {
  background-color: #25292f;
  border: none;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.sort-btn {
  padding: 5px 15px;
  font-size: 0.9rem;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  background-color: #11a461;
  color: ghostwhite;
  transition: 150ms ease-in-out;
}

.sort-btn:hover {
  background-color: #008949;
}

.sort-btn:focus {
  background-color: #3bea9b;
  color: black;
}

/*Tasks Styles*/

.tasks-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tasks-list {
  list-style: none;
  padding: 20px;
  border-radius: 1rem;
  background-color: #25292f;
  text-align: left;
  margin: 10px 0;
  width: 60%;
}

.tasks-list > li {
  padding: 10px 20px;
  background-color: #2b2f37;
  margin-bottom: 10px;
}

.tasks-list > li:hover {
  cursor: pointer;
}

.action-btn {
  padding: 10px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 5px;
}

.edit-btn {
  background-color: #11a461;
  border: none;
  border-radius: 5px;
  color: white;
}

.del-btn {
  background-color: orangered;
  border: none;
  border-radius: 5px;
  color: white;
}

@media (max-width: 800) {
  li {
    overflow: auto;
  }
}

.action-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/*Mobile Layout*/
@media (max-width: 580px) {
  .task-input-container {
    display: flex;
    flex-direction: column;
  }

  .sort-container {
    display: flex;
    flex-direction: column;
  }

  .action-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tasks-list {
    width: 85%;
  }
}

.task-name {
  font-size: 1rem;
}

.label-name {
  font-size: 0.7rem;
  font-weight: 600;
}

li > .task-info {
  pointer-events: none;
  display: inline;
}

/* Edit mode */
.edit-controls {
  display: flex;
}

.edit-field {
  padding: 5px;
  border-radius: 5px;
}

.save-task-btn {
  background-color: #11a461;
  color: ghostwhite;
  border: none;
  border-radius: 5px;
}

.cancel-btn {
  background-color: gray;
  color: ghostwhite;
  border: none;
  border-radius: 5px;
}

@media (max-width: 1100px) {
  .edit-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: centert;
  }
}
