/* Buy, make and move Preview pages (omni237 AB4 to AB9): layout only, on pack tokens. The components
   are SM360.UI's; nothing here restyles one. Class names start bmm- so they cannot meet another
   Preview family's rules. */
.bmm { display: flex; flex-direction: column; gap: 16px; }
.bmm-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; font-size: 0.8125rem; color: var(--sm360-text-muted); }
.bmm-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bmm-two { display: grid; gap: 16px; align-items: start; }
.bmm-two > * { min-width: 0; }
.bmm-two-narrow-right { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.bmm-two-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.bmm-two-board { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.bmm-two-runs { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.bmm-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bmm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bmm-hint, .bmm-muted { font-size: 0.8125rem; color: var(--sm360-text-muted); }
.bmm-muted { margin: 8px 0 0; }
.bmm-body { margin: 0; font-size: 0.875rem; line-height: 1.55; }
.bmm-h3 { margin: 14px 0 6px; font-size: 0.875rem; font-weight: 600; }
.bmm-mono { font-family: var(--sm360-font-mono, ui-monospace, monospace); font-size: 0.8125rem; }
.bmm-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.bmm-list > li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--sm360-border-primary); font-size: 0.875rem; }
.bmm-list > li:last-child { border-bottom: 0; }
.bmm-cell-name { display: block; font-weight: 500; font-size: 0.875rem; }
.bmm-cell-sub { display: block; font-size: 0.75rem; color: var(--sm360-text-muted); }
.bmm-same { font-style: italic; color: var(--sm360-text-muted); }
.bmm-flag { display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--sm360-warning, var(--sm360-text-secondary)); }
.bmm-low { color: var(--sm360-warning, var(--sm360-text-secondary)); }
.bmm-short { font-weight: 600; color: var(--sm360-warning, var(--sm360-text-secondary)); }
.bmm-was { margin-right: 6px; font-size: 0.75rem; color: var(--sm360-text-muted); text-decoration: line-through; }
.bmm-kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 0.875rem; border-bottom: 1px solid var(--sm360-border-primary); }
.bmm-kv:last-child { border-bottom: 0; }
.bmm-kv > span:first-child { color: var(--sm360-text-secondary); min-width: 0; }
.bmm-kv > span:last-child { text-align: right; min-width: 0; }
.bmm-total { border-top: 1px solid var(--sm360-border-primary); font-weight: 600; margin-top: 8px; }
.bmm-bar { width: 100%; height: 8px; margin: 6px 0; accent-color: var(--sm360-action, var(--sm360-primary)); }
.bmm-gate { display: flex; flex-direction: column; gap: 12px; padding: 8px; }
.bmm-gate-title { margin: 6px 0 0; font-size: 1.25rem; font-weight: 600; }

/* A day cell of the production board: the runs of one bench on one day, with the bench-hours bar. */
.bmm-day-cell { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.bmm-day-cell .sm360-btn { display: block; width: 100%; padding: 6px 8px; text-align: left; }
.bmm-run, .bmm-run-row { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.bmm-run-row { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; width: 100%; }

/* Selectable lists of the SDK's buttons (AB4 rows, AB9 runs). */
.bmm .sm360-btn[aria-pressed="true"] { background: var(--sm360-action, var(--sm360-primary, var(--sm360-teal))); border-color: var(--sm360-action, var(--sm360-primary, var(--sm360-teal))); color: var(--sm360-action-ink, var(--sm360-tenant-on-brand, #ffffff)); }

@media (max-width: 720px) {
    .bmm-two-narrow-right, .bmm-two-even, .bmm-two-board, .bmm-two-runs { grid-template-columns: minmax(0, 1fr); }
}

/* W12a: the carrier's Delivery card on an order (omni237 W12a). The proof tiles, the way-forward list
   and the link are layout only; the card itself is the SDK's section card. */
.bmm-link { color: var(--sm360-link, var(--sm360-action, var(--sm360-primary))); text-decoration: underline; overflow-wrap: anywhere; }
.bmm-proofs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 12px 0 6px; }
.bmm-proof { display: flex; align-items: flex-end; min-height: 96px; padding: 8px; border: 1px solid var(--sm360-border-primary); border-radius: 8px; background: var(--sm360-bg-secondary); }
.bmm-proof-label { font-family: var(--sm360-font-mono, ui-monospace, monospace); font-size: 0.75rem; }
.bmm-note-warn { border-left: 3px solid var(--sm360-warning, var(--sm360-border-primary)); padding-left: 10px; margin: 8px 0; }
.bmm-ways { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bmm-way { padding: 8px 12px; border: 1px solid var(--sm360-border-primary); border-radius: 8px; }
.bmm-way-on { border-color: var(--sm360-action, var(--sm360-primary)); }
.bmm-way label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.bmm-way-body { display: flex; flex-direction: column; min-width: 0; }

/* Touch targets (omni237#2034 round 2): every control a person taps on a Preview page is at least
   44 x 44 CSS px. The SDK draws its buttons, tabs and inputs at 29 to 43 px (platform debt:
   ThruuAi/sm360-sdk#844, see sm360-sdk-target-size-debt.css), so the Preview pages raise them
   here, scoped to the two Preview page roots and sized by one token. */
.bmm, .omni-preview { --portal-target-min: 44px; }
:is(.bmm, .omni-preview) :is(
    .sm360-btn,
    .sm360-tab,
    .sm360-autonomy-option,
    .sm360-toggle,
    .sm360-form-input,
    .sm360-form-select,
    .sm360-search-input,
    .sm360-grid-picker-reset,
    .sm360-grid-picker-item,
    .sm360-th-sort) {
    min-height: var(--portal-target-min);
    min-width: var(--portal-target-min);
}
/* Links get the same box: inline-flex so the floor holds without moving their text. */
:is(.bmm, .omni-preview) :is(a.sm360-breadcrumb-item, .sm360-link, a[data-testid], a.bmm-mono) {
    display: inline-flex;
    align-items: center;
    min-height: var(--portal-target-min);
    min-width: var(--portal-target-min);
}
:is(.bmm, .omni-preview) label:has(> input:is([type="checkbox"], [type="radio"])) {
    min-height: var(--portal-target-min);
    align-items: center;
}
