.Form {
  --gap: 24px;
  margin-bottom: 32px;

  &:last-child {
    margin-bottom: 0;
  }
}
.Form, .Form-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
}
.Form-header {
  &:empty {
    display: none;
  }

  > label {
    font-weight: bold;
    color: var(--muted-color);
  }
}

.Form--centered {
  text-align: center;

  .FormControl[type=text],
  .FormControl[type=email],
  .FormControl[type=password],
  .Button {
    margin: 0 auto;
    text-align: center;
    height: 50px;
    padding: 15px 20px;
    font-size: 15px;

    @media @phone {
      font-size: 16px; // minimum font-size required to prevent page zoom on focus in iOS 10
    }
  }

  > *, > .Form-body > * {
    width: 100%;
  }

  &, .Form-body {
    --gap: 12px;
  }
  .checkbox {
    text-align: left;
  }
}

.Form-group, .FieldSet, .FieldSet-items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.FieldSet, .FieldSet-items, .Form, .Form-body {
  > * {
    width: 100%;
    margin-bottom: 0;
  }
}

.FieldSet-label:empty {
  display: none;
}

.FieldSet--min .FieldSet-items > * {
  width: auto;
}

.FieldSet--col .FieldSet-items, .Form-controls {
  flex-wrap: wrap;
  flex-direction: row;
  gap: 5px;

  > * {
    min-width: unset;
  }
}

.Form-group, .FieldSet {
  gap: 10px;
}

.Form-group--danger {
  border: 2px solid var(--alert-error-bg);
  border-radius: var(--border-radius);
  background-color: transparent;
}

.FieldSet-items {
  width: 100%;
  gap: 5px;

  .FieldSet--form & {
    gap: 24px;
  }
}

.Form-group > label, .FieldSet-label {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-color);
  display: block;
}

.helpText {
  font-size: 12px;
  line-height: 1.5em;
  color: var(--muted-color);
  margin: 0;
}
