@import url("https://fonts.googleapis.com/css2?family=Overpass:wght@200;300;400;600;700;800&display=swap");

$primaryColor: #69df75;

* {
  margin: 0%;
  padding: 0%;
  box-sizing: border-box;
  font-family: "Overpass", sans-serif;
}
body {
  background: #eefff0;
}

body section {
  width: 100%;
  max-width: 900px;
  margin: 0% auto;
  padding: 1rem;
}

// header

body section nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  .title {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    .textarea {
      margin-left: 1rem;
      h1 {
        font-size: 2rem;
        color: #676767;
        span {
          position: relative;
          cursor: pointer;
        }
        span::after {
          content: "";
          position: absolute;
          height: 3px;
          width: 80%;
          background-color: $primaryColor;
          border-radius: 999px;
          bottom: 0%;
          left: 0%;
        }
      }
      p {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-size: 1rem;
        color: #767676;
        margin-top: 4px;
        span {
          font-size: 18px;
          margin-left: 5px;
          color: #69df75a1;
        }
      }
    }
  }
  //  getStatBtn Button
  .getStatBtn button {
    padding: 0.675rem 1.5rem;
    border: none;
    outline: none;
    background-color: $primaryColor;
    color: #fff;
    font-weight: normal;
    border-radius: 0.25rem;
    font-family: inherit;
    user-select: none;
    cursor: pointer;
  }
}

// Form

body section .formCont {
  box-sizing: unset;
  width: 90%;
  margin: 0 auto;
  margin-top: 2rem;
  form {
    max-width: 600px;
    display: grid;
    grid-template-columns: auto 20%;
    margin: 0% auto;
    border-radius: 0.25rem;
    input,
    button {
      border: none;
      padding: 0.575rem 0.75rem;
      outline: none;
      background-color: transparent;
      line-height: 1.5;
      font-size: 1rem;
    }
    input {
      border: 1px solid #69df7588;
      border-radius: 0.25rem 0 0 0.25rem;
      border-right-width: 0;
    }
    button {
      border-radius: 0 0.25rem 0.25rem 0;
      background: $primaryColor;
      cursor: pointer;
      color: #fff;
    }
  }
}
// Todo List Design
body section .listsCont {
  width: 90%;
  max-width: 600px;
  margin: 0% auto;
  margin-top: 2rem;
  ul {
    list-style: none;
    li {
      width: 100%;
      background-color: #fff;
      margin: 1rem 0;
      border-radius: 0.45rem;
      padding: 1rem;
      .liMain {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .lileft {
          width: 80%;
          display: flex;
          align-items: flex-start;
          word-break: break-word;
          .check {
            cursor: pointer;
            margin-top: 1px;
            user-select: none;
            height: 30px;
            width: 30px;
            display: flex;
            justify-content: center;
            align-items: baseline;
            .circle {
              height: 18px;
              width: 18px;
              border: 1px solid #676767;
              background-color: transparent;
              border-radius: 50%;
            }
            span {
              color: $primaryColor;
            }
          }
          .todoText {
            width: 100%;
            margin-left: 3px;
            position: relative;
            h1 {
              color: #505050;
              font-weight: normal;
              font-size: 1.2rem;
              word-wrap: break-word;
              margin-left: 5px;
            }
            p {
              color: #b1b1b1;
              font-size: 14px;
            }
          }
        }
      }
      .liRight {
        .icons {
          button {
            border: none;
            outline: none;
            background-color: transparent;
            cursor: pointer;
            padding: 0.5rem 0.6rem;
            border-radius: 50%;
            position: relative;
            overflow: hidden;
            span {
              font-size: 1.2rem;
              z-index: 1;
            }
            .ripple {
              z-index: 0;
            }
          }
          .edit {
            margin-right: 4px;
            color: #69df75;
          }
          .edit:hover {
            background-color: #69df752d;
          }
          .delete {
            color: rgb(253, 52, 52);
          }
          .delete:hover {
            background-color: rgba(253, 52, 52, 0.171);
          }
        }
      }
      .todoDescription {
        margin: 0.5rem;
        padding: 0.5rem;
        padding-top: 1rem;
        padding-bottom: 0%;
        border-top: 1px solid #67676744;
        p {
          color: #6c6c6c;
          font-size: 1rem;
          line-height: 1.5;
          word-wrap: break-word;
        }
      }
    }
    li.completed {
      opacity: 0.7;
      .lileft {
        .todoText {
          h1 {
            text-decoration: line-through;
            text-decoration-thickness: 2px;
            text-decoration-color: #505050;
          }
        }
      }
    }
  }
}

// Button Ripple Effect
body section .ctaBtn {
  position: relative;
  overflow: hidden;
  p {
    transform: translateZ(10px);
  }
}

// Progress

body .sideNavCont {
  position: fixed;
  top: 0%;
  left: 0%;
  transform: translateX(-100%);
  z-index: 11;
  transition: 0.5s ease transform;
  height: 100vh;

  nav {
    height: 100%;
    background-color: #fff;
    padding: 1.5rem;

    .topNav {
      display: flex;
      padding-bottom: 0.5rem;
      .textContent {
        margin-left: 10px;

        h1 {
          color: #767676;
        }
        p {
          color: #6c6c6c;
        }
      }
      border-bottom: 1px solid #67676762;
    }
    header {
      margin-top: 1rem;
      p {
        color: #a5a5a5;
      }
    }
    .statsCont {
      margin-top: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      .progressCont {
        height: 130px;
        width: 130px;
        position: relative;
        .pgC {
          height: 130px;
          width: 130px;
          transform: translate(-5px, -5px) rotate(-90deg);
          svg {
            height: 130px;
            width: 130px;
            circle {
              height: 100%;
              width: 100%;
              fill: none;
              stroke-width: 10;
              stroke: #a5a5a5;
              transform: translate(5px, 5px);
              stroke-dasharray: 380;
              stroke-dashoffset: 380;
              stroke-linecap: round;
            }
            #outer {
              stroke-dashoffset: 0;
            }
            #progress {
              stroke: #69df75;
              stroke-dashoffset: calc(380 - (380 * 10) / 100);
            }
          }
        }
        .percent {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-57%, -57%);
          font-size: 2rem;
          color: #69df75;
        }
      }
    }
    .taskResult {
      margin-top: 2rem;
      table,
      td,
      th {
        border: 1px solid #676767;
        border-collapse: collapse;
        padding: 1rem;
        text-align: left;
      }
    }
  }
}

body .overlay,
body .modalOverlay {
  height: 100vh;
  width: 100%;
  background: #000;
  position: fixed;
  top: 0%;
  left: 0%;
  display: none;
  animation: 0.5s ease overlayEffect;
  opacity: 0.5;
}
body.userNameModal .modalOverlay {
  display: flex;
  opacity: 0.5;
  animation: 0.5s ease overlayEffect;
}

body.sideActive {
  overflow: hidden;
  // padding-right: 17px;
  .sideNavCont {
    transform: translateX(0);
  }
  .overlay {
    display: flex;
    opacity: 0.5;
  }
}

// Name Modal

body .modalCont {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  .modal {
    width: 350px;
    max-width: 350px;
    margin: 0% auto;
    background-color: #fff;
    border-radius: 0.4rem;
    padding: 1.3rem;
    .topCont {
      display: flex;
      border-bottom: 1px solid #d8d8d8;
      padding-bottom: 0.5rem;
      .textContent {
        margin-left: 10px;
        h1 {
          font-size: 20px;
        }
        p {
          font-size: 15px;
        }
      }
    }
    form {
      margin-top: 1rem;
      display: flex;
      flex-direction: column;
      width: 100%;
      label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 15px;
      }
      input,
      button {
        padding: 0.375rem 0.75rem;
        border: none;
        outline: none;
        line-height: 1.5;
        border-radius: 0.25rem;
      }
      input {
        border: 1px solid #767676ab;
      }
      button {
        background-color: #69df75;
        color: #fff;
        margin-top: 1rem;
        cursor: pointer;
      }
    }
  }
}

@keyframes rippleEffect {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes overlayEffect {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.5;
  }
}

@media (max-width: 555px) {
  body section {
    nav {
      padding: 1rem 0.1rem;
      .title {
        .textarea {
          h1 {
            font-size: 18px;
            span::after {
              height: 2px;
            }
          }
          p {
            font-size: 14px;
          }
        }
      }
    }
    .formCont form {
      grid-template-columns: auto 25%;
      input,
      button {
        font-size: 15px;
      }
    }
    .listsCont {
      .liRight {
        .icons {
          display: flex;
        }
      }
    }
  }
}
@media (max-width: 430px) {
  body section {
    .formCont form {
      grid-template-columns: auto 30%;
    }
  }
}
