/* ==========================================================================
   Booking payment splash (screens/booking-payment.blade.php, transfer step).
   Sits on the shared .modal-overlay. Desktop: a fixed landscape window like a
   desktop app's splash (760 x 460). <=780px: one-column card. <=520px: full
   screen with the upload button pinned to the bottom. Tokens only.
   ========================================================================== */
.pay-splash-overlay { padding-left: max(var(--space-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-4), env(safe-area-inset-right, 0px)); }
.pay-splash { display: grid; grid-template-columns: 300px 1fr; width: min(100%, 760px); min-height: 460px; max-height: 92dvh; overflow: hidden; border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow); animation: pay-splash-in var(--dur-reveal) var(--ease); }
@keyframes pay-splash-in { from { opacity: 0; transform: scale(.98); } }
@media (prefers-reduced-motion: reduce) { .pay-splash { animation: none; } }

/* Left: brand and what is owed */
.pay-splash-brand { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; padding: var(--space-7) var(--space-6); background: var(--color-primary-strong); color: var(--color-on-primary); }
.pay-splash-logo { display: grid; place-items: center; width: var(--logo-md); height: var(--logo-md); border-radius: var(--radius-card); background: var(--color-surface); }
/* #booking-payment: app.css colours .eyebrow with stronger selectors. */
#booking-payment .pay-splash-brand .eyebrow { color: var(--color-primary-bright); }
.pay-splash-brand h2 { margin: var(--space-1) 0 0; color: var(--color-on-primary); font: var(--fw-regular) var(--fs-2xl)/var(--lh-tight) var(--font-serif); text-wrap: balance; }
.pay-splash-brand p { margin: var(--space-2) 0 0; color: var(--color-accent-border); font-size: var(--fs-xs); }
.pay-splash-due { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: var(--space-1) var(--space-3); margin: auto 0 0; padding-top: var(--space-4); border-top: 1px solid color-mix(in srgb, var(--color-on-primary) 22%, transparent); }
.pay-splash-due dt { color: var(--color-accent-border); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.pay-splash-due dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; word-break: break-all; }
.pay-splash-due strong { font-size: var(--fs-xl); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.pay-splash-due code { font-size: var(--fs-xs); font-weight: var(--fw-bold); }

/* Right: where to pay, then the upload */
.pay-splash-main { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-6); overflow-y: auto; }
.pay-splash-main > .status { align-self: flex-start; white-space: normal; }
.pay-splash-main > p { margin: 0; color: var(--color-text-soft); }
.pay-account { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-accent-border); border-radius: var(--radius-card); background: var(--color-accent-surface); }
.pay-account dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); margin: 0; }
.pay-account dt { color: var(--color-text-soft); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.pay-account dd { margin: 0; min-width: 0; color: var(--color-text); font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.pay-account-number { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border: 1px solid var(--color-accent-border); border-radius: var(--radius-control); background: var(--color-surface); }
.pay-account-number code { min-width: 0; color: var(--color-primary-strong); font-size: var(--fs-md); font-weight: var(--fw-bold); letter-spacing: .04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pay-splash-hint { margin: 0; color: var(--color-text-muted); font-size: var(--fs-xs); }
.pay-splash-error { margin: 0; color: var(--color-danger-strong); font-size: var(--fs-xs); font-weight: var(--fw-bold); }

/* The form: the label opens the picker; once a file is chosen (:valid) the submit button replaces it. */
.pay-splash-actions { display: grid; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }
.pay-splash-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pay-splash-actions:has(.pay-splash-input:focus-visible) .pay-splash-pick { outline: 3px solid var(--color-focus); box-shadow: 0 0 0 5px var(--color-text); }
.pay-splash-submit, .pay-splash-change { display: none; }
.pay-splash-actions:has(.pay-splash-input:valid) .pay-splash-pick { display: none; }
.pay-splash-actions:has(.pay-splash-input:valid) .pay-splash-submit { display: inline-flex; }
.pay-splash-actions:has(.pay-splash-input:valid) .pay-splash-change { display: inline; color: var(--color-primary); font-weight: var(--fw-bold); text-decoration: underline; cursor: pointer; }
.pay-splash-file { color: var(--color-action-hover); font-size: var(--fs-xs); font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.pay-splash-file:empty { display: none; }
.pay-splash-actions .pay-splash-hint { text-align: center; }
.pay-splash-later { justify-self: center; display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--space-3); font-size: var(--fs-sm); font-weight: var(--fw-bold); }

/* Tablet and phone landscape: one column card */
@media (max-width: 780px) {
  .pay-splash { grid-template-columns: 1fr; width: min(100%, 520px); height: auto; max-height: 92dvh; overflow-y: auto; }
  .pay-splash-brand { flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--space-5); }
  .pay-splash-brand > div { flex: 1 1 200px; min-width: 0; }
  .pay-splash-due { flex: 1 1 100%; margin: 0; }
  .pay-splash-main { padding: var(--space-5); overflow: visible; }
}

/* Phone portrait: full screen, upload pinned to the bottom */
@media (max-width: 520px) {
  .pay-splash-overlay { padding: 0; }
  .pay-splash { display: flex; flex-direction: column; width: 100%; height: 100dvh; max-height: none; border-radius: 0; overflow: hidden; }
  .pay-splash-brand { gap: var(--space-3); padding: calc(var(--space-5) + env(safe-area-inset-top, 0px)) max(var(--space-5), env(safe-area-inset-right, 0px)) var(--space-4) max(var(--space-5), env(safe-area-inset-left, 0px)); }
  .pay-splash-logo { width: var(--logo-sm); height: var(--logo-sm); border-radius: var(--radius-control); }
  .pay-splash-logo img { width: 24px; height: 24px; }
  .pay-splash-brand h2 { font-size: var(--fs-xl); }
  .pay-splash-main { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 0; }
  .pay-splash-actions { position: sticky; bottom: 0; margin: auto calc(-1 * var(--space-5)) 0; padding: var(--space-3) var(--space-5) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--color-border); background: var(--color-surface); }
}
