:root {
  --font-primary: "JetBrains Mono", "monospace";

  --color-primary: rgb(65, 65, 65);
  --color-secondary: rgb(233, 233, 233);
  --color-tertiary: rgb(65, 65, 65);
}

*::before,
*::after,
* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  font-family: inherit;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;

  @media screen and (max-width: 62.5em) {
    font-size: 50%;
  }
}

body {
  font-family: var(--font-primary);
  font-size: 1.4rem;
}

ion-icon {
  font-size: 2rem;
  cursor: pointer;
}

ion-icon.logout-icon {
  font-size: 2.7rem;
}

label,
input {
  display: block;
}

h3 {
  font-size: 2rem;
  text-transform: uppercase;
}

a:link,
a:visited {
  text-decoration: none;
  color: var(--color-primary);
}

/*********************************/
/* BUTTON COMPONENT */
/*********************************/

.btn {
  background-color: transparent;
  cursor: pointer;
  padding: 1rem;
  font-size: inherit;
}

@media only screen and (max-width: 34.0625em) {
  .btn {
    font-size: 1.7rem;
  }
}

/*********************************/
/* HEADING COMPONENT  */
/*********************************/

.heading {
  line-height: 1.1;
}

.heading-heading {
  font-size: 6rem;
  text-transform: uppercase;
}

.heading-subheading {
  font-size: 5rem;
}

/*********************************/
/* BODY  PAGE */
/*********************************/

.body-index,
.body-login,
.body-signup,
.body-about {
  height: 100vh;
  background-color: var(--color-secondary);
  display: grid;
  grid-template-rows: auto 1fr;
}

.body-login main,
.body-signup main {
  display: flex;
  justify-content: center;
  flex-direction: column;

  padding: 10rem;
}

@media only screen and (max-width: 39.8125em) {
  .body-login main,
  .body-signup main {
    padding: 6rem;
  }
}

@media only screen and (max-width: 25em) {
  .body-login main,
  .body-signup main {
    padding: 2rem;
  }
}

/*********************************/
/* INDEX PAGE */
/*********************************/

.header {
  padding: 4rem;

  display: flex;
  align-items: center;

  & div {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

@media only screen and (max-width: 25.9em) {
  .header {
    padding: 9rem 4rem;
    align-items: start;
  }

  .heading-heading {
    font-size: 5rem;
  }

  .heading-subheading {
    font-size: 3.5rem;
  }
}

@media only screen and (max-width: 23.25em) {
  .header {
    padding: 9rem 2rem;
    align-items: start;
  }

  .heading-heading {
    font-size: 4rem;
  }

  .heading-subheading {
    font-size: 3rem;
  }
}

/*********************************/
/* NAVIGATION COMPONENT */
/*********************************/

.nav {
  height: auto;
  display: flex;
  padding: 0.5rem;
  gap: 2rem;
  align-items: center;

  border-bottom: 2px solid grey;
  background-color: #fff;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__list--items {
  margin-left: auto;
  display: flex;
  list-style: none;
  gap: 1rem;
  font-size: 1.6rem;

  & li {
    padding: 0.6rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;

    &:hover {
      border: 2px solid var(--color-primary);
      background-color: var(--color-secondary);
    }
  }
}

.nav-signup {
  background-color: var(--color-tertiary);
  border-radius: 2px;

  & a {
    color: #fff;
  }

  &:hover {
    background-color: transparent;

    color: var(--color-primary);
  }
}

.btn-add-todo {
  display: flex;
  align-items: center;
  gap: 1rem;

  background-color: var(--color-primary) !important;
  border: none;
  color: #fff !important;

  & ion-icon {
    color: inherit !important;
    font-weight: 600;
  }
}

/*********************************/
/* FORM COMPONENT */
/*********************************/

.form__input,
.form-textarea-add {
  font-family: inherit;
}

.form {
  padding: 1.4rem;
  background-color: rgb(220, 220, 220);

  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.form-add-task {
  width: 50rem;
  align-self: start;
  justify-self: center;
  box-shadow: 0 1px 2px rgba(198, 198, 198, 0.42);

  @media only screen and (max-width: 28.25em) {
    width: auto;
  }
}

.form-heading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form__input {
  font-size: inherit;
  padding: 1rem;
  width: 100%;
  display: block;
}

.form-textarea-add {
  font-size: inherit;
  resize: none;
  height: 7rem;
}

/*********************************/
/* TODO PAGE */
/*********************************/

.body-todos {
  background-color: var(--color-secondary);
  height: 100vh;

  display: grid;
  grid-template-rows: auto 1fr;
}

.body-todos nav {
  height: auto;
}

.main-todos-container {
  padding: 4rem;
  background-color: #fff;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5rem;

  @media only screen and (max-width: 68.125em) {
    gap: 3rem;
    padding: 2rem;
  }

  @media only screen and (max-width: 62.5em) {
    display: flex;
    flex-direction: column;
    padding: 5rem;
  }

  @media only screen and (max-width: 34.75em) {
    padding: 2rem;
  }
}

.main-todos {
  padding: 4rem;
  display: flex;
  justify-content: center;

  @media only screen and (max-width: 34.75em) {
    padding: 2rem;
  }
}

.todo-task-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;

  & div:first-child {
    flex-basis: 70%;
  }

  @media only screen and (max-width: 26.875em) {
    flex-direction: column;
    align-items: start;
  }
}

.todo-task {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.todo-task-lists {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: scroll;
}

.due-date {
  color: red;
}

.due-date-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 8px;

  span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.2rem;

    & ion-icon {
      font-weight: 800;
    }
  }

  @media only screen and (max-width: 25.625em) {
    flex-direction: column;
    align-items: start;
    gap: 0.5rem;
  }
}

.error {
  background-color: rgb(244, 231, 231);
  color: rgb(64, 4, 4);
  text-align: center;
  font-size: 1.4rem;
  padding: 1rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

li.done {
  border-color: green;
}

.due-date-container .done {
  color: green;
  font-weight: bolder;
}

input[type="checkbox"] {
  cursor: pointer;
}

.no-todo-tasks {
  background-color: var(--color-secondary);
  padding: 0.4rem;
  line-height: 1.15;
  text-align: center;
  border-radius: 5px;
  font-size: 1.1rem;
  width: auto;
  font-weight: bolder;

  align-self: center;
  justify-self: center;
}

.todo-task-lists-completed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: scroll;
}

.todo-task-item {
  display: flex;
  gap: 2.5rem;
  align-items: start;
  padding: 0.4rem;

  background-color: rgb(247, 247, 247);
  border: 3px solid rgb(207, 207, 207);
  border-radius: 0.5rem;
  cursor: pointer;

  @media only screen and (max-width: 22.875em) {
    gap: 0.8rem;
  }
}

.todo-task-input {
  height: 2rem;
  width: 2rem;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.content h3 {
  font-size: 1.4rem;
}

.content p {
  font-size: 1.2rem;
}

.todo-task-operation {
  margin-left: auto;
  display: flex;
  gap: 2rem;

  span {
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;

    &:first-child:hover {
      color: green;
    }

    &:last-child:hover {
      color: red;
    }
  }
}

/*********************************/
/* LOGIN PAGE */
/*********************************/

.form-password {
  display: flex;
  align-items: center;
  position: relative;

  & ion-icon {
    position: absolute;
    right: 0;
    margin: 0.5rem;
  }
}

.hidden {
  display: none;
}

.form-signup,
.form-login {
  place-self: center;
  padding: 3rem;
}

/*********************************/
/* ABOUT PAGE */
/*********************************/

.avatar-about-img {
  display: none;
  height: 4.5rem;
  width: 4.5rem;

  border-radius: 500rem;
}
/* 65.3125 */
.body-about main {
  padding: 5rem;
}

@media only screen and (max-width: 26em) {
  .body-about main {
    gap: 3rem;
    padding: 1rem;
  }
}

.about-main-container {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  padding: 2rem;
  background-color: #fff;
}

@media only screen and (max-width: 26em) {
  .about-main-container {
    gap: 3rem;
    padding: 1rem;
  }
}

.about-avatar {
  display: flex;
  gap: 4rem;
  font-family: inherit;
  align-items: center;
}

.update-username {
  display: flex;
  flex-direction: column;
  gap: 3rem;

  & form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }
}

.update-password {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  & form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

.update-name {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avatar-img {
  height: 3rem;
  width: 3rem;

  border-radius: 500rem;

  display: none;
}

.person-circle-outline-about {
  font-size: 3rem;
}

.overlay {
  height: 100dvh;
  width: 100dvw;

  background-color: rgba(29, 28, 28, 0.938);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;

  justify-content: center;
  align-items: center;

  & h3 {
    font-size: 4rem;
    z-index: 9999;
    color: var(--color-secondary);
    animation: 3s infinite alternate slide-in;
  }
}

@keyframes slide-in {
  from {
    translate: 150vw 0;
    scale: 200% 1;
  }

  to {
    translate: 0 0;
    scale: 100% 1;
  }
}
