/* Schedule a Trip (assets/nscc-schedule-trip.js; docs/NSCC_PLANNER_DESIGN.md §3.1). One colour language
   with the planners: green OK · amber expires soon / already booked · ROSE needs approval (Mark,
   2026-10-18: purple already means assigned / en route) · red not available · dashed grey not
   assigned yet. Text takes the status inks (shared-tokens.css §10); rose is the one new ink, with a
   light default and a dark-theme value. */
:root { --nscc-approval-ink: #c2185b; }
html.dark[data-nscc-theme] { --nscc-approval-ink: #f48fb1; }
.nscc-st { max-width: 1120px; width: 100%; }
.nscc-st-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.nscc-st-form { display: grid; gap: 10px; min-width: 0; }
.nscc-st-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nscc-st-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.nscc-st-seg button { border: 0; background: transparent; padding: 4px 10px; cursor: pointer; font: inherit; color: inherit; }
.nscc-st-seg button[aria-pressed="true"] { background: var(--text-primary); color: var(--bg-primary, #fff); }
.nscc-st-seg button:disabled { opacity: .45; cursor: not-allowed; }
.nscc-st-grp { border: 0; border-top: 1px solid var(--border); margin: 0; padding: 8px 0 0; min-width: 0; display: grid; gap: 6px; }
.nscc-st-grp legend { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-secondary); padding: 0 6px 0 0; }
.nscc-st-row { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.nscc-st-jobs { display: flex; flex-wrap: wrap; gap: 6px; }
.nscc-st-job { border: 1px solid var(--border); background: transparent; border-radius: 4px; padding: 5px 9px; cursor: pointer; font: inherit; color: inherit; }
.nscc-st-job[aria-pressed="true"] { border-color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
.nscc-st-slots { display: grid; gap: 6px; }
.nscc-st-slot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; }
/* Label, picker and status chip stack: side by side, in the form's narrow crew column, the label and chip squeezed
   the picker to its arrow and hid the chosen name (e2e test, 2026-10-18). */
.nscc-st-slot .nscc-st-chip { justify-self: start; }
.nscc-st-slot .form-label { margin: 0; }
.nscc-st-slot-empty select { border-style: dashed; }
.nscc-st-slot-pickup { border-left: 4px solid var(--status-secure, #34C759); }
.nscc-st-slot-delivery { border-left: 4px solid var(--status-transit, #007AFF); }
.nscc-st-legs { display: flex; flex-wrap: wrap; gap: 6px; }
.nscc-st-chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: 1px 6px; border-radius: 3px; white-space: nowrap; border: 1px solid transparent; }
.nscc-st-chip:empty { display: none; }
.nscc-st-chip-ok { color: var(--status-secure-ink, #176a2d); border-color: currentColor; }
.nscc-st-chip-warn { color: var(--status-pending-ink, #8a4c00); border-color: currentColor; }
.nscc-st-chip-appr { color: var(--nscc-approval-ink); border-color: currentColor; }
.nscc-st-chip-bad { color: var(--status-unassigned-ink, #ad1f15); border-color: currentColor; }
.nscc-st-chip-open { color: var(--text-secondary); border: 1px dashed var(--text-secondary); background: transparent; }
.nscc-st-chip-leg1 { color: var(--status-secure-ink, #0f766e); border-color: currentColor; }
.nscc-st-chip-leg2 { color: var(--status-transit-ink, #0b5bc2); border-color: currentColor; }
.nscc-st-more { border-top: 1px solid var(--border); padding-top: 8px; }
.nscc-st-more summary { cursor: pointer; font-weight: 600; }
.nscc-st-muted { color: var(--text-secondary); font-weight: 400; }
.nscc-st-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 10px; }
.nscc-st-side { display: grid; gap: 8px; position: sticky; top: 8px; border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; }
.nscc-st-side-h { font-size: .8rem; margin: 0; }
.nscc-st-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .8rem; }
.nscc-st-checks li { padding-left: 10px; border-left: 3px solid var(--border); }
.nscc-st-check-ok { border-left-color: var(--status-secure, #34C759) !important; }
.nscc-st-check-expiring, .nscc-st-check-missing, .nscc-st-check-booked { border-left-color: var(--status-pending, #FF9500) !important; }
.nscc-st-check-approval { border-left-color: var(--nscc-approval-ink) !important; }
.nscc-st-check-refused { border-left-color: var(--status-unassigned, #FF3B30) !important; }
.nscc-st-approval { border: 1px solid var(--nscc-approval-ink); border-radius: 5px; padding: 8px 10px; display: grid; gap: 6px; font-size: .8rem; }
.nscc-st-confirm { display: flex; gap: 6px; align-items: flex-start; font-size: .8rem; }
.nscc-st-copylist { display: grid; gap: 4px; }
.nscc-st-copyrow { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr) 140px; gap: 8px; text-align: left; border: 1px solid var(--border); background: transparent; border-radius: 4px; padding: 5px 8px; cursor: pointer; font: inherit; color: inherit; }
.nscc-st-copyrow[aria-pressed="true"] { border-color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
.nscc-st-copied { font-size: .8rem; border-left: 3px solid var(--text-primary); padding: 6px 10px; }
/* A problem under its own field (shown once Save has been tried), and the Esc-again note. */
.nscc-st-err { display: block; font-size: .78rem; color: var(--status-unassigned-ink, #ad1f15); }
.nscc-st-err:empty { display: none; }
.nscc-st-esc { font-size: .8rem; color: var(--text-secondary); margin-right: auto; }
.nscc-st-waiting { display: grid; gap: 10px; padding: 12px 4px; }
/* Extra stops on a 1-person trip (D-9): one row per stop, in order, then + Add stop. */
.nscc-st-stops { display: grid; gap: 6px; justify-items: start; }
.nscc-st-stop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; width: 100%; }
.nscc-st-stop .form-label { margin: 0; }
/* "+2 stops" and the arrival slot under a Dispatch List cell (assets/nscc-live-ops.js) - this file is loaded
   with the console, the flag only decides whether the window opens. */
.nscc-trip-extra { display: block; font-size: .72rem; font-weight: 600; color: var(--text-secondary); white-space: normal; }
.nscc-copy-review-row { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid var(--border); }
.nscc-copy-review-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; }
@media (max-width: 900px) {
    .nscc-st-grid { grid-template-columns: minmax(0, 1fr); }
    .nscc-st-side { position: static; }
}
@media (max-width: 560px) {
    .nscc-st-copyrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
