:root {
  /* primary colours */
  --clr-primary-blue: hsl(220, 98%, 61%);
  --clr-primary-gradient: linear-gradient(90deg, hsl(192, 100%, 67%), hsl(280, 87%, 65%));

  /* light theme colours (lt = light theme) */
  --clr-lt-very-light-gray: hsl(0, 0%, 98%);
  --clr-lt-very-light-blue: hsl(236, 33%, 92%);
  --clr-lt-light-blue: hsl(233, 11%, 84%);
  --clr-lt-dark-blue: hsl(236, 9%, 61%);
  --clr-lt-very-dark-blue: hsl(235, 19%, 35%);

  /* dark theme colours (dt = dark theme) */
  --clr-dt-very-dark-blue: hsl(235, 21%, 11%);
  --clr-dt-dark-desaturated-blue: hsl(235, 24%, 19%);
  --clr-dt-light-grayblue: hsl(234, 39%, 85%);
  --clr-dt-light-grayblue-hover: hsl(236, 33%, 92%);
  --clr-dt-dark-grayblue: hsl(234, 11%, 52%);
  --clr-dt-very-dark-grayblue-1: hsl(233, 14%, 35%);
  --clr-dt-very-dark-grayblue-2: hsl(237, 14%, 26%);

  /* colour variables */
  --clr-main-background: hsl(235, 21%, 11%);
  --clr-item-background: hsl(235, 24%, 19%);
  --clr-border: hsl(237, 14%, 26%);
  --clr-item-text-active: hsl(234, 39%, 85%);
  --clr-item-text-inactive: hsl(234, 11%, 52%);
  --clr-filter-hover: hsl(236, 33%, 92%);
  --clr-filter-active: hsl(220, 98%, 61%);

}

/* body font size: 18px */

/* font-weights 400, 700 */

* {
  box-sizing: border-box;
  font-family: 'Josefin Sans', sans-serif;
}

body, 
h1, 
h2, 
ul, 
li, 
p, 
input {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-size: 18px;
}

/* general layout */

.background {
  position: relative;
  padding-block: 4.25em 3em;
  min-height: 100vh;
  width: 100%;
  background-position: top left;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: var(--clr-main-background);
}

.background.dark {
  background-image: url(./images/bg-desktop-dark.jpg);
}

.background.light {
  background-image: url(./images/bg-desktop-light.jpg);
}

.app-container {
  margin-inline: auto;
  width: 535px;
}

header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.4em;
}

header h1 {
  letter-spacing: 15px;
  color: hsl(0, 0%, 98%);
}

.theme-icon {
  width: 25px;
  height: 25px;
}

.theme-icon:hover {
  cursor: pointer;
}

.todo-list-container {
  list-style-type: none;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 1em;

  padding: 1.05em;
  color: var(--clr-item-text-active);
  background-color: var(--clr-item-background);
}

.todo-item.completed {
  text-decoration: line-through;
  color: var(--clr-item-text-inactive);
}

.todo-item:first-of-type {
  margin-bottom: 1.4em;
  border-radius: 8px;
}

.todo-item:not(:first-of-type) {
  border-bottom: 2px solid var(--clr-border);
}

.todo-item:nth-of-type(2) {
  border-radius: 8px 8px 0 0;
}

.todo-item-checkbox {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 25px;
  height: 25px;

  border-width: 2px;
  border-style: solid;
  border-radius: 50%;
  border-color: var(--clr-border);
}

.todo-item .todo-item-checkbox:hover {
  cursor: pointer;
}

.todo-item:not(:first-of-type) .todo-item-checkbox:hover {
  background-image: var(--clr-primary-gradient);
  border: none;
}

.todo-item.unchecked .todo-item-checkbox:hover::before {
  content: "";
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  border-radius: 50%;
  background-color: var(--clr-item-background);
}

.todo-item.checked .todo-item-checkbox {
  border: none;
  background-image: url(./images/icon-check.svg), var(--clr-primary-gradient);
  background-position: center center;
  background-repeat: no-repeat;
}

.todo-input {
  width: 100%;
  font-size: 1em;
  border: none;
  background-color: transparent;
  color: var(--clr-item-text-active);
}

.todo-input::placeholder {
  color: var(--clr-item-text-inactive);
}

.todo-input:focus {
  border: none;
  outline: none;
}

.todo-item-text {
  width: fit-content;
  cursor: pointer;
}

.todo-item-cross {
  margin-left: auto;
}

.todo-item-cross:hover {
  cursor: pointer;
}

.dragging {
  opacity: 0.5;
}

.visible {
  display: flex;
}

.hidden {
  display: none;
}

.todo-list-utilities-container {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 1.25em;
  
  font-size: 0.8em;
  color: var(--clr-item-text-active);
  background-color: var(--clr-item-background);
  border-radius: 0 0 8px 8px;
}

.filters-container {
  display: flex;
  justify-content: space-between;
  gap: 1em;
}

.filters-container > *:hover {
  cursor: pointer;
  font-weight: 700;
  color: var(--clr-filter-hover);
}

.filters-container > *.active {
  color: var(--clr-filter-active);
}

.clear-completed-function:hover {
  cursor: pointer;
  font-weight: 700;
  color: var(--clr-filter-hover);
}

.filters-container.mobile {
  display: none;
}

.drag-drop-text {
  margin-top: 4em;
  text-align: center;
  font-size: 0.7em;
  color: var(--clr-item-text-active);
}

footer {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.9em;
  color: var(--clr-item-text-active);
}

footer a {
  color: inherit;
}

@media (max-width: 700px) {
  body {
    font-size: 12px;
  }
  
  .background.dark {
    background-image: url(./images/bg-mobile-dark.jpg);
  }

  .background.light {
    background-image: url(./images/bg-mobile-light.jpg);
  }
  
  .app-container {
    width: 87.5%;
  }

  header {
    margin-bottom: 2.5em;
  }

  .theme-icon {
    width: 20px;
    height: 20px;
  }

  .todo-item {
    padding: 1.125em;
  }

  .todo-item:first-of-type {
    margin-bottom: 1.25em;
  }

  .todo-list-utilities-container {
    font-size: 1em;
  }

  .filters-container.desktop {
    display: none;
  }

  .filters-container.mobile {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 1.125em;
    padding: 1.125em;

    font-size: 1.25em;
    color: var(--clr-item-text-inactive);
    background-color: var(--clr-item-background);
    border-radius: 8px;
  }

  .drag-drop-text {
    margin-top: 3em;
    font-size: 1.25em;
  }
}