header {
  display: none;
}

.exitMenu {
  display: none;
}

@media screen and (max-width:767px) {
  .exitMenu {
    display: none;
    position: fixed;
    width: calc(100vw - 260px);
    height: 100%;
    background: rgba(86, 88, 105, .75);
    top: 0;
    z-index: 2000;
    left: 260px;

    button {
      width: 40px;
      height: 40px;
      border: none;
      background: transparent;
      margin-top: 10px;
      margin-left: 10px;
      cursor: pointer;
      outline: none;

      &:focus {
        border: 2px solid white;
      }

      svg {
        color: white;
        width: 24px;
        height: 24px;
      }
    }
  }

  header {
    display: grid;
    grid-template-columns: auto auto auto;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(52, 53, 65, 1);
    padding-top: .5em;
    padding-bottom: .3em;
    color: rgba(217, 217, 227, 1);
    z-index: 1000;
    box-shadow: 0px 0px 1px 1px hsla(0, 0%, 100%, .2);

    button {
      background: transparent;
      padding: 0;
      margin: 0;
      border: 0;
      color: rgba(217, 217, 227, 1);
      cursor: pointer;
    }

    .start {
      text-align: left;
      padding-left: .5em;
    }

    svg {
      width: 24px;
      height: 24px;
    }

    .title {
      margin-left: 1rem;
      margin-right: 0.8rem;
      padding-top: 3px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .end {
      text-align: right;
      padding-right: .5em;
    }
  }
}

.menu {
  position: fixed;
  z-index: 2000;
  width: 260px;
  background: rgba(32, 33, 35, 1);
  height: 100%;
  display: flex;
  flex-direction: column;

  @media screen and (max-width:767px) {
    display: none;

    &:is(.showMd),
    &:is(.showMd)+.exitMenu {
      display: flex;
    }
  }

  button {
    position: relative;
    color: rgba(255, 255, 255, 1);
    width: 100%;
    transition: all .2s ease-in-out;
    border: none;
    padding-top: .75rem;
    padding-bottom: .75rem;
    padding-left: 3em;
    border-radius: .375rem;
    background: transparent;
    text-align: left;
    font-weight: normal;
    font-size: .875rem;
    line-height: 1.25rem;

    &:hover {
      background: hsla(240, 9%, 59%, .1);
      cursor: pointer;
    }

    svg {
      position: absolute;
      padding-top: 2px;
      left: .75rem;
      width: 16px;
      height: 16px;
    }
  }

  button[aria-label='new'] {
    border: 1px solid hsla(0, 0%, 100%, .2);
    width: calc(260px - 1rem);
    margin-top: .5rem;
    margin-bottom: .6rem;
    margin-left: .5rem;
  }

  .history {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: .5rem;
    width: 259px;

    &::-webkit-scrollbar {
      width: 8px;
    }

    &::-webkit-scrollbar-track {
      background: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background: rgba(86, 88, 105, 1);
      border-radius: 30px;

      &:hover {
        background: rgba(172, 172, 190, 1);
      }
    }

    button {
      width: calc(260px - 1rem);
      margin-left: .5rem;
      margin-bottom: 5px;
      padding-right: .75rem;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .active {
      background: rgba(52, 53, 65, 1);
    }
  }

  .actions {
    width: calc(260px - 1rem);
    bottom: 0;
    border-top: 1px solid hsla(0, 0%, 100%, .2);
    padding-top: 5px;
    padding-bottom: 5px;
    background: rgba(32, 33, 35, 1);
    margin-left: .5rem;

    button {
      margin-bottom: 3px;

      &:hover {
        background: hsla(240, 9%, 59%, .1);
      }

      svg {
        position: absolute;
        padding-top: 2px;
        left: .75rem;
        width: 16px;
        height: 16px;
      }

      span {
        margin-top: -2px;
        position: absolute;
        color: rgba(52, 53, 65, 1);
        background: rgba(250, 230, 158, 1);
        border-radius: .375rem;
        padding-left: .375rem;
        padding-right: .375rem;
        padding-top: .125rem;
        padding-bottom: .125rem;
        right: .75rem;
      }
    }
  }
}

.settingsModal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 2100;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: all .15s ease-in-out;
  -moz-transition: all .15s ease-in-out;

  @media screen and (max-width:640px) {
    align-items: end;
  }

  .inner {
    display: block;
    background: white;
    padding: 1.5rem;
    border-radius: .5rem;
    height: auto;
    width: auto;
    margin: 1rem;

    .content {
      display: flex;
      flex-direction: row;
      gap: 8rem;

      @media screen and (max-width:335px) {
        gap: 5rem;
      }

      &:is(.top) {
        h3 {
          font-weight: normal;
          line-height: 1.5rem;
        }

        button {
          background: none;
          border: none;
          width: 100%;
          text-align: right;
          cursor: pointer;

          svg {
            height: 20px;
            width: 20px;
          }
        }
      }

      &:is(.ceneter) {
        margin-top: 1rem;
        margin-bottom: 1rem;

        p {
          font-size: .875rem;
          line-height: 1.25rem;
        }

        button {
          width: 2.75rem;
          height: 1.5rem;
          border: none;
          border-radius: 9999px;
          position: relative;
          cursor: pointer;

          div {
            position: absolute;
            width: calc(1.5rem - 4px);
            border-radius: 50%;
            background: #FFF;
            color: #FFF;
            top: 2px;
            bottom: 2px;
            transition: all .15s ease-in-out;
            -moz-transition: all .15s ease-in-out;
          }

        }
      }
    }

    .bottum {
      button {
        font-size: .875rem;
        line-height: 1.25rem;
        background: none;
        border: none;
        margin-right: 1rem;
        cursor: pointer;

        &:is(.end) {
          padding-left: 1rem;
        }
      }
    }
  }
}

.light {
  .settingsModal {
    background: hsla(240, 9%, 59%, .9);

    .inner {
      background: #FFF;

      .top {
        h3 {
          color: rgba(32, 33, 35, 1);
        }

        svg {
          color: rgba(32, 33, 35, 1);
        }
      }

      .ceneter {
        p {
          color: rgba(86, 88, 105, 1);
        }

        button {
          background: rgba(217, 217, 227, 1);

          div {
            transform: translateX(2px);
          }
        }
      }
    }

    .bottum {
      button {
        color: rgba(86, 88, 105, 1);
        text-decoration: underline;

        &:is(.end) {
          border-left: 1px solid rgba(86, 88, 105, 1);
        }
      }
    }
  }
}

.dark {
  .settingsModal {
    background: rgba(52, 53, 65, .9);

    .inner {
      background: rgba(32, 33, 35, 1);

      .top {
        h3 {
          color: #FFF;
        }

        svg {
          color: #FFF;
        }
      }

      .ceneter {
        p {
          color: rgba(197, 197, 210, 1);
        }

        button {
          background: rgba(16, 163, 127, 1);

          div {
            transform: translateX(calc(2.75rem - 1.5rem + 2px));
          }
        }
      }
    }

    .bottum {
      button {
        color: rgba(197, 197, 210, 1);
        text-decoration: underline;

        &:is(.end) {
          border-left: 1px solid rgba(197, 197, 210, 1);
        }
      }
    }
  }
}