/* IOVO field UI: shared styling for the technician surfaces (tech portal, Field Mode). Loaded after iovo-ui.css; every rule is
   scoped to html[data-ds] so a page without the design system keeps its own look. Tokens only, no raw colours.
   Pairs with iovo-field-ui.js (IovoField.statusTone sets data-tone on a pill). */

/* ── status pill: one tone per state, text always says the state ──
   Fills blend with the opaque surface (same recipe as .ds-pill) so AA contrast holds on every surface. */
html[data-ds] :is(.fd-pill, .status-chip)[data-tone] {
  display: inline-flex; align-items: center; gap: var(--ds-space-1); min-height: 24px; max-width: 100%;
  padding: 2px var(--ds-space-2); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-pill);
  background: var(--ds-surface-2); color: var(--ds-text-2);
  font: var(--ds-weight-medium) var(--ds-text-xs)/1.25 var(--ds-font-sans); letter-spacing: 0; text-transform: none;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: normal; text-align: left;
}
html[data-ds] :is(.fd-pill, .status-chip)[data-tone]::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
html[data-ds] :is(.fd-pill, .status-chip)[data-tone="success"] { color: var(--ds-success); background: color-mix(in srgb, var(--ds-success) 12%, var(--ds-surface)); border-color: color-mix(in srgb, var(--ds-success) 30%, transparent); }
html[data-ds] :is(.fd-pill, .status-chip)[data-tone="warning"] { color: var(--ds-warning); background: color-mix(in srgb, var(--ds-warning) 12%, var(--ds-surface)); border-color: color-mix(in srgb, var(--ds-warning) 30%, transparent); }
html[data-ds] :is(.fd-pill, .status-chip)[data-tone="danger"] { color: var(--ds-danger); background: color-mix(in srgb, var(--ds-danger) 12%, var(--ds-surface)); border-color: color-mix(in srgb, var(--ds-danger) 30%, transparent); }
html[data-ds] :is(.fd-pill, .status-chip)[data-tone="info"] { color: var(--ds-info); background: color-mix(in srgb, var(--ds-info) 12%, var(--ds-surface)); border-color: color-mix(in srgb, var(--ds-info) 30%, transparent); }

/* ── big touch targets for gloved hands, phone and tablet ── */
@media (pointer: coarse) {
  html[data-ds] .fd-touch { min-height: 48px; }
  html[data-ds] .ds-sidepanel-close { min-width: var(--ds-hit); min-height: var(--ds-hit); }
}

/* ── detail drawer: a page-owned element shown inside the side panel (IovoField.adoptDetail) ── */
html[data-ds] .ds-sidepanel-body > .fd-detail,
html[data-ds] .ds-sidepanel-body > [data-fd-detail] { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* The pocket disclosure is specific to Field Mode; tech surfaces stay unchanged. */
.fm-pocket-menu { display:none; }
.fm-pocket .fm-pocket-menu { display:block; flex:0 0 auto; }
.fm-pocket-menu summary { list-style:none; cursor:pointer; }
.fm-pocket-menu summary::-webkit-details-marker { display:none; }
#fmPocketMenuLabel { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
html:not([lang="es"]) #fmPocketMenuLabel [lang="es"],
html[lang="es"] #fmPocketMenuLabel [lang="en"] { display:none; }
