/* tasks/075 — excursion roster (trip detail). Read-first detail surface on the
   shared .hos-body / .hos-rail (reservation_details.css) + os-ds cards/chips/
   avatars. HotelOS-local .hos-exc-* glue only; NO new .os-* families, tokens
   only (no raw hex, no dark:).

   Type discipline (matches the reservation-details read surface):
   · canvas section label + in-card micro-label → .os-eyebrow (10/600/upper/muted)
   · row name → 14/600 ink   · meta → 12/400 muted (Inter, NOT mono)
   · mono is reserved for genuine numerics (headcount, capacity). */

.hos-exc-main { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.hos-exc-sect { margin: 2px 0 -4px; }            /* canvas eyebrow above a card */
.hos-exc-pad  { padding: 16px; }
.hos-exc-rows { display: grid; }                 /* passenger list — rows w/ dividers */
.hos-exc-danger { color: var(--danger); }
.hos-exc-noshow { opacity: 0.55; }

/* ── Vessel + captain — read-first rows w/ in-place view↔edit swap ─────── */
.hos-exc-vic {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--surface-alt); color: var(--accent-strong);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.hos-exc-avatar--empty { color: var(--muted); background: var(--surface-alt); }
.hos-exc-arow + .hos-exc-arow {
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--hairline-2);
}
.hos-exc-arow__head {
  display: flex; align-items: center; gap: 13px; min-width: 0;
}
.hos-exc-arow__id { flex: 1; min-width: 0; }
.hos-exc-arow__name { font-size: var(--text-base); font-weight: 600; color: var(--ink); }
.hos-exc-arow__name--muted { color: var(--muted); font-weight: 500; }
/* Change / Assign — the gem ghost --sm button (#510), pushed to the row's end. */
.hos-exc-arow__trig { margin-left: auto; flex: none; }

/* Edit swap: icon stays fixed, the form fills the name area in place. */
/* .hos-exc-arow__head sets display:flex, which (as an author rule) beats the UA
   [hidden]{display:none}. Re-assert hidden here so BOTH the view (hidden while
   editing) and the edit panel (hidden until inline-edit#open) actually collapse
   — the controller toggles the [hidden] attr on each. */
.hos-exc-arow__head[hidden] { display: none; }
.hos-exc-arow__edit { align-items: flex-start; }
.hos-exc-arow__form { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.hos-exc-arow__edit-main { display: flex; align-items: center; gap: 8px; }
.hos-exc-arow__select { flex: 1; min-width: 0; }
/* Inline-editor control row: the enhanced select / number input sit on the 46px
   field baseline (--control-h-field), so their inline Save/Cancel must match —
   the gem's --sm buttons floor at 32px and read as short next to a field. Pin
   every control in these rows to one height so they line up as a single group. */
.hos-exc-arow__edit-main .os-btn,
.hos-exc-hcform .os-btn { min-height: var(--control-h-field); }

/* ── Crew / captain entity chip (DS auto-height .os-chip--entity) ─────── */
.hos-exc-crewrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* One step larger than the gem default: default avatar + text-sm name, roomier pad. */
.hos-exc-chip { padding: 8px 12px; }
.hos-exc-chip .os-chip__name { font-size: var(--text-sm); }

/* ── Passenger row (os-profile-row) — one status, one primary, overflow ── */
.hos-exc-prow {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; min-width: 0;
}
.hos-exc-prow + .hos-exc-prow { border-top: 1px solid var(--hairline-2); }
.hos-exc-prow__info { flex: 1 1 auto; min-width: 0; }
.hos-exc-prow__name { font-size: var(--text-sm); font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hos-exc-prow__meta { font-size: var(--text-xs); color: var(--muted); margin-top: 1px; }
.hos-exc-prow__end { flex: none; display: flex; align-items: center; gap: 8px; }

/* tiny signed-waiver tick (no control needed once signed) */
.hos-exc-wvok { display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); color: var(--confirmed); }

/* The ⋮ row menu is the shared .hos-rowmenu (hotelos_ds/components.css, #510). */
.hos-exc-inlineform { margin: 0; }
.hos-exc-inlineform .os-btn { width: 100%; }

/* empty / legacy */
.hos-exc-empty { padding: 20px 4px; text-align: center; }
.hos-exc-empty__cta { margin-top: 12px; }
.hos-exc-subsect { margin: 14px 0 6px; }
.hos-exc-legacyrow { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 4px; }
.hos-exc-legacyrow + .hos-exc-legacyrow { border-top: 1px solid var(--hairline-2); }
.hos-exc-legacyrow__count { color: var(--muted-2); font-weight: 400; }
/* FIX 2 — booked-but-unplaced "ghost" rows read as pending, not placed. */
.hos-exc-ghostrow { opacity: 0.85; }
.hos-exc-ghostrow .hos-exc-prow__name { color: var(--muted); }

/* ── Assignment / inline form fields ──────────────────────────────────── */
.hos-exc-field { display: flex; flex-direction: column; gap: 4px; }
.hos-exc-field .os-field-select { width: 100%; }
.hos-exc-override { display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); color: var(--muted); }

/* crew add — a ghost "Add crew" button that swaps in the picker (inline-edit, #510) */
.hos-exc-addcrew-wrap {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline-2);
}
.hos-exc-addcrew {
  display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px;
}
.hos-exc-addcrew .hos-exc-field { flex: 1 1 160px; min-width: 0; }
.hos-exc-addcrew__submit { flex: none; }
.hos-exc-allset { font-size: var(--text-xs); color: var(--muted);
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline-2); }

/* ── Rail: dispatch headcount (flat rows, NO card-in-card) ────────────── */
.hos-exc-railhead { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px; }
.hos-exc-cardlabel { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.hos-exc-hcrow { padding: 10px 0; }
.hos-exc-hcrow + .hos-exc-hcrow { border-top: 1px solid var(--hairline-2); }
.hos-exc-hcrow__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hos-exc-hcrow__by { margin-top: 2px; }
.hos-exc-hcread { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.hos-exc-hcread__num { font-size: var(--text-md); font-weight: 600; }
.hos-exc-hcread__unit { font-size: var(--text-xs); color: var(--muted); }
.hos-exc-hcnone { font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }
.hos-exc-hcedit__trig { margin-top: 8px; }
.hos-exc-hcform { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.hos-exc-hcnum { width: 90px; }

/* capacity + trip */
.hos-exc-caprow { display: flex; align-items: center; }
.hos-exc-capmeta { margin-top: 10px; }
/* Trip — the state pills read as a header, divided from the action block below
   so the lifecycle buttons sit on a grounded footer instead of floating in the
   card body. */
.hos-exc-triprow {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 0; padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline-2);
}
.hos-exc-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
/* Minor actions: a quiet grouped footer under the single primary. Each is a
   contained, centred half — a light hairline border gives them enough weight to
   read as a pair of buttons, not two ghost labels stranded at opposite edges of
   the card (the "floating" the primary divider alone didn't cure). Still visibly
   subordinate to the teal primary.
   The Cancel side is a button_to <form> while New booking is a bare <a>; that
   asymmetry made the anchor render short + narrow ("collapsed"). Collapse the
   form's box with display:contents so BOTH the <button> and the <a> are direct
   flex children of the row and take the same sizing rule — identical 46px halves. */
.hos-exc-acts__minor { display: flex; gap: 8px; align-items: stretch; }
.hos-exc-acts__minor .hos-exc-actform { display: contents; }
.hos-exc-acts__minor .os-btn {
  flex: 1 1 0; min-width: 0;
  justify-content: center;
  min-height: var(--control-h-field);
  border: 1px solid var(--hairline-strong);
}
.hos-exc-act--wide { width: 100%; }
.hos-exc-actform { margin: 0; }
.hos-exc-actform.hos-exc-grow { flex: 1; }
.hos-exc-grow { flex: 1; min-width: 0; justify-content: center; }
.hos-exc-finalize { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.hos-exc-reopen { display: flex; gap: 8px; align-items: center; margin: 0; }

/* #510 — on a phone the row's end block takes its own full-width line under the
   name (waiver · status · action from the left edge), and ⋮ is pushed right. */
@media (max-width: 640px) {
  .hos-exc-prow { flex-wrap: wrap; row-gap: 10px; }
  .hos-exc-prow > .hos-exc-prow__end { flex: 1 1 100%; flex-wrap: wrap; }
  .hos-exc-prow > .hos-exc-prow__end > .hos-rowmenu:last-child { margin-left: auto; }
  /* Phone touch targets ≥48px: the row actions, the text triggers, the drawer's controls. */
  :is(.hos-exc-prow, .hos-exc-arow, .hos-exc-addcrew-wrap, .hos-exc-hcrow, .hos-prestart) .os-btn { min-height: 48px; }
  .hos-prestart .os-btn--icon { min-width: 48px; }
  .hos-prestart :is(.hos-run__check-lab, .hos-prestart__field) { min-height: var(--control-h-touch); }
  .hos-prestart { --control-h-field: var(--control-h-touch); }
  .hos-prestart .os-input { height: var(--control-h-touch); min-height: var(--control-h-touch); }
  /* …while waiver · status · Check in · ⋮ still fit ONE line at 375 as drawn: ⋮ is
     44 wide (48 tall), the gaps tighten, and Check in drops its tick glyph. */
  .hos-exc-prow > .hos-exc-prow__end { gap: 6px; }
  .hos-exc-prow .hos-rowmenu > .os-btn--icon { min-width: 44px; }
  .hos-exc-prow .hos-exc-inlineform .os-btn--primary svg { display: none; }
}

/* ── #512 Pre-start drawer (excursions/_prestart_drawer) ─────────────────
   The gem .os-drawer (--sm). Loadout ticks reuse the Run's check chip
   (.os-field-check.hos-run__check-lab), full width here; a number / text item
   is a bordered row with its input inline on the right. */
.hos-prestart__head { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-2); margin-bottom: var(--space-3); }
.hos-prestart__list { display: flex; flex-direction: column; gap: var(--space-2);
  margin: 0; padding: 0; list-style: none; }
.hos-prestart .hos-run__check-lab { width: 100%; }
.hos-prestart__field { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); min-height: 44px; padding: var(--space-2) 14px;
  border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface); }
.hos-prestart__value { flex: none; width: 90px; }
.hos-prestart__value--text { width: 150px; }
.hos-prestart__note { margin: var(--space-3) 0 var(--space-2); }
.hos-prestart__addacts { display: flex; gap: var(--space-2); }
