/* =============================================================================
   fastchange.css — the FastChange Rail (SMKK redesign fast-change foundation).
   ONE reusable affordance for drastic fast changes/overrides at any step: the 5 verbs
   (edit · override · reroute · undo · escalate) hang off any row/chip/cell/number that
   carries a `data-fastchange` contract. Row-inline strip on desktop, bottom SmkkSheet on
   phone. FLAT — not a bubbly popover. Presentation (css-now); fastchange.js reads the
   contract + renders/dispatches; per-entity POSTs + undo-replay are Codex build-loop.
   ============================================================================= */

/* the rail is hidden until the row is hovered/focused/selected (desktop) — no clutter */
.fc-host { position: relative; }
.fc-rail {
    display: inline-flex; align-items: center; gap: 2px;
    opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
.fc-host:hover > .fc-rail,
.fc-host:focus-within > .fc-rail,
.fc-host.fc-open > .fc-rail { opacity: 1; pointer-events: auto; }

.fc-verb {
    display: inline-flex; align-items: center; gap: 4px;
    min-height: 28px; padding: 0 8px;
    background: transparent; border: 1px solid transparent; border-radius: 6px;
    color: var(--smkk-spx-text-muted, #5b6b7a); font: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
.fc-verb:hover, .fc-verb:focus-visible {
    background: var(--smkk-spx-surface-hover, rgba(47, 109, 90, .08));
    color: var(--smkk-spx-text, #1f2933); outline: none;
}
.fc-verb--danger:hover { color: var(--smkk-spx-danger-text, #b3261e); }
.fc-verb__icon { font-size: 13px; line-height: 1; }

/* T1: the optimistic-commit UNDO strip (appears after a change, auto-dismiss) */
.fc-undostrip {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
    z-index: 80; display: inline-flex; align-items: center; gap: 12px;
    padding: 8px 12px; border-radius: 8px;
    background: var(--smkk-spx-text, #1f2933); color: #fff; font-size: 13px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}
.fc-undostrip button { background: none; border: 0; color: #7fd3b4; font-weight: 800; cursor: pointer; }

/* reason-required override: the control stays disabled until a reason is typed */
.fc-reason { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.fc-reason input, .fc-reason textarea { font-size: 16px; }
.fc-reason [data-fc-commit][disabled] { opacity: .5; pointer-events: none; }

/* T3: before → after diff sheet (destructive/high-tier) */
.fc-diff { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 8px; }
.fc-diff__before { color: var(--smkk-spx-text-muted, #5b6b7a); text-decoration: line-through; }
.fc-diff__after { color: var(--smkk-spx-success-text, #1a7a44); font-weight: 700; }

/* phone: the rail is a bottom sheet of full-width verb rows (reuses SmkkSheets look) */
@media (max-width: 760px) {
    .fc-rail { opacity: 1; pointer-events: auto; }               /* always reachable on phone */
    .fc-rail--sheet { position: fixed; inset: auto 0 0 0; z-index: 80; flex-direction: column;
        background: var(--smkk-spx-surface-elevated, #fff); border-radius: 12px 12px 0 0;
        padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px); box-shadow: 0 -6px 24px rgba(15, 23, 42, .18); }
    .fc-rail--sheet .fc-verb { width: 100%; min-height: 48px; font-size: 15px; justify-content: flex-start; }
}
