/* tasks/030 — Guest Registration Card + sign QR slips (screen + print).
   App-specific (.hos-grc-*) layered on DiveOS tokens. The SAME card partial renders
   on the staff page, the portal sign page, and paper — print rules strip the
   app chrome and keep the document. */

.hos-grc-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  max-width: 720px;
}
.hos-grc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 14px; }
.hos-grc-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: var(--ink); }
.hos-grc-property { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.hos-grc-logo { max-height: 48px; max-width: 140px; object-fit: contain; }
.hos-grc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.hos-grc-field { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--hairline-2); font-size: var(--text-sm); }
.hos-grc-field--wide { grid-column: 1 / -1; }
.hos-grc-label { flex: none; width: 130px; color: var(--text-muted); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.hos-grc-value { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.hos-grc-notice { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-md); font-size: var(--text-xs); color: var(--text-muted); white-space: pre-line; }
.hos-grc-sigblock { margin-top: 16px; display: flex; align-items: flex-end; gap: 18px; }
.hos-grc-sigbox { flex: 1; border: 1px solid var(--hairline-strong); border-radius: var(--radius-md); min-height: 88px; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.hos-grc-sigbox img { max-height: 80px; max-width: 100%; }
.hos-grc-sigmeta { font-size: var(--text-2xs); color: var(--muted-2); }

/* Signature pad (draw/type) — sizes for the DiveOS .hos-sig-* classes. */
.hos-grc-pad .hos-sig-canvas { width: 100%; height: 160px; touch-action: none; }
.hos-grc-pad .hos-sig-canvas-container { border: 2px dashed var(--hairline-strong); border-radius: var(--radius-md); overflow: hidden; }

/* The submit-time "please sign" error stays hidden until a submit attempt —
   .status-pill's display:inline-flex was overriding the [hidden] attribute at
   rest (was .ao-tag before the os-ds .status-pill retirement). */
[data-signature-target="error"][hidden] { display: none; }

/* Registration sign pad: a plain dashed box with a centered helper — drop the
   shared ruled-line background; the helper hides once there's ink (.has-ink). */
.hos-grc-signpad .hos-sig-canvas-container { position: relative; background-image: none; }
.hos-grc-signpad .hos-sig-canvas-container::before {
  content: "Sign here — finger or stylus"; position: absolute; inset: 0;
  display: grid; place-items: center; color: var(--muted-2); font-size: var(--text-sm); pointer-events: none;
}
.hos-grc-signpad .hos-sig-canvas-container.has-ink::before { display: none; }

/* Batch QR slips — one compact slip per signatory, grid on screen,
   2-up per row on paper with page-break control. */
.hos-grc-slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.hos-grc-slip { display: flex; gap: 14px; align-items: center; border: 1px dashed var(--hairline-strong); border-radius: var(--radius-md); padding: 14px; background: var(--surface); break-inside: avoid; }
.hos-grc-slip-name { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.hos-grc-slip-meta { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }

.hos-grc-print-only { display: none; }

@media print {
  .hos-grc-print-only { display: flex !important; }
  /* Keep the document, drop the app. */
  .hos-shell-sidebar, .hos-shell-topbar, .hos-gp-side, .hos-gp-tabs, .no-print { display: none !important; }
  .hos-shell, .hos-shell-main, .hos-gp-frame, .hos-gp-main { display: block !important; margin: 0 !important; padding: 0 !important; }
  body { background: var(--surface) !important; }
  .hos-grc-card { border: none; border-radius: 0; max-width: none; padding: 0; }
  .hos-grc-slips { grid-template-columns: 1fr 1fr; }
  a[href]::after { content: none !important; }
  @page { margin: 14mm; }
}

/* ── Passenger manifest sheets (tasks/009 #2) ─────────────────────────── */
.hos-mfp-sheet { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 22px 26px; }
.hos-mfp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 12px; }
.hos-mfp-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-bottom: 14px; }
/* tasks/071 rule 3 - the sheet table IS `.os-table` in an `.os-table-wrap`; the wrap
   drops its frame here because a print sheet has no scroll container to draw. */
.hos-mfp-sheet .os-table-wrap { border: 0; border-radius: 0; }
.hos-mfp-foot { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }
.hos-mfp-signs { display: flex; gap: 40px; }
.hos-mfp-sign { flex: 1; font-size: var(--text-xs); color: var(--text-muted); }
.hos-mfp-signline { border-bottom: 1px solid var(--ink); height: 34px; margin-bottom: 5px; }

@media print {
  .hos-mfp-sheet { border: none; border-radius: 0; padding: 0; break-after: page; }
  .hos-mfp-sheet:last-child { break-after: auto; }
}

/* ─────────────────────────────────────────────────────────────────────
   tasks/069 — staff Registration Card (per-guest, multi-room).
   The page is built from shared components (.os-page-hero + .hos-page-hero
   --guest, .os-tracker, .hos-entity-tabs--grouped, .os-workpage--a2,
   .os-card, .os-desclist--panel, .os-section-head, .os-option-card,
   .os-locked, .os-signpad, .os-gate-bar); its PAGE GEOMETRY lives in
   components/hos_guest_surfaces.css beside the arrival wizard's.

   What is left here is the one thing no shared component owns: the STAY
   RIBBON (check-in tile → nights → check-out tile → meal ‖ room) and the
   folio's booking-provenance footer. Kept on the historic `.hos-grc-*` names
   because they are pre-existing, print-safe and not a new family. The
   `.hos-grc-card` document rules above still drive the portal/print card. */

/* ── Stay ribbon: dates + meal (left) · full-height hairline · room ── */
/* A ROW of the folio, not a card inside it: transparent (so it inherits the
   folio's surface-alt tint), separated by a hairline rule only. Painting its
   own --surface here is the "why is this row white?" defect. */
.hos-grc-staywrap { display: flex; align-items: stretch; background: transparent; border-top: 1px solid var(--hairline); }
.hos-grc-staycell { padding: 14px var(--space-6); display: flex; align-items: center; }
.hos-grc-staycell--dates { flex: none; padding-right: 0; }
.hos-grc-staydiv { flex: 1; align-self: stretch; display: flex; justify-content: center; }
.hos-grc-staydiv::after { content: ""; width: 1px; background: var(--hairline); }
.hos-grc-staycell--room { flex: none; padding-left: 0; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; }
.hos-grc-rl { font-size: var(--text-2xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.hos-grc-rn { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 600; line-height: 1; letter-spacing: -.02em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.hos-grc-rt { font-size: var(--text-xs); color: var(--muted); margin-top: 5px; font-weight: 500; }
.hos-grc-ribbon { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hos-grc-rtile { text-align: center; }
.hos-grc-dow { font-size: var(--text-2xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.hos-grc-dd { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hos-grc-mo { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }
.hos-grc-rarrow { color: var(--muted-2); display: inline-flex; }
.hos-grc-rpill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-strong);
  border-radius: var(--radius-pill); padding: 5px 11px; font-weight: 600; font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.hos-grc-mealtag { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: var(--text-sm); font-weight: 600; margin-left: 6px; }

/* ── Folio provenance footer ─────────────────────────────────────── */
.hos-grc-folio__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px var(--space-6); font-size: var(--text-xs); color: var(--muted); border-top: 1px solid var(--hairline); }
.hos-grc-folio__foot b { color: var(--ink); font-weight: 600; }
/* Composes the gem's `.os-link`; keeps only the weight this callsite wants. */
.hos-grc-editlink { font-weight: 600; }

/* Value placeholder still used by the guest-portal registration views. */
.hos-grc-v--dim { color: var(--muted-2); font-weight: 500; }

/* The staff pad fills its card (the shared draw/type pad inside .os-signpad). */
.hos-grc-signpad .hos-sig-canvas-container { min-height: 200px; }

@media (max-width: 700px) {
  /* Stay stacks: dates + meal, a horizontal hairline, then the room. */
  .hos-grc-staywrap { display: block; }
  .hos-grc-staycell { padding: 14px var(--space-4); }
  .hos-grc-staycell--dates { padding: 14px var(--space-4) 0; }
  .hos-grc-mealtag { flex-basis: 100%; margin-left: 0; margin-top: 4px; }
  .hos-grc-staydiv { flex: none; display: block; align-self: auto; height: 1px; background: var(--hairline); margin: 14px 16px; }
  .hos-grc-staydiv::after { display: none; }
  .hos-grc-staycell--room { align-items: flex-start; text-align: left; padding: 0 16px 16px; }
  .hos-grc-folio__foot { display: block; }
  .hos-grc-editlink { margin-top: 6px; }
  .hos-grc-signpad .hos-sig-canvas-container { min-height: 150px; }
}

/* ── Sticky action bar ────────────────────────────────────────────────
   Same treatment the arrival wizard gives `.os-workpage__footer`: this page
   is a long multi-guest card, so "Complete check-in" must stay reachable.
   Bleeds to the SAME width as the sand hero above it so the two bands read as
   one, and re-insets its content to the page column. Loaded after
   components/hos_guest_surfaces.css, so this beats that file's padding-top.

   The bleed is the shell's container-query contract (`.hos-shell-main` is
   `container-type: inline-size`), NOT `--hos-gutter`: that is the GUEST shell's
   28px `.hos-gp-body` padding, and this page runs in the STAFF shell, which pads
   48px. Reclaiming 28 of 48 left the bar 20px inside the hero on both sides —
   the exact mismatched-bands defect this rule exists to prevent. `grid-column`
   is required because the bar is a grid child of `.os-workpage--a2`; auto-placed
   it sits in column 1 and cannot span the band. */
.hos-regcard-page .os-workpage__footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  width: 100cqw;
  margin: var(--space-5) calc(50% - 50cqw) 0;
  padding-block: var(--space-3);
  padding-inline: max(
    var(--hos-rc-gutter),
    calc(50cqw - var(--hos-rc-page-max) / 2 + var(--hos-rc-gutter))
  );
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  box-shadow: var(--elevation-overlay);
}

/* The gate bar IS the band's content, so the band owns the surface, border and
   inline padding — the bar keeps only its layout. Left with its own card
   chrome it drew a second white bordered box inside the white bar. */
.hos-regcard-page .os-workpage__footer > .os-gate-bar {
  background: none;
  border: 0;
  border-radius: 0;
  padding-inline: 0;
}

/* Print: the card is the document — drop the screen-only controls and the
   hero's float padding so the folio sits under the welcome, not on it. */
@media print {
  /* Back-nav and Print moved into the shell head band (:breadcrumb /
     :page_actions), so the print rule follows them there — the breadcrumb is
     navigation and the Print button is the control that triggered this print;
     neither belongs on the guest's document. The title/subtitle stay. */
  .hos-regcard .os-tracker__jump,
  .hos-regcard .os-gate-bar__actions { display: none !important; }

  /* The head band is a SIBLING of .hos-regcard, not a descendant, and this
     sheet is loaded on every page — so these must be scoped by `:has()` or
     printing ANY page would lose its header actions. */
  .hos-shell-content:has(.hos-regcard) .os-breadcrumb,
  .hos-shell-content:has(.hos-regcard) .os-page-head__actions {
    display: none !important;
  }
  .hos-regcard-page { margin-top: 0; }
  .hos-regcard-page .os-workpage__banner > .os-card { box-shadow: none; }
  .hos-regcard .os-page-hero { padding-bottom: 24px; border-radius: 0; }
  /* A position:sticky bar repeats on (or floats over) every printed page.
     Un-stick it and drop its band chrome — the actions are hidden above, so
     what remains is the "N of M adults signed" line, printed once inline. */
  .hos-regcard-page .os-workpage__footer {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    border-top: none !important;
  }
}
