@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;700&display=swap");

:root {
  --bright-blue: #3a7bfd;
  --chck-bg-first: #57ddff;
  --chck-bg-second: #c058f3;
  --body-bg-clr: #fafafa;
  --form-bg-clr: rgb(255, 255, 255);
  --form-bg-clr-lg: 255, 255, 255;
  --border-clr: #e4e5f1;
  --cross-clr: #d2d3db;
  --form-subpar-clr: #9394a5;
  --form-par-clr: #484b6a;
}

.dark-theme {
  --body-bg-clr: #161722;
  --form-bg-clr: rgb(37, 39, 61);
  --form-bg-clr-lg: 37, 39, 61;
  --cross-clr: #4d5066;
  --border-clr: #393a4c;
  --form-subpar-clr: #777a92;
  --form-par-clr: #cacde8;
}

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

html {
  font-size: 62.5%;
}

body {
  font-family: "Josefin Sans", sans-serif;
  background-image: url("./images/bg-mobile-light.jpg");
  background-repeat: no-repeat;
  background-size: contain;
  background-color: var(--body-bg-clr);
  height: 100vh;
}

body.dark-theme {
  background-image: url("./images/bg-mobile-dark.jpg");
}

.container {
  width: 90%;
  margin: 0 auto;
  margin-top: 4.5rem;
}

.filter-cont-desk {
  display: none;
}

.filter-cont-desk div {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.filter-cont-desk div p {
  color: var(--form-subpar-clr);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-cont-desk div p:hover {
  color: var(--form-par-clr);
}

/* HEADER SECT */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.title {
  font-weight: 700;
  font-size: 3.2rem;
  color: #ffffff;
  letter-spacing: 1rem;
}

.icon {
  width: 2rem;
  cursor: pointer;
}

/* SEARCH SECT */

.search-cont {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  background-color: var(--form-bg-clr);
}

.search-circle {
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--border-clr);
  border-radius: 50%;
}

.input-search {
  font-family: "Josefin sans", sans-serif;
  font-size: 1.2rem;
  color: var(--form-par-clr);
  background-color: var(--form-bg-clr);
  border: none;
  outline: none;
}
.input-search:focus {
  caret-color: var(--bright-blue);
}

/* TODO SEC */

.todo-cont {
  background-color: var(--form-bg-clr);
  border-radius: 0.5rem;
}

.todo-info-cont {
  display: flex;
  padding: 1.5rem;
  justify-content: space-between;
  box-shadow: 0.3rem 2rem 3.5rem -0.5rem rgba(22, 23, 34, 0.212);
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  margin-bottom: 2rem;
}

.todo-info-cont p {
  color: var(--form-subpar-clr);
  font-size: 1.2rem;
}

.todo-list {
  list-style: none;
  background-color: var(--form-bg-clr);
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.todo-item {
  display: flex;
  align-items: center;
}

.circle {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--border-clr);
  border-radius: 50%;
}

.check {
  display: none;
}

.cross {
  cursor: pointer;
}

div .todo-item.completed .circle {
  background: linear-gradient(150deg, #57ddff, #c058f3);
  background-clip: padding-box;
  border: 0px solid transparent;
}

div .todo-item.completed .circle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  border-radius: 50%;
  background: linear-gradient(150deg, #57ddff, #c058f3);
}

.todo-item.completed .circle .check {
  pointer-events: none;
  width: 45%;
  height: auto;
  display: block;
}

.todo-item {
  justify-content: space-between;
  border-bottom: 1px solid var(--border-clr);
  padding: 1.5rem;
}

.todo-text-cont {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: 70%;
}

.todo-item div .circle {
  cursor: pointer;
}

.todo-item p {
  font-size: 1.2rem;
  color: var(--form-par-clr);
}

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

.todo-item img {
  width: 1.2rem;
  height: 1.2rem;
}

/* FILTER SECT */
.filter-cont {
  display: flex;
  padding: 1.5rem;
  justify-content: center;
  box-shadow: 0.3rem 0.5rem 3.5rem -0.5rem rgba(22, 23, 34, 0.212);
  border-radius: 0.5rem;
  background-color: var(--form-bg-clr);
}

.filter-cont div {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.filter-cont div p {
  color: var(--form-subpar-clr);
  font-size: 1.4rem;
  font-weight: 700;
}

#all.selected {
  color: var(--bright-blue);
}

#active.selected {
  color: var(--bright-blue);
}

#complete.selected {
  color: var(--bright-blue);
}

/* MEDIA CHANGE SEC */

@media (min-width: 56.25em) {
  body {
    background-image: url("./images/bg-desktop-light.jpg");
  }

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

  .container {
    margin-top: 7rem;
    width: 45%;
    max-width: 54rem;
  }
  .title {
    font-size: 4rem;
  }

  .icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .search-cont {
    padding: 2rem;
    margin-bottom: 3rem;
  }

  .search-circle {
    width: 2.4rem;
    height: 2.4rem;
  }

  .input-search {
    font-size: 1.8rem;
  }

  .todo-info-cont p {
    font-size: 1.4rem;
  }

  .todo-item {
    padding: 2rem;
  }

  .todo-item.completed .circle .check {
    width: 9px;
    height: 6px;
  }

  .todo-item p {
    font-size: 1.8rem;
  }

  .todo-item img {
    width: 1.8rem;
    height: 1.8rem;
  }

  .todo-text-cont {
    width: 70%;
    cursor: pointer;
    gap: 2rem;
  }
  .circle {
    width: 2.4rem;
    height: 2.4rem;
  }

  .todo-text-cont:hover .circle {
    background: linear-gradient(
          rgb(var(--form-bg-clr-lg)),
          rgb(var(--form-bg-clr-lg))
        )
        padding-box,
      linear-gradient(#57ddff, #c058f3) border-box;
    border-radius: 50rem;
    border: 1px solid transparent;
  }

  .cross {
    opacity: 0;
  }

  .todo-info-cont {
    padding: 2rem;
  }

  .filter-cont {
    display: none;
  }

  .filter-cont-desk {
    display: block;
  }

  .clear-text {
    cursor: pointer;
  }

  .clear-text:hover {
    color: var(--form-par-clr);
  }
}
