:root {
  --clr-primary: linear-gradient(to right, #0077b6, #0096c7, #00b4d8);
  --clr-light: #f4f4f4;
  --clr-dark: #333;
  --clr-warning: #023047;
}

*,
*::after,
*::before {
  font-family: inherit;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Work Sans", sans-serif;
  font-weight: 300;
  font-size: 1.5rem;
  background: var(--clr-primary);
  color: var(--clr-light);

  display: grid;
  grid:
    "header header header header" auto
    "...... lists  active ......" auto /
    1fr minmax(100px, 300px) minmax(250px, 500px) 1fr;
}

.title {
  grid-area: header;
  text-align: center;
  font-size: calc(5vw + 2rem);
  font-weight: 900;
  color: rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
  margin: -0.2em 0 0 0.5em;
}

.all-tasks {
  grid-area: lists;
}

.task-list {
  font-size: 1.2rem;
  line-height: 1.5;
  list-style: circle;
  padding-left: 1.1em;
}

.list-name {
  cursor: pointer;
}

.list-name:hover {
  opacity: 0.7;
}

form {
  display: flex;
}

.btn {
  cursor: pointer;
  background: 0;
  border: 0;
  padding: 0;
  color: inherit;
}

.btn.create {
  font-size: 1.5rem;
  font-weight: 900;
  margin-right: 0.25em;
  transition: opactity 250ms ease-in;
}

.btn.create:hover {
  opacity: 0.7;
}

.btn.delete {
  opacity: 0.7;
  font-size: 1rem;
  transition: color 200ms;
}
.btn.delete:hover {
  color: var(--clr-warning);
}

.new {
  background: transparent;
  border: 0;
  color: inherit;
  border-bottom: 1px solid currentColor;
  font-size: inherit;
  outline: none;
  padding: 0.25em;

  transition: border-bottom 150ms ease-in;
  order: 2;
}

.new:focus {
  border-bottom-width: 3px;
}

.new:focus::placeholder {
  opacity: 0.15;
}

.new::placeholder {
  color: inherit;
  opacity: 0.4;
}

.new.list {
  font-size: 1.1rem;
}

.new.task {
  margin-bottom: 0;
}

.active-list {
  font-weight: 700;
}

.todo-list {
  --spacer: 1.3rem;

  grid-area: active;
  background: var(--clr-light);
  color: var(--clr-dark);
}

.todo-header {
  padding: var(--spacer);
  background: var(--clr-warning);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-title {
  margin: 0 1rem 0 0;
  color: white;
}

.task-count {
  margin: 0;
  color: white;
}

.todo-body {
  padding: var(--spacer);
  position: relative;
}

.new-task-creator .create {
  color: var(--clr-primary);
}

[type="checkbox"] {
  opacity: 0;
  position: absolute;
}

.task label {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-bottom: 1.25em;
}

.task::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0.7em;
  height: 0.8px;
  background: currentColor;
  opacity: 0.1;
}

.task {
  position: relative;
  margin-bottom: 1em;
}

.custom-checkbox {
  --size: 0.75em;
  display: inline-block;
  width: var(--size);
  height: var(--size);
  margin-right: var(--size);
  cursor: pointer;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: scale(1);
  transition: transform 200ms ease-in-out;
}

.task:hover .custom-checkbox,
[type="checkbox"]:focus + label .custom-checkbox {
  transform: scale(1.2);
  color: var(--clr-primary);
}

[type="checkbox"]:checked + label .custom-checkbox {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  box-shadow: inset 0 0 0 3px white;
}

[type="checkbox"]:checked + label {
  opacity: 0.5;
}

.task label {
  color: var(--clr-warning);
}

.task label::after {
  content: "";
  position: absolute;
  left: 1.5em;
  top: 50%;
  right: 0;
  height: 3px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 150ms ease-in-out;
}

[type="checkbox"]:checked + label::after {
  transform: scaleX(1);
  transform-origin: left;
}

.delete-stuff {
  display: flex;
  justify-content: space-evenly;
  position: absolute;
  width: 100%;
  left: 0;
  bottom: -35px;
  color: var(--clr-light);
}

@media (max-width: 850px) {
  body {
    grid:
      " header header header header" auto
      " ...... lists  lists ......" auto
      " ...... active  active ....." auto /
      1fr minmax(30px, 200px) minmax(130px, 380px) 1fr;
  }

  .all-tasks {
    margin-bottom: 2em;
  }

  .delete-stuff {
    bottom: -60px;
    padding-bottom: 1em;
  }
}

@media (max-width: 650px) {
  body {
    grid:
      " header header header header" auto
      " ...... lists  lists ......" auto
      " ...... active  active ....." auto /
      1fr minmax(0px, 150px) minmax(80px, 330px) 1fr;
  }

  .all-tasks {
    margin-bottom: 2em;
  }

  .delete-stuff {
    bottom: -60px;
    padding-bottom: 1em;
  }

  .list-title {
    font-size: 1.3em;
  }

  .task-count {
    font-size: 1.3rem;
  }

  .task label {
    font-size: 1em;
  }
}
@media (max-width: 520px) {
  body {
    grid:
      " header header header header" auto
      " ...... lists  lists ......" auto
      " ...... active  active ....." auto /
      1fr minmax(0px, 130px) minmax(70px, 310px) 1fr;
  }

  .all-tasks {
    margin-bottom: 2em;
  }

  .delete-stuff {
    bottom: -60px;
    padding-bottom: 1em;
  }

  .list-title {
    font-size: 1.3em;
  }

  .task-count {
    font-size: 1.3rem;
  }

  .task label {
    font-size: 1em;
  }

  .new.task {
    font-size: 1.4rem;
  }
}
@media (max-width: 470px) {
  body {
    grid:
      " header header header header" auto
      " ...... lists  lists ......" auto
      " ...... active  active ....." auto /
      1fr minmax(0px, 100px) minmax(50px, 300px) 1fr;
  }
  .all-tasks {
    margin-bottom: 2em;
  }
  .delete-stuff {
    bottom: -60px;
    padding-bottom: 1em;
  }
  .list-title {
    font-size: 1.1em;
  }
  .task-count {
    font-size: 1.1rem;
  }
  .task label {
    font-size: 0.8em;
  }
  .new.task {
    font-size: 1.3rem;
  }
}

@media (max-width: 420px) {
  body {
    grid:
      " header header header header" auto
      " ...... lists  lists ......" auto
      " ...... active  active ....." auto /
      1fr minmax(0px, 80px) minmax(50px, 250px) 1fr;
  }
  .all-tasks {
    margin-bottom: 2em;
  }
  .delete-stuff {
    bottom: -60px;
    padding-bottom: 1em;
  }
  .list-title {
    font-size: 1em;
  }
  .task-count {
    font-size: 1rem;
  }
  .task label {
    font-size: 0.8em;
  }
  .new.task {
    font-size: 1.2rem;
  }
}
@media (max-width: 350px) {
  body {
    grid:
      " header header header header" auto
      " ...... lists  lists ......" auto
      " ...... active  active ....." auto /
      1fr minmax(0px, 50px) minmax(0px, 230px) 1fr;
  }
  .all-tasks {
    margin-bottom: 2em;
  }
  .delete-stuff {
    bottom: -60px;
    padding-bottom: 1em;
  }
  .list-title {
    font-size: 0.8em;
  }
  .task-count {
    font-size: 0.8rem;
  }
  .task label {
    font-size: 0.7em;
  }
  .new.task {
    font-size: 1rem;
  }
}
