* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #3C4249;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
}

h1 {
  margin: 10px;
}

.todo_list {
  margin: 0 auto;
  padding: 10px 15px;
  width: 100%;
  max-width: 1000px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #3C4249;
}

.todo_header {
  background: #3C4249;
  border-bottom: 1px solid #343A3F;
}

.header_logo {
  width: 60px;
  height: 40px;
  margin-left: 20px;
}

.header_inner {
  display: flex;
  justify-content: space-between;
  align-items: center;

}

.todo_title {
  font-size: 2rem;
  text-align: center;
  color: #ffffff;
}

.create_new_todo {
  position: relative;
  display: flex;
  flex-direction: row;
  margin: 20px;
}

.create_new_todo label {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.todo_text {
  padding: 1px 45px 1px 20px;
  height: 40px;
  outline: none;
  border: 1px solid #2D333A;
  border-radius: 30px;
  background: #343A3F;
  color: #ffffff;
  font-weight: 400;
  font-size: 1rem;
}

.todo_text:focus {
  border: 1px solid #77475C;
}

.todo_text::placeholder {
  color: #969ba8;
}

.todo_btn {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border: 1px solid #343A3F;
  border-radius: 50%;
  background: #BA5478;
  line-height: 0.5;
  color: #343A3F;
  text-align: center;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.todo_btn span {
  font-size: 1.7rem;
}

.todo_btn:hover {
  background: #9b4765;
  color: #dcdcdc;
}

.todo_content {
  overflow-y: auto;
  height: 100%;
  padding: 0 25px;
}

.todo_item {
  justify-content: space-between;
  padding: 5px 0;
}

.todo {
  display: none;
  margin: 0;
  padding: 10px;
  color: white;
}

.todo.todo_active {
  display: block;
}

.todo li {
  display: flex;
  align-items: center;
  list-style-type: none;
  color: #F4F7FF;
  text-transform: none;
}

.todo li:not(:last-child) {
  border-bottom: 1px dashed #4D535A;
}

.completed {
  display: none;
  margin: 0;
  padding: 10px;
}

.completed.completed_active {
  display: block;
  border-top: none;
}

.completed.completed_active_border {
  border-top: 1px solid #343A3F;
}

.completed li {
  display: flex;
  align-items: center;
  list-style-type: none;
  color: #969ba8;
}

.completed li:not(:last-child) {
  border-bottom: 1px dashed #4D535A;
}

input[type=checkbox], label {
  margin: 5px;
  padding: 10px 0;
  cursor: pointer;
  word-wrap: break-word;
}

.todo_label {
  max-width: 90%;
  padding: 0;
}

input[type=text], label {
  margin: 0;
  width: 100%;
}

.btn_delete {
  padding: 10px;
  cursor: pointer;
}

span.btn_delete.material-icons,
span.btn_edit.material-icons {
  font-size: 1.3rem;
}

.btn_delete:hover {
  color: #BA5478;
}

.btn_edit {
  padding: 10px;
  cursor: pointer;
}

.btn_edit:hover {
  color: #BA5478;
}

input[type="checkbox"]:checked,
input[type="checkbox"]:not(:checked) {
  position: absolute;
  left: -9999px;
}

input[type="checkbox"]:checked + label,
input[type="checkbox"]:not(:checked) + label {
  display: inline-block;
  position: relative;
  padding-left: 35px;
}

input[type="checkbox"]:checked + label:before,
input[type="checkbox"]:not(:checked) + label:before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(50% - 10px);
  width: 17px;
  height: 17px;
  border: 1px solid #2D333A;
  background-color: #343A3F;
  border-radius: 40%;
}

input[type="checkbox"]:checked + label:after,
input[type="checkbox"]:not(:checked) + label:after {
  content: "";
  position: absolute;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  left: 4px;
  top: calc(50% - 5px);
  width: 8px;
  height: 4px;
  border-radius: 1px;
  border-left: 3px solid #BA5478;
  border-bottom: 3px solid #BA5478;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

input[type="checkbox"]:not(:checked) + label:after {
  opacity: 0;
}

input[type="checkbox"]:checked + label:after {
  opacity: 1;
}

.todo_footer {
  padding-top: 15px;
  padding-bottom: 15px;
}

.controls_list {
  display: flex;
  justify-content: space-evenly;
  align-items: end;
  list-style-type: none;
  width: 50%;
  padding: 0;
  margin: 0;
}

.controls_list li {
  width: 33.3333%;
  text-align: center;
  cursor: pointer;
}

.controls_item {
  color: #969ba8;
  font-size: 1rem;
  line-height: 3;
}

.controls_item.controls_item_active {
  font-weight: 700;
  color: #ffffff;
}

.controls_item_active:after {
  position: relative;
  content: "";
  display: block;
  margin: 0 auto;
  height: 4px;
  width: 100px;
  background-color: #BA5478;
  transition: width 0.4s ease-out;
}

::-webkit-scrollbar-button {
  background-repeat: no-repeat;
  width: 6px;
  height: 0;
}

::-webkit-scrollbar-track {
  background-color: #484F58;
  box-shadow: 0 0 3px #2D333C inset;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  -webkit-border-radius: 5px;
  border-radius: 5px;
  background-color: #2D333C;
  background-image: url('img/scrollbar.png');
  background-position: center;
  background-repeat: no-repeat;
}

::-webkit-resizer {
  background-repeat: no-repeat;
  width: 7px;
  height: 0;
}

::-webkit-scrollbar {
  width: 7px;
}

/* === Confirm Modal === */

.overlay {
  display: none;
  position: fixed;
  overflow: auto;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: rgba(40, 46, 58, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.overlay.overlay_active {
  display: block;
}

.confirm_modal {
  position: fixed;
  z-index: 11;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all ease 0.3s;
  width: 90vw;
  max-width: 450px;
  min-height: 150px;
  padding: 20px;
  margin: 10px auto;
  border-radius: 10px;
  background: #2e3438;
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 1.5;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.confirm_modal.confirm_modal_active {
  display: flex;
  opacity: 1;
}

.confirm_modal h4 {
  margin-top: 10px;
  margin-bottom: 35px;
}

.confirm_buttons {
  width: 80%;
  display: flex;
  justify-content: space-around;
}

.confirm_btn {
  display: flex;
  align-items: center;
  padding: 3px;
  border: none;
  background: none;
  color: rgba(230, 92, 139, 0.6);
}

.confirm_btn span {
  font-size: 2rem;
}

.confirm_btn:hover {
  color: #BA5478;
  cursor: pointer;
}

.edit_modal {
  position: fixed;
  z-index: 11;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  opacity: 0;
  transition: all ease 0.3s;
  width: 90vw;
  max-width: 450px;
  min-height: 150px;
  padding: 5px;
  margin: 0 auto;
  border-radius: 10px;
  background: #2e3438;
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 1.5;
}

.edit_modal.edit_modal_active {
  display: flex;
  opacity: 1;
}

.edit_modal h4 {
  margin: 10px;
}

.edit_modal .confirm_buttons {
  margin: 5px;
}

textarea {
  font-family: 'Manrope', sans-serif;
}

#edit {
  resize: none;
  border: 1px solid #3b4348;
  border-radius: 10px;
  padding: 10px;
  background: #2e3438;
  color: white;
  width: 80vw;
  max-width: 400px;
  font-size: 1rem;
}

#edit:focus {
  outline: none;
}

.edit_btn {
  display: flex;
  align-items: center;
  padding: 3px;
  border: none;
  background: none;
  color: rgba(230, 92, 139, 0.6);
}

.edit_btn span {
  font-size: 2rem;
}

.edit_btn:hover {
  color: #BA5478;
  cursor: pointer;
}

@media screen and (max-width: 850px) {

  .controls_list {
    width: 100%;
  }

  .todo_list {
    padding: 5px;
  }

  .header_logo {
    display: none;
  }

  .todo_content {
    padding: 5px;
  }

  .todo_label {
    max-width: 80%;
  }

  .todo_active {
    padding-top: 0;
  }

  .todo_footer {
    padding: 5px;
  }

  .controls_item {
    font-size: 1.1rem;
  }

  .controls_item.controls_item_active {
    color: #ffffff;
  }

  .create_new_todo {
    margin: 15px 10px;
  }
}

@media screen and (max-width: 600px) {
  .todo_content {
    padding: 0;
  }
}

@media screen and (max-width: 425px) {
  .todo_label {
    max-width: 75%;
  }

  .controls_item {
    font-size: 1rem;
  }
}

@media screen and (max-width: 320px) {
  .todo_label {
    font-size: 1rem;
  }

  .controls_item {
    font-size: 0.8rem;
  }
}