/* Secure Share recipient page (share.jarviscars.com.au), Stage 5. docs/secure-share.md "Recipient portal".
   Built to tasks/secure-share/design/stage-5-parity.md from the owner-approved canvas (Y9TS3zYG9SfEasTEpnoC5i +
   SR-04f) and its composition layer ss-recipient.css. Loaded after bootstrap.min.css, open-sans.css and
   jds-admin.css (cdn.jarviscars.com.au); every rule is scoped to body.jds.ss-public and uses only tokens that
   jds-admin.css declares on .jds. Selectors keep the specificity of the jds-admin.css rules they restate, so this
   file wins by load order (the head order is part of the build).

   DS gaps composed from primitives (flagged for the owner, sub-plan "Design target" DS gap table):
   - public page frame + blue 56 px header band (probation .prb-tbar); 640 px column (probation .prb-token)
   - code input (TextField shell, 24/32 600, centred tabular figures)
   - file row grid with the phone button pair, and the single-button download-only row (R3, .ss-file__act--one)
   - inline notes (blue-a08) and alerts (red-tint, red-pale ring, red dot); field error hint with the red dot
   - empty-state disc; uniform state and refusal card; centred footer line
   - media frame: JDS --surface-dark is not declared by jds-admin.css; var(--ink) is used (bundle.css defines
     --surface-dark as var(--ink), so the colour is identical)
   - loading spinner (JDS has none): 24 px ring blue-a16 with a jarvis-blue top arc, static under reduced motion
   - busy button (DM-3): full contrast, 16 px currentColor ring before the label, cursor progress
   - text buttons (artifact TextLink without its chevron; Stage 3 .ss-linkbtn)
   Design-merge rulings applied: DM-1 one ring on fields and no outline (2 px blue focus, 1 px red error, 2 px red
   error and focus), DM-2 resting ring 1 px ink-mid, DM-3 busy, DM-10 notice link 44 px inline-flex box.
   Accepted deviations: fields 48 px weight 400, inputs 16 px at every width, every control >= 44 px at every
   width (step buttons 48). Phone layout = max-width 575.98px. */

.ss-public { margin: 0; background: var(--off-white); color: var(--ink); -webkit-font-smoothing: antialiased; }
.ss-public *, .ss-public *::before, .ss-public *::after { box-sizing: border-box; }
.ss-public p, .ss-public h1, .ss-public h2, .ss-public ul { margin: 0; }
.ss-public ul { padding: 0; list-style: none; }
.ss-public button, .ss-public input { font-family: var(--font-sans); }
.ss-public [hidden] { display: none !important; }
.ss-public .ss-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ss-public .ss-ico { display: block; flex: none; width: 16px; height: 16px; fill: currentColor; }
.ss-public [tabindex="-1"]:focus { outline: none; }
@media (scripting: none) { .ss-public [data-ss-state="SR-00"] { display: none; } }

/* Header band */
.ss-public .ss-tbar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 24px; background: var(--jarvis-blue); color: var(--white); }
.ss-public .ss-tbar__logo { display: block; flex: none; height: 28px; width: auto; }
.ss-public .ss-tbar__text { display: flex; flex-direction: column; min-width: 0; }
.ss-public .ss-tbar__title { font-weight: 600; font-size: 16px; line-height: 22px; }
.ss-public .ss-tbar__sub { font-size: 12px; line-height: 16px; opacity: .8; }

/* Column, card, footer */
.ss-public .ss-root { width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 16px 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ss-public .ss-root > * { min-width: 0; }
.ss-public .jds-card { margin: 0; min-width: 0; }
.ss-public .ss-foot { text-align: center; font-size: 13px; line-height: 20px; color: var(--ink-mid); }

/* Type */
.ss-public .ss-step { display: flex; flex-direction: column; gap: 16px; }
.ss-public .ss-step__head { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ss-public .ss-h1 { font-weight: 600; font-size: 20px; line-height: 28px; color: var(--ink); overflow-wrap: anywhere; }
.ss-public .ss-h2 { font-weight: 600; font-size: 16px; line-height: 22px; color: var(--ink); }
.ss-public .ss-muted { color: var(--ink-mid); }
.ss-public .ss-wrap { overflow-wrap: anywhere; }
.ss-public .ss-requested { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-mid); }

/* Fields (DM-1, DM-2) */
.ss-public .ss-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ss-public .ss-label { font-weight: 600; font-size: 14px; line-height: 22px; color: var(--ink); }
.ss-public .ss-input { display: block; width: 100%; height: 48px; margin: 0; padding: 0 16px; border: 0; border-radius: var(--radius-field); background: var(--white); box-shadow: inset 0 0 0 1px var(--ink-mid); font-weight: 400; font-size: 16px; line-height: 24px; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.ss-public .ss-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--jarvis-blue); }
.ss-public .ss-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--jarvis-red); }
.ss-public .ss-input[aria-invalid="true"]:focus { box-shadow: inset 0 0 0 2px var(--jarvis-red); }
.ss-public .ss-input:autofill { background: var(--blue-a08); }
.ss-public .ss-input.ss-code { font-weight: 600; font-size: 24px; line-height: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.ss-public .ss-hint { font-size: 12px; line-height: 16px; color: var(--ink-mid); }
.ss-public .ss-hint--error { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.ss-public .ss-hint--error::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: var(--radius-full); background: var(--jarvis-red); }

/* Collection notice (DM-10) */
.ss-public .ss-notice { font-size: 13px; line-height: 20px; color: var(--ink-mid); }
.ss-public .ss-notice a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; white-space: nowrap; color: var(--jarvis-blue); text-decoration: underline; text-underline-offset: 2px; }
.ss-public .ss-notice a:hover { color: var(--jarvis-red); }

/* Buttons (jds-admin .jds-btn restated at 44 px; step buttons 48) */
.ss-public .jds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 44px; padding: 0 24px; margin: 0; border: 0; border-radius: var(--radius-pill); font-family: var(--font-sans); font-weight: 600; font-size: 14px; line-height: 14px; white-space: nowrap; text-decoration: none; cursor: pointer; }
.ss-public .jds-btn--fill { background: var(--jarvis-blue); color: var(--white); box-shadow: none; }
.ss-public .jds-btn--outline { background: var(--white); color: var(--jarvis-blue); box-shadow: inset 0 0 0 1px var(--blue-a16); }
.ss-public .jds-btn--fill:hover { background: var(--jarvis-red); color: var(--white); }
.ss-public .jds-btn--fill:active { background: var(--jarvis-red-dark); color: var(--white); }
.ss-public .jds-btn--outline:hover { background: var(--jarvis-blue); color: var(--white); box-shadow: none; }
.ss-public .jds-btn--outline:active { background: var(--jarvis-blue-deep); color: var(--white); box-shadow: none; }
.ss-public .jds-btn.ss-btn-step { height: 48px; }
.ss-public .jds-btn:focus-visible, .ss-public .ss-linkbtn:focus-visible, .ss-public a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ss-public .jds-btn[aria-busy="true"], .ss-public .ss-linkbtn[aria-busy="true"] { opacity: 1; cursor: progress; }
.ss-public .ss-btn-spin { display: block; flex: none; width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: var(--radius-full); animation: ss-rot 0.8s linear infinite; }
.ss-public .ss-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Text buttons */
.ss-public .ss-linkbtn { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; cursor: pointer; font-weight: 600; font-size: 14px; line-height: 22px; color: var(--jarvis-blue); text-decoration: none; }
.ss-public .ss-linkbtn:hover { color: var(--jarvis-red); }
.ss-public .ss-textacts { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; row-gap: 0; }

/* Notes and alerts */
.ss-public .ss-note { padding: 12px 16px; border-radius: var(--radius-card); background: var(--blue-a08); color: var(--ink); }
.ss-public .ss-alert { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--radius-card); background: var(--jarvis-red-tint); box-shadow: inset 0 0 0 1px var(--jarvis-red-pale); color: var(--ink); }
.ss-public .ss-dot { width: 8px; height: 8px; flex: none; border-radius: var(--radius-full); background: var(--jarvis-red); margin-top: 7px; }

/* File rows */
.ss-public .ss-files { display: flex; flex-direction: column; }
.ss-public .ss-files > li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border-hairline); }
.ss-public .ss-files > li:first-child { padding-top: 0; }
.ss-public .ss-files > li:last-child { padding-bottom: 0; border-bottom: 0; }
.ss-public .ss-file__glyph { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--jarvis-blue); align-self: start; }
.ss-public .ss-file__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ss-public .ss-file__name { font-weight: 600; font-size: 14px; line-height: 22px; color: var(--ink); overflow-wrap: anywhere; }
.ss-public .ss-file__meta { font-size: 12px; line-height: 16px; color: var(--ink-mid); }
.ss-public .ss-file__act { grid-column: 3; grid-row: 1; display: flex; gap: 8px; }
.ss-public .ss-file__extra { grid-column: 2 / -1; min-width: 0; }
.ss-public .ss-listfoot { padding-top: 8px; border-top: 1px solid var(--border-hairline); }

/* Empty state */
.ss-public .ss-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 0 8px; text-align: center; }
.ss-public .ss-disc { width: 48px; height: 48px; flex: none; border-radius: var(--radius-full); background: var(--blue-a08); color: var(--jarvis-blue); display: inline-flex; align-items: center; justify-content: center; }
.ss-public .ss-empty .ss-muted { max-width: 440px; }

/* Media frame */
.ss-public .ss-media { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; background: var(--ink); }
.ss-public .ss-media video { display: block; width: 100%; height: 100%; }

/* State and refusal card (one class for SR-03, SR-06 to SR-12) */
.ss-public .jds-card.ss-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; }
.ss-public .ss-state .ss-blurb { color: var(--ink-mid); max-width: 480px; }
.ss-public .ss-state .jds-btn { margin-top: 8px; }

/* Loading line */
.ss-public .ss-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 32px 0; color: var(--ink-mid); }
.ss-public .ss-spin { width: 24px; height: 24px; flex: none; border-radius: var(--radius-full); border: 2px solid var(--blue-a16); border-top-color: var(--jarvis-blue); animation: ss-rot 1s linear infinite; }

@keyframes ss-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .ss-public .ss-spin, .ss-public .ss-btn-spin { animation: none; }
}

/* Phone (575.98 and below): full-width buttons, stacked text buttons, file-row buttons under the name */
@media (max-width: 575.98px) {
    .ss-public .ss-tbar { padding: 12px 16px; }
    .ss-public .ss-actions > .jds-btn, .ss-public .jds-btn.ss-btn-step { width: 100%; }
    .ss-public .ss-textacts { flex-direction: column; align-items: flex-start; }
    .ss-public .ss-files > li { grid-template-columns: 24px minmax(0, 1fr); }
    .ss-public .ss-file__act { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ss-public .ss-file__act > .jds-btn { width: 100%; padding: 0 12px; }
    .ss-public .ss-file__act.ss-file__act--one { grid-template-columns: minmax(0, 1fr); }
    .ss-public .ss-file__extra { grid-column: 1 / -1; }
    .ss-public .jds-card.ss-state { padding: 32px 16px; }
    .ss-public .ss-state .jds-btn { width: 100%; }
}
