/* Shared by the Astro, React and Vanilla Field variants. */

.exo-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--exo-space-2, 6px);
  min-width: 0;
  margin: 0;
  padding: 0;
  font-family: var(--exo-font-family-sans, system-ui, sans-serif);
  line-height: var(--exo-font-line-height-snug, 1.25);
  color: var(--exo-color-text, #333333);
  border: 0;
}

/* Controls in a group, and full-width controls, stretch across the field. */
.exo-field--group {
  align-items: stretch;
}

.exo-field > .exo-input--full,
.exo-field > .exo-input-group--full,
.exo-field > .exo-select--full,
.exo-field > .exo-textarea--full {
  align-self: stretch;
}

.exo-field__label {
  padding: 0;
  font-size: var(--exo-font-size-sm, 14px);
  font-weight: var(--exo-font-weight-semibold, 600);
}

/* A <legend> sits outside the fieldset's flex layout, so it takes the gap as a margin. */
.exo-field--group > .exo-field__label {
  margin-bottom: var(--exo-space-2, 6px);
}

.exo-field__required {
  color: var(--exo-color-danger, #b3261e);
}

.exo-field__hint,
.exo-field__error {
  margin: 0;
  font-size: var(--exo-font-size-xs, 12px);
}

.exo-field__hint {
  color: var(--exo-color-text-muted, #666666);
}

.exo-field__error {
  color: var(--exo-color-danger, #b3261e);
}
