.ez_field {
  display: flex;
  flex-direction: column;
  gap: var(--ez-space-1);
}

/* Labels of fields that have no floating box (checkbox rows, standalone) */
.ez_field__label {
  font-weight: var(--ez-font-weight-medium);
}

/* Supporting text sits under the outline, inset to line up with the text inside the field */
.ez_field__hint,
.ez_field__error {
  padding-inline: var(--ez-space-4);
  font-size: var(--ez-font-size-xs);
}

.ez_field__hint {
  color: var(--ez-color-text-muted);
}

.ez_field__error {
  color: var(--ez-color-danger);
  font-weight: var(--ez-font-weight-medium);
}

.ez_field__warn {
  padding-inline: var(--ez-space-4);
  color: var(--ez-color-on-warning-container);
  font-size: var(--ez-font-size-xs);
  font-weight: var(--ez-font-weight-medium);
}

.ez_field__warn::before {
  content: "Note: ";
}

.ez_form-summary {
  padding: var(--ez-space-3) var(--ez-space-4);
  background: var(--ez-color-danger-container);
  color: var(--ez-color-on-danger-container);
  border-radius: var(--ez-radius-md);
  font-weight: var(--ez-font-weight-medium);
}

.ez_field__error::before {
  content: "Error: ";
}

.ez_check {
  display: flex;
  align-items: center;
  gap: var(--ez-space-2);
}

/* The "i" button on a field opens its explanation and an example. It sits inside the box, at the end of the first line. */
.ez_field__info {
  position: absolute;
  inset-block-start: 0.375rem;
  inset-inline-end: 0.375rem;
  display: inline-flex;
  padding: 0.25rem;
  background: none;
  border: 0;
  border-radius: var(--ez-radius-pill);
  color: var(--ez-color-text-muted);
  cursor: pointer;
}

.ez_field__info .ez_icon { inline-size: 1.125rem; block-size: 1.125rem; }
.ez_field__info:hover,
.ez_field__info[aria-expanded="true"] { background: var(--ez-color-surface-container-high); color: var(--ez-color-action-primary); }

/* selects and date fields draw their own icon at the end, so the button moves in beside it */
.ez_field__box--select .ez_field__info,
.ez_field__box:has(input[type="date"]) .ez_field__info { inset-inline-end: 2.5rem; }

.ez_field--help .ez_input { padding-inline-end: 2.75rem; }

.ez_field__help {
  margin-block-start: var(--ez-space-2);
  padding: var(--ez-space-3) var(--ez-space-4);
  background: var(--ez-color-info-container);
  color: var(--ez-color-on-info-container);
  border-radius: var(--ez-radius-md);
  font-size: var(--ez-font-size-sm);
  animation: ez-pop-in 140ms ease-out;
}

.ez_field__help[hidden] { display: none; }
.ez_field__help p { margin: 0; }
.ez_field__example { margin-block-start: var(--ez-space-1); }
