/* tasks/075 — excursion "build the day" board (Board A spine + Board C grid).
   Board A rides the shared .hos-spine / .hos-runcard family from
   transport_board.css; this sheet only adds the excursion-local chrome:
   the layout shell, the Needs-a-trip queue, the segmented toggle, and Board C's
   card grid. Tokens only — no raw hex, no dark:. */

/* The Timeline/Cards view switch uses the gem's .os-segmented inside the
   .os-page-tools band (see index.html.erb) — no local toggle component. */

/* Board content column below the page-tools band. */
.hos-exc-body { display: flex; flex-direction: column; gap: 18px; }

/* --- "Fixed schedule — not built" panel (transport parity) --- */
.hos-exc-unbuilt { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.hos-exc-unbuilt__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hos-exc-unbuilt__cta { margin: 0; }
.hos-exc-unbuilt__rows { display: flex; flex-direction: column; gap: 6px; }
.hos-exc-unbuilt__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-md);
  opacity: 0.9;
}
.hos-exc-unbuilt__name { flex: 1; font-weight: 600; color: var(--ink); font-size: var(--text-sm); }

/* --- Board A: the spine, full width (the To-place rail is now the Needs-a-trip
   queue above the tiles, option A revised) --- */
.hos-exc-boarda { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.hos-exc-boarda .os-empty-state { padding: var(--space-6) var(--space-4); }
.hos-exc-dchip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.hos-exc-dchip + .hos-exc-dchip { margin-top: 8px; }
.hos-exc-dchip__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hos-exc-dchip__name { font-weight: 600; color: var(--ink); font-size: var(--text-sm); }
.hos-exc-dchip__sub { color: var(--muted); font-size: var(--text-xs); }

/* --- Board C: departure card grid --- */
.hos-exc-cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.hos-exc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}
.hos-exc-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hos-exc-card__title { font-weight: 600; color: var(--ink); font-size: var(--text-base); }
.hos-exc-card__meta { color: var(--muted); }
.hos-exc-card__cap { margin-top: 2px; }
.hos-exc-card__crew {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.hos-exc-card--add {
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--hairline-strong, var(--hairline));
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: var(--text-sm);
  min-height: 120px;
  gap: 6px;
}
.hos-exc-card--add:hover { color: var(--accent-strong); border-color: var(--accent); }

/* --- Board C: To-place strip --- */
.hos-exc-strip { margin-top: 18px; padding: 14px 16px; }
.hos-exc-strip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.hos-exc-strip__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hos-exc-dchip--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
}

/* --- "Add a one-off departure": a ghost button that opens the drawer (flow 12b).
   The ghost's own inline padding is pulled back so its glyph lines up with the
   board's left edge. --- */
.hos-exc-addrow { display: flex; }
.hos-exc-addrow .os-btn { margin-left: calc(-1 * var(--space-3)); }

/* --- Needs a trip (option A revised, locked 2026-10-29) ---
   The os-ds table (.os-table.hos-datatable, card stack under 640px) with the
   #485 .hos-runanchor spine in each row's first cell. Only the bits the gem has
   no word for live here: the late (red) text, the bare type glyph, the tinted
   just-booked row (flow 13), the show-more control and the quiet bar. */
/* Clears the sticky page head + tools band when the rail badge lands here (flow 14). */
.hos-needs-trip, .hos-needs-trip__quiet { scroll-margin-top: 220px; }
.hos-needs-trip { display: flex; flex-direction: column; }
.hos-needs-trip__late { color: var(--danger); font-weight: 600; }
.hos-needs-trip__exc { display: flex; align-items: center; gap: var(--space-3); }
.hos-needs-trip__glyph { display: inline-flex; flex: none; color: var(--muted); }
.hos-datatable tr.hos-row--new > td { background: var(--warning-bg); }
.hos-needs-trip__more { align-self: center; margin-top: var(--space-3); }
.hos-needs-trip__foot { margin: var(--space-3) 0 0; text-align: center; font-size: var(--text-sm); }
.hos-needs-trip__foot .os-link { display: inline-flex; align-items: center; gap: var(--space-1); }
.hos-needs-trip__quiet {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); color: var(--ink); text-decoration: none; font-size: var(--text-sm);
}
.hos-needs-trip__quiet-text { flex: 1; min-width: 0; color: var(--muted); }
.hos-needs-trip__quiet-text strong { color: var(--ink); font-weight: 600; }
.hos-needs-trip__go { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--accent); font-weight: 500; }

/* --- Mobile (≤640px). ONLY the board's own components are adjusted here:
   2-col KPIs, the To-place rail full-width below the timeline, single-column
   card grid. The shared .hos-spine / .hos-runcard (transport_board.css) and the
   gem's os-page-head are NOT overridden locally — their mobile treatment is a
   shared/os-ds concern, not a per-page hack (see DECISIONS / tasks/075). --- */
@media (max-width: 640px) {
  .os-stat-card-grid.hos-exc-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .hos-exc-boarda { gap: var(--space-4); }
  .hos-exc-boarda__spine { min-width: 0; }

  .hos-exc-cardgrid { grid-template-columns: 1fr; }
  .hos-exc-strip__head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
