html,
body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;

  accent-color: rgb(var(--color-theme));
}

:root {
  --color-theme: 135, 132, 192;
}

main {
  width: 80%;
}

@media screen and (min-width: 40rem) {
  main {
    width: 32rem;
    margin: 0 auto;
  }
  
}

form#form {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  progress {
    width: 100%;
  }

  span {
    color: #333;
    text-align: center;
  }

  fieldset {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    border-radius: 0.5rem;

    legend {
      padding: 0.5rem;
    }
  }

  @media screen and (min-width: 40rem) {
    fieldset {
      display: block;

      legend {
        padding: 0.2rem;
      }
    }
  }

  .enc-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
}

.svg-shield {
  display: block;
  width: 1.2rem;
}
#encrypt:not(:checked) ~ .svg-shield {
  display: none;
}

div#download {
  width: 20rem;
}

footer.footer {
  text-align: center;
}

figure {
  svg {
    box-shadow: rgba(var(--color-theme), 0.5) 0px 20px 30px;
    border: 1px solid rgb(var(--color-theme));
    border-radius: 0.5rem;
    width: 100%;
    aspect-ratio: 1/1;
  }

  figcaption {
    margin-top: 2rem;
    text-align: center;
    font-weight: 500;
    font-size: small;
  }

  .svg-container {
    width: 100%;
    display: grid;
    place-items: center;
  }

  @media screen and (min-width: 40rem) {
    svg {
      width: 20rem;
    }
  }

  textarea {
    width: 100%;
    resize: vertical;
    margin-block: 1rem;
  }
}

button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.24rem;
  background-color: rgb(var(--color-theme));
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;

  &:hover {
    background-color: rgba(var(--color-theme), 0.9);
  }

  &:disabled {
    background-color: rgba(var(--color-theme), 0.2);
    cursor: not-allowed;
  }
}