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

body {
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
}

.generator {
  width: min(90vw,400px);
  font: 900 0.7rem helvetica,sans-serif;
  color: rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

  & .password {
    width: 100%;
    padding: 1.25rem 1rem;
    font-size: 0.85rem;
    outline: none;
    border: 2px solid black;
  }

  & .copy {
    position: absolute;
    right: 0.7rem;
    font-size: 1.3rem;
    cursor: pointer;
  }

  & .tooltip {
    position: absolute;
    right: 0;
    top: -2.75rem;
    background-color: black;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transform: translateY(0.5rem);
    opacity: 0;
    transition: transform 0.5s, opacity 0.2s;

    &::after {
      content: '';
      position: absolute;
      left: 40%;
      top: 1rem;
      z-index: -1;
      width: 1rem;
      aspect-ratio: 1;
      background-color: black;
      transform: rotate(45deg);
    }
  }
}

.animate.tooltip {
  transform: translateY(0);
  opacity: 1;
}

.amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;

  & .range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background-color: black;
    border-radius: 2rem;
    cursor: pointer;
  }

  ::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    aspect-ratio: 1;
    background-color: white;
    border: 2px solid black;
    border-radius: 50%;
  }

  & .length {
    width: 3rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 2px solid black;
    font-size: 0.8rem;
  }
}

.options {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 0.75rem;

  & label {
    cursor: pointer;

    & input {
      display: none;

      &:checked ~ span {
        background-color: black;
        color: white;
      }
    }

    & span {
      display: block;
      width: 100%;
      text-align: center;
      padding: 1rem;
      user-select: none;
      border: 2px solid black;
    }
  }
}

.btn {
  border: 2px solid #000;
  background-color: transparent;
  padding: 1.25rem;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 0.75rem;
}