.button_to {
  display: inline-flex;

  .destroy {
    align-items: center;
    border: none;
    border-radius: 1em;
    background-color: transparent;
    color: rgb(204 61 61);
    cursor: pointer;
    display: inline-flex;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 0.925rem;
    font-weight: 500;
    gap: 0.25em;
    padding: 0.25em 0.5em;

    &:hover {
      background-color: rgb(237, 237, 237);
    }
  }
}

.form-container {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

form:not(.button_to) {
  display: flex;
  flex-direction: column;
  gap: 2em;
  padding: 0.5em;

  .form-field:not([hidden]) {
    align-items: center;
    display: grid;
    gap: 0.75em;

    &:has(.color-select-wrapper),
    &:has(.sticker-select-wrapper) {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    label {
      display: none;
      font-weight: bold;
      justify-self: end;

      &:has(.color-swatch),
      &:has(.sticker-swatch),
      &:has(.sticker-none) {
        display: flex;
        justify-self: center;
      }
    }

    input,
    select {
      background-color: transparent;
      border: none;
      border-bottom: 2px solid rgba(112, 57, 26, 0.07);
      font-size: 1rem;
      font-weight: 500;
      padding: 0.5em 0.25em;

      &:focus {
        border-bottom: 2px solid rgba(112, 57, 26);
        outline: none;
      }

      &[type="time"] {
        font-family: "Inter", sans-serif;
        font-weight: 300;
      }
    }

    select {
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(112, 57, 26, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
      background-repeat: no-repeat;
      background-position: right 0.5em center;
      background-size: 1em;
      padding-right: 2em;
    }
  }

  .form-field-row {
    display: flex;
    gap: 1em;

    .form-field {
      flex: 1;
    }
  }

  .color-select-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    padding: 0.5em 0.25em;
    width: 100%;

    .color-option {
      cursor: pointer;
      position: relative;
      margin: 0;
      padding: 0;

      input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0;
      }

      .color-swatch {
        display: block;
        width: 2.5em;
        height: 2.5em;
        border: 2px solid rgba(112, 57, 26, 0.07);
        border-radius: 0.25em;
        transition: all 0.15s ease;
      }

      input[type="radio"]:checked + .color-swatch {
        border-color: rgba(112, 57, 26, 0.8);
        box-shadow: 0 0 0 2px rgba(112, 57, 26, 0.15);
        transform: scale(1.05);
      }

      &:hover .color-swatch {
        transform: scale(1.05);
        border-color: rgba(112, 57, 26, 0.3);
      }
    }
  }

  .sticker-select-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(3.25em, 1fr));
    max-width: calc(7 * (2.75em + 0.5em));
    gap: 0.75em;

    .sticker-option {
      align-items: center;
      cursor: pointer;
      display: flex;
      justify-content: center;
      margin: 0;
      padding: 0;
      position: relative;

      img,
      .sticker-none {
        align-items: center;
        border-radius: 5em;
        display: flex;
        justify-content: center;
        transition: all 0.15s ease;
      }

      img {
        height: 2.75em;
        padding: 0.25em;
        width: 2.75em;
      }

      .sticker-none {
        color: rgba(112, 57, 26, 0.3);
        height: 2em;
        width: 2em;
      }

      input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0;
      }

      input[type="radio"]:checked + .sticker-swatch,
      input[type="radio"]:checked + .sticker-none {
        background: rgb(219 207 194);
        transform: scale(1.1);
      }

      &:hover .sticker-swatch,
      &:hover .sticker-none {
        background: rgb(234, 230, 226);
        transform: scale(1.05);
      }
    }
  }

  .form-actions {
    align-items: center;
    align-self: flex-end;
    display: flex;
    gap: 1em;
    width: max-content;

    a {
      border-bottom: 2px solid rgba(112, 57, 26, 0.07);
      color: rgb(79 79 79);
      text-decoration: none;

      &:hover {
        opacity: 0.4;
      }
    }
  }

  input[type="submit"] {
    border: none;
    border-radius: 0.25em;
    background-color: rgba(112, 57, 26, 0.07);
    cursor: pointer;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0.25em 0.5em;

    &:hover {
      opacity: 0.5;
    }
  }
}

.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1.5em;
  padding: 2em;

  h1 {
    color: rgb(112, 57, 26);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
  }

  p {
    margin: 0;
    text-align: center;
  }

  .form-container {
    background-color: rgb(255, 254, 252);
    border-radius: 10px;
    box-shadow: 0 3px 0 0 rgba(0, 0, 0, 0.25);
    gap: 1.5em;
    max-width: 30em;
    padding: 1em;
    width: 100%;
  }

  form {
    padding: 0;
  }

  .code-input {
    font-size: 1.5em !important;
    letter-spacing: 1em;
    text-align: center;
  }
}

.dev-mode {
  background: #dedede;
  border-radius: 0.5rem;
  padding: 1rem;
}
