/* ============================================
   xm-form — field aggregator / orchestrator (Story 2.10).

   Layout-only chrome: a vertical stack of slotted fields with consistent --s-N
   gaps so fields of the same `size` align (NFR-22). xm-form has NO surface of
   its own and no bespoke color tokens — each child renders its own XmField
   chrome, which the form must never restyle (AD-7 / AD-12).

   BEM block: `form`. Registered in scripts/check-bem.sh STRICT_BLOCKS.
   ============================================ */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

/* The slotted action row (a button or button group) sits at the foot of the
   stack; authors mark it with slot="action" if they want it grouped + set off
   from the fields by a single hairline (the system's 1px rule — no surface, just
   a divider). Default flow already stacks it under the last field. */
.form ::slotted([slot="action"]) {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  margin-top: var(--s-2);
  padding-top: var(--s-4);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}
