/* 
# Front-end Style Guide

## Layout

The designs were created to the following widths:

- Mobile: 375px
- Desktop: 1440px

## Colors

### Primary

- Bright Blue: hsl(220, 98%, 61%)
- Check Background: linear-gradient hsl(192, 100%, 67%) to hsl(280, 87%, 65%)

### Neutral

### Light Theme

- Very Light Gray: hsl(0, 0%, 98%)
- Very Light Grayish Blue: hsl(236, 33%, 92%)
- Light Grayish Blue: hsl(233, 11%, 84%)
- Dark Grayish Blue: hsl(236, 9%, 61%)
- Very Dark Grayish Blue: hsl(235, 19%, 35%)

  --bottom-bg-color: hsl(233, 11%, 84%);
  --list-item-bg-color:hsl(236, 33%, 92%);
  --text-color: hsl(236, 9%, 61%);
  --hover-color: hsl(235, 19%, 35%);
  --list-type-text-color:  hsl(233, 11%, 84%);
  --circle-cross-color: hsl(236, 33%, 92%);


### Dark Theme

- Very Dark Blue: hsl(235, 21%, 11%)
- Very Dark Desaturated Blue: hsl(235, 24%, 19%)
- Light Grayish Blue: hsl(234, 39%, 85%)
- Light Grayish Blue (hover): hsl(236, 33%, 92%)
- Dark Grayish Blue: hsl(234, 11%, 52%)
- Very Dark Grayish Blue: hsl(233, 14%, 35%)
- Very Dark Grayish Blue: hsl(237, 14%, 26%)

## Typography

### Body Copy-

- Font size: 18px

### Font

- Family: [Josefin Sans](https://fonts.google.com/specimen/Josefin+Sans)
- Weights: 400, 700

*/


@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
.spinner {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  background-color: var(--bottom-bg-color);
}

.spinner i {
  margin: auto;
  animation: spin 1s linear infinite;
}

:root {
  --common-top-bottom-padding: 2rem;
  --bottom-bg-color: hsl(235, 21%, 11%);
  --list-item-bg-color: hsl(235, 24%, 19%);
  --text-color: hsl(234, 39%, 85%);
  --hover-color: hsl(236, 33%, 92%);
  --list-type-text-color: hsl(234, 11%, 52%);
  --circle-cross-color: hsl(237, 14%, 35%);

  --active-status-color: hsl(220, 98%, 61%);
}

* {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a {
  margin: 0;
  padding: 0;
}

:root {
  --common-top-bottom-padding: 2rem;
}

html {
  font-size: 11.5px;
}

body {
  font-family: "Josefin Sans", sans-serif;
}

.container {
  overflow: hidden;
}

.todo-inputfield input[type="text"],
.todo-inputfield input[type="submit"],
.todo-list-item,
.todo-list-item-mobile,
.todo-list-type,
.todo-list-item-desktop {
  font-size: 1.2rem;
  line-height: 1;
}

/*  Top Section CSS Start */

.top {
  background-image: url(./images/bg-mobile-dark.jpg);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  height: 200px;
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.todo-header {
  display: flex;
  width: 90%;
  justify-content: space-between;
  margin-top: 3rem;
  align-items: center;
}

.todo-heading {
  color: #ffffff;
  text-transform: uppercase;
  font-size: 2.5rem;
  letter-spacing: 0.7rem;
  line-height: 1;
}

.todo-time-icon {
  height: 70%;
  background-color: transparent;
  border: none;
}

.todo-time-icon:focus,
.todo-time-icon:hover,
.todo-list-text:hover,
.todo-list-text:focus {
  cursor: pointer;
}

.todo-time-icon img {
  height: 100%;
}

.todo-inputfield {
  margin-top: 3rem;
  width: 90%;
  position: relative;
  display: flex;
  justify-content: center;
}

.todo-inputfield input[type="text"] {
  padding: var(--common-top-bottom-padding) 0;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border: none !important;
  background-color: var(--list-item-bg-color);
  padding-left: 15%;
  padding-right: 5%;
  color: var(--text-color);
  font-family: "Josefin Sans", sans-serif;
  caret-color: var(--active-status-color);
  width: 75%;
  margin-right: 0;
}

input[type="submit"] {
  background: rgb(87, 221, 255);
  background: linear-gradient(
    146deg,
    rgba(87, 221, 255, 1) 0%,
    rgba(192, 88, 243, 1) 100%
  );
  border: none;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  width: 25%;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  margin-left: 0;
}

#status {
  display: none;
}

.todo-inputfield .circle {
  position: absolute;
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid var(--circle-cross-color);
  border-radius: 50%;
  left: clamp(5px, 5%, 1.5rem);
  top: calc((((var(--common-top-bottom-padding) * 2) + 1.2rem) - 1.3rem) / 2);
}

/* Top Section CSS Finish */

.bottom {
  width: 100%;
  background-color: var(--bottom-bg-color);
  position: relative;
  min-height: calc(100vh - 250px);
  max-height: 100%;
  padding-bottom: 1rem;
}

.todo-list {
  width: 90%;
  display: flex;
  justify-content: center;
  position: relative;
  top: -2.75rem;
  flex-direction: column;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}

.todo-list-item {
  width: 100%;
  padding: var(--common-top-bottom-padding) 0;
  border: none;
  border-bottom: 1px solid var(--circle-cross-color);
  background-color: var(--list-item-bg-color);
  color: var(--text-color);
  position: relative;
  display: flex;
  align-items: center;
}

/* Completed list Item CSS */
.completed-item .todo-list-text {
  text-decoration: line-through;
}

.completed-item .circle span img {
  visibility: visible;
  background: rgb(87, 221, 255);
  background: linear-gradient(
    146deg,
    rgba(87, 221, 255, 1) 0%,
    rgba(192, 88, 243, 1) 100%
  );
}

/* Current List type */
.current {
  color: var(--active-status-color) !important;
}

.todo-list .todo-list-item:nth-of-type(1),
.top-border {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.todo-list-item .todo-list-text {
  margin-left: clamp(5px, 1.5rem, 5%);
  margin-right: auto;
  width: clamp(15rem, 70%, 30rem);
  line-height: 1.5;
}

.todo-list-item .circle {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 1.3rem;
  width: 1.3rem;
  padding: 2px;
  background-color: var(--circle-cross-color);
  border-radius: 50%;
  margin-left: clamp(5px, 5%, 1.5rem);
}

.todo-list-item .circle span {
  border-radius: 50%;
  background-color: var(--list-item-bg-color);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.todo-list-item .circle img {
  border-radius: 50%;
  width: 100%;
  height: 100%;
  background-color: var(--list-item-bg-color);
  padding: 4px 2px;
  visibility: hidden;
}

.todo-list-item .cross {
  height: 1.3rem;
  width: 1.3rem;
  background: url(./images/icon-cross.svg);
  background-size: 1.4rem;
  background-position: center;
  background-repeat: no-repeat;
  margin-left: auto;
  margin-right: 1.5rem;
  border: none;
}

.todo-list-item-mobile,
.todo-list-type {
  width: 100%;
  border: none;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  background-color: var(--list-item-bg-color);
  color: var(--list-type-text-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--common-top-bottom-padding) 5%;
}

.todo-list-type {
  border-radius: 0.5rem;
  justify-content: space-evenly;
  margin-top: 1.5rem;
}

.reorder-list {
  width: 100%;
  color: var(--list-type-text-color);

  margin: auto;
  margin-top: 3rem;
  text-align: center;
}

/* Hiding the desktop version of list type */
.todo-list-item-desktop .todo-list-type,
.todo-list-item-desktop {
  display: none;
}

/* Hover CSS */
.todo-list-item .circle:hover,
.todo-list-item .circle:focus {
  background: rgb(87, 221, 255);
  background: linear-gradient(
    146deg,
    rgba(87, 221, 255, 1) 0%,
    rgba(192, 88, 243, 1) 100%
  );
  cursor: pointer;
}

.hover-color-effect {
  font-weight: 700;
}

.hover-color-effect:hover,
.hover-color-effect:focus {
  color: var(--hover-color);
  cursor: pointer;
}

/* // X-Small devices (portrait phones, less than 375) */
/* // No media query for `xs` since this is the default. */

/* // Small devices (landscape phones, 375px and up) */
@media (min-width: 375px) {
  html {
    font-size: 13px;
  }

  /* Icreasing the height of top section to adjust the banner */
  .top {
    height: 250px;
  }
}

/* // Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  html {
    font-size: 14px;
  }

  /* Changing the top section banner image to desktop version */
  .top {
    background-image: url(./images/bg-desktop-dark.jpg);
  }

  /* Assigning the width for big phones, tabs and ipads */
  .todo-header,
  .todo-inputfield,
  .todo-list-item,
  .todo-list-item-mobile,
  .reorder-list,
  .todo-list-type,
  .todo-list {
    width: 500px;
  }

  /* Aligning the list */
  .todo-list {
    top: -2.5rem;
  }
}

/* // Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  :root {
    --common-top-bottom-padding: 1.5rem;
  }

  html {
    font-size: 15px;
  }

  /* Assigning the width for large tabs and ipads */
  .todo-header,
  .todo-inputfield,
  .todo-list-item,
  .todo-list-item-mobile,
  .reorder-list,
  .todo-list-type,
  .todo-list-item,
  .todo-list-item-desktop,
  .todo-list {
    width: 40rem;
  }

  /* Alignging the list */
  .todo-list {
    top: -2.5rem;
  }
}

/* // Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  :root {
    --common-top-bottom-padding: 1.25rem;
  }

  html {
    font-size: 16px;
  }

  /* Making adjust for list in desktop version */
  .todo-list {
    top: -1.775rem;
  }

  /* Hiding the mobile type list */
  .todo-list-item-mobile,
  .todo-list-type {
    display: none;
  }

  /* Desktop version for list type */
  .todo-list-item-desktop {
    display: flex;
    border: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;

    padding: calc(var(--common-top-bottom-padding) - 0.175rem) 2%;
    background-color: var(--list-item-bg-color);
    color: var(--list-type-text-color);
    justify-content: space-between;
    align-items: center;
  }

  /* Desktop version for list type */
  .todo-list-item-desktop .todo-list-type {
    flex: 50%;
    margin-top: 0;
    padding: 0;
    display: flex;
  }

  /* Hiding cross on desktop devices */
  .todo-list-item .cross {
    visibility: hidden;
  }

  /* Showing cross on hover */
  .todo-list-item:hover .cross,
  .todo-list-item:focus .cross {
    cursor: pointer;
    visibility: visible;
  }
}

/* // X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  html {
    font-size: 16.5px;
  }

  /* Aligning the top inputfield and header */
  .todo-header,
  .todo-inputfield {
    margin-top: 2.5rem;
  }
}

/* // XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
  html {
    font-size: 17px;
  }
}
