.pseudo-form,
form {
  & h2 {
    font-weight: 600;
    font-size: 1.15rem;
  }

  & fieldset {
    border: none;
    padding: 0;
    margin-bottom: 1rem;
  }

  & fieldset:has(.is-required) legend::after {
    content: "*";
    margin-left: 1px;
  }

  & > fieldset {
    margin-top: 2rem;
  }

  & label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;

    &.is-required::after {
      content: "*";
      margin-left: 1px;
    }
  }

  & .fields {
    display: flex;
    gap: 1rem;
  }

  & .field {
    flex: 1;
    margin-bottom: 1rem;
  }

  & fieldset {
    legend {
      font-weight: 500;
      margin-bottom: 0.5rem;
    }
  }

  & fieldset.collapsed {
    margin-bottom: 1rem;
  }

  & .checkbox,
  & .radio-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;

    & label {
      font-weight: normal;
      margin-bottom: 0;
    }

    &.checkbox-inline {
      margin-bottom: 1.5rem;
    }
  }

  & input[type="text"],
  & input[type="email"],
  & input[type="number"],
  textarea {
    background-color: var(--custom-text-background-color);
    color: var(--custom-text-color);
    width: 100%;
    border-radius: 0.25rem;
    border: 1px solid var(--custom-border-color);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  & input[type="number"] {
    max-width: 100px;
  }

  & select {
    display: inline-block;
    background-color: var(--custom-text-background-color);
    border: 1px solid var(--custom-border-color);
    border-radius: 0.25rem;
    color: var(--custom-text-color);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    padding-right: 2rem;
    width: 100%;

    &.custom-appearance {
      appearance: none;
      background-repeat: no-repeat, repeat;
      background-position:
        right 0.7em top 50%,
        0 0;
      background-size:
        0.65em auto,
        100%;
    }
  }

  & .hint {
    font-size: 0.875rem;
    color: var(--custom-text-color-muted);
    margin-bottom: 0.5rem;
  }

  & input[type="submit"] {
    width: 100%;
  }

  & footer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
}

& form.button_to {
  padding: 0;
}

.btn-primary,
.btn-secondary {
  width: 100%;
}
