/*
 * A short validation message under a control that the form states before
 * anything is submitted ("A quarter needs a year first."): caption size, in
 * negative red, set a little apart from the control. Server-side errors keep
 * .field-error (forms.css).
 */
@layer components {
  .field-message {
    display: block;
    margin-block-start: var(--space-2);
    font: var(--text-caption);
    color: var(--color-negative);
  }

  /*
   * A warning the page states about existing data, not a field error: the
   * attention role (DESIGN.md §2.3) -- the orange mark on the edge, ink text
   * on the tinted surface, never orange text. Same look as
   * .resource-detail__warning on a financial resource's page.
   */
  .field-message--warning {
    padding: var(--space-3) var(--space-5);
    border-inline-start: var(--space-1) solid var(--color-attention);
    border-radius: var(--radius-s);
    background: var(--color-attention-surface);
    color: var(--color-text);
    font: var(--text-small);
  }
}
