/* jalsa-events-wiring.css — Phase 2d additive styles.
   ---------------------------------------------------------------------------
   Small, scoped additions used by the Phase 2d wiring only. Nothing here is
   required for the base site to render: if this file is missing the pages are
   unchanged. Uses the site's existing design tokens with safe fallbacks so it
   also works on pages that do not define them. */

/* Hidden honeypot trap — visually removed but present in the form DOM so bots
   fill it (the backend accepts-and-drops a filled trap). */
.jalsa-honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Light guest-photo section on the gallery page. */
#guest-photos[hidden] { display: none !important; }

.guest-photos-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  margin-top: 1.5rem;
}

.guest-photos-grid figure {
  margin: 0;
  background: var(--surface, oklch(100% 0.002 90));
  border: 1px solid var(--border, oklch(83% 0.025 90));
}

.guest-photos-grid img {
  display: block;
  width: 100%;
  height: 14rem;
  object-fit: cover;
}

.guest-photos-grid figcaption {
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted, oklch(46% 0.025 245));
}

/* --- guest share block (the QR that was missing) -------------------------- */
/* The QR is the reason this block exists: until Phase 9 nothing on the site linked
   to the upload page, so the flow existed but could not be discovered. Laid out
   side-by-side (QR left, words right) because a QR is scanned, not read — it should
   be the first thing the eye lands on, and it must stay large enough to scan from a
   phone at arm's length. */
#guest-share[hidden] { display: none !important; }

.guest-share {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(16, 42, 58, 0.14);
  background: linear-gradient(145deg, #fdf9ee, #f5ead2 70%, #efe0bd);
}

.guest-share__qr {
  display: grid;
  place-items: center;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid rgba(16, 42, 58, 0.16);
}

.guest-share__qr img {
  display: block;
  width: 100%;
  height: auto;
  /* Nearest-neighbour keeps the modules crisp: a smoothed QR is a QR that fails to
     scan. The server renders it at scale 8, so there is plenty of resolution. */
  image-rendering: pixelated;
}

.guest-share__copy h2 { margin: 0.2rem 0 0.8rem; }

.guest-share__copy p { max-width: 58ch; }

.guest-share__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.25rem;
}

/* One column when the QR would otherwise be squeezed below a scannable size. */
@media (max-width: 46rem) {
  .guest-share { grid-template-columns: 1fr; }
  .guest-share__qr { max-width: 15rem; margin-inline: auto; }
}

/* A printed page should keep the QR usable: no background, no shadow, black on white. */
@media print {
  .guest-share { background: #fff !important; border: 1px solid #000 !important; }
  .guest-share__qr { border: 1px solid #000 !important; }
  .guest-share__actions { display: none !important; }
}

/* --- moderation UI (Phase 9) --------------------------------------------- */
/* Layout for jalsa-events-admin.html. Deliberately plain: this is a staff tool, and the
   useful information is the photo and the decision, not the chrome. */

.reg { width: min(calc(100% - 2.5rem), 68rem); margin: 0 auto; display: grid; gap: 1.5rem; }

.panel {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid rgba(16, 42, 58, 0.14);
  background: linear-gradient(145deg, #fdf9ee, #f6ecd7 70%, #f0e2c4);
}

.panel[hidden] { display: none; }

.panel h2 { margin-top: 0; }

.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }

.field--inline { margin-bottom: 0; gap: 0; }

.field label,
.field span { font-weight: 600; font-size: 0.85rem; }

.field input {
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(16, 42, 58, 0.3);
  background: #fff;
  font: inherit;
  color: inherit;
  min-width: 16rem;
}

.field--inline input { min-width: 20rem; }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.status { font-size: 0.85rem; color: #47585f; }

.code {
  display: block;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  border-left: 3px solid oklch(74% 0.13 85);
  background: #fff;
  font: 0.82rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
}

.notice { padding: 0.75rem 1rem; border-left: 3px solid oklch(74% 0.13 85); background: #fff; }
.notice--error { border-left-color: oklch(52% 0.18 28); background: oklch(96% 0.03 28); }
.notice--success { border-left-color: oklch(44% 0.09 155); background: oklch(96% 0.03 155); }
.notice[hidden] { display: none; }

/* The "Staff" marker in the header of the moderation page. */
.badge--staff {
  align-self: center;
  margin-left: 0.75rem;
  padding: 0.25rem 0.5rem;
  font: 700 0.66rem/1 var(--font-body, system-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #102a3a;
  color: #fff;
}

.queue-head {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.queue-head h2 { margin: 0 0 0.25rem; }

.queue-head .actions button,
.queue-head .actions .toggle { white-space: nowrap; }

.queue-head .actions button {
  padding: 0.55rem 0.8rem;
  border: 1px solid #102a3a;
  background: transparent;
  color: inherit;
  font: 700 0.72rem/1 var(--font-body, system-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.queue-head .actions button:disabled { opacity: 0.55; cursor: progress; }

.toggle { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.82rem; }

/* --- the queue rows --- */

.reg-list { display: grid; gap: 1.1rem; margin-top: 1rem; }

.reg-empty { padding: 1.5rem; text-align: center; color: #47585f; }

.reg-card {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: start;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(16, 42, 58, 0.16);
  background: #fff;
}

.reg-thumb {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(16, 42, 58, 0.16);
  background: #f7f7f6;
}

.reg-thumb--none { aspect-ratio: 1 / 1; }

.reg-body { display: grid; gap: 0.4rem; align-content: start; }

.reg-body h3 { margin: 0.2rem 0 0; font-size: 1.2rem; }

.reg-meta { margin: 0; font-size: 0.82rem; color: #47585f; }

.reg-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.5rem;
}

.reg-actions button {
  padding: 0.6rem 0.9rem;
  border: 1px solid #102a3a;
  background: #102a3a;
  color: #fff;
  font: 700 0.72rem/1 var(--font-body, system-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.reg-actions button[data-reject] { background: transparent; color: inherit; }

/* A disabled Reject is the visible form of "a reason is required". */
.reg-actions button:disabled { opacity: 0.45; cursor: not-allowed; }

.button--danger { border-color: oklch(46% 0.16 28) !important; }

@media (max-width: 44rem) {
  .reg-card { grid-template-columns: 1fr; }
  .reg-thumb { max-width: 14rem; }
  .field input, .field--inline input { min-width: 100%; }
}


/* Upload page — mobile-first, reuses the site tokens. */
.jalsa-upload {
  width: min(calc(100% - 2rem), 44rem);
  margin: 0 auto;
}

.jalsa-upload__card {
  background: var(--surface, oklch(100% 0.002 90));
  border: 1px solid var(--border, oklch(83% 0.025 90));
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.jalsa-upload__field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.jalsa-upload__field label { font-weight: 600; font-size: 0.9rem; }

.jalsa-upload__field input[type="text"],
.jalsa-upload__field input[type="file"],
.jalsa-upload__field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border, oklch(83% 0.025 90));
  background: transparent;
  padding: 0.7rem 0.85rem;
  color: inherit;
  font: inherit;
}

.jalsa-upload__field textarea { min-height: 6rem; resize: vertical; }

.jalsa-upload__hint { margin: 0; font-size: 0.8rem; color: var(--muted, oklch(46% 0.025 245)); }

.jalsa-upload__consent { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 1.1rem; font-size: 0.9rem; }

.jalsa-upload__progress { height: 0.5rem; background: var(--border, oklch(83% 0.025 90)); margin: 0.5rem 0 0; }

.jalsa-upload__progress span { display: block; height: 100%; width: 0; background: var(--accent, oklch(74% 0.13 85)); }

.jalsa-upload__message { min-height: 1.4em; margin: 0.9rem 0 0; font-size: 0.92rem; }

.jalsa-upload__message.error { color: oklch(52% 0.18 28); }
.jalsa-upload__message.success { color: oklch(44% 0.1 150); }

/* ===========================================================================
   Phase 5g — ticket purchase, my-tickets, scanner.
   All additive and scoped to the new/changed behaviour; nothing here is needed
   for the base site to render.
   =========================================================================== */

/* --- indicative-price notice on the ticket-selection page ----------------- */
.ticket-prices-notice {
  margin: 1.4rem 0 0;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--accent, oklch(74% 0.13 85));
  background: oklch(97% 0.03 90);
  font-size: 0.9rem;
}

.ticket-prices-notice[hidden] { display: none; }

/* The live tier list is `hidden` until GET /ticket-types answers, and the static
   stand-in list is `hidden` once it does. Without this rule the page's own
   `.ticket-tiers { display: grid }` overrides the UA stylesheet's `[hidden]`,
   so BOTH lists stay rendered and every ticket appears twice — the live tiers
   followed by the identical static ones. Matching the pattern used just above
   for `.ticket-prices-notice[hidden]`. */
.ticket-tiers[hidden] { display: none; }

/* --- quantity stepper inside a live tier --------------------------------- */
.ticket-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.ticket-qty button {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--ticket-line, rgba(16, 42, 58, 0.16));
  background: #fff;
  color: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.ticket-qty button:hover { background: oklch(96% 0.02 90); }

.ticket-qty span {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --- basket + checkout block -------------------------------------------- */
.ticket-checkout { padding: clamp(2.8rem, 6vw, 5rem) 0; background: #f0e8d9; }

/* The basket now lives in the ticket-selection right column (see
   `.ticket-layout__aside`), so this block carries only the details form. */
.ticket-checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: start;
  max-width: 34rem;
}

.ticket-checkout__basket,
.ticket-checkout__form {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--ticket-line, rgba(16, 42, 58, 0.16));
  background: #fff;
  box-shadow: 0 0.8rem 1.8rem rgba(16, 42, 58, 0.06);
}

.ticket-checkout__note { margin: 0.5rem 0 1rem; color: #526570; font-size: 0.92rem; }

.ticket-basket-lines { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }

.ticket-basket-lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }

.ticket-basket-empty { color: #5b707b; font-style: italic; }

.ticket-basket-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 2px solid #102a3a;
  font-weight: 800;
}

.ticket-basket-total strong { font: 600 1.6rem/1 var(--font-display, Georgia, serif); }

.ticket-checkout__hint { margin: 0.55rem 0 0; font-size: 0.8rem; color: #5b707b; }

.ticket-checkout__field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }

.ticket-checkout__field label { font-weight: 600; font-size: 0.9rem; }

.ticket-checkout__field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ticket-line, rgba(16, 42, 58, 0.16));
  background: transparent;
  padding: 0.7rem 0.85rem;
  color: inherit;
  font: inherit;
}

.ticket-checkout__actions { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }

.ticket-checkout__status { font-size: 0.82rem; color: #5b707b; }

.ticket-checkout__message { min-height: 1.4em; margin: 0.9rem 0 0; font-size: 0.92rem; }

.ticket-checkout__message.error { color: oklch(52% 0.18 28); }
.ticket-checkout__message.success { color: oklch(44% 0.1 150); }

/* --- purchase notice popup ------------------------------------------------
   Carries the booking result (progress → confirmation, or the reason it could
   not proceed) right after "Continue to payment" is pressed. Same `.modal` /
   `.is-open` mechanism as the gallery lightbox: the base rule hides it, and the
   JS both toggles `.is-open` and the `hidden` attribute. */
.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 17, 26, 0.88);
}

.modal.is-open { display: grid; }

.checkout-modal__dialog {
  position: relative;
  width: min(100%, 34rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.7rem 1.6rem 1.5rem;
  border-top: 4px solid var(--accent, oklch(74% 0.13 85));
  background: var(--surface, #fff);
  box-shadow: 0 1.4rem 3.5rem rgba(0, 0, 0, 0.3);
}

.checkout-modal__dialog.is-error { border-top-color: oklch(58% 0.19 28); }
.checkout-modal__dialog.is-success { border-top-color: oklch(56% 0.13 150); }

.checkout-modal__badge {
  display: inline-grid;
  width: 2.6rem;
  aspect-ratio: 1;
  margin-bottom: 0.85rem;
  place-items: center;
  border-radius: 50%;
  background: oklch(96% 0.05 90);
  color: oklch(56% 0.13 75);
  font-size: 1.05rem;
}

.checkout-modal__dialog.is-error .checkout-modal__badge {
  background: oklch(96% 0.04 28);
  color: oklch(52% 0.18 28);
}

.checkout-modal__dialog.is-success .checkout-modal__badge {
  background: oklch(96% 0.04 150);
  color: oklch(44% 0.1 150);
}

.checkout-modal__dialog h3 { margin: 0 0 0.6rem; }

.checkout-modal__body { margin: 0; color: #526570; font-size: 0.94rem; }
.checkout-modal__body a { font-weight: 700; }

.checkout-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(16, 42, 58, 0.2);
  background: transparent;
  color: #526570;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.checkout-modal__actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* NOTE: deliberately no `display` here, so the UA `[hidden]` rule keeps working
   for the retry/primary buttons that are toggled with the attribute. */
.checkout-modal__actions button {
  min-height: 42px;
  padding: 0.6rem 0.95rem;
  border: 1px solid rgba(16, 42, 58, 0.24);
  background: transparent;
  color: #102a3a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.checkout-modal__actions .button-primary {
  border: 0;
  background: linear-gradient(115deg, #f3cf72, #d99b29 52%, #f0c25a);
}

@media (max-width: 52rem) {
  .ticket-checkout__grid { grid-template-columns: 1fr; }
}

/* --- my tickets list (account-tickets page) ------------------------------ */
.jalsa-tickets { display: grid; gap: 1.25rem; margin-top: 1.5rem; }

.jalsa-tickets-empty,
.jalsa-tickets-error {
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--accent, oklch(74% 0.13 85));
  background: oklch(97% 0.03 90);
  font-size: 0.92rem;
}

.jalsa-tickets-error { border-left-color: oklch(52% 0.18 28); background: oklch(96% 0.03 28); }

.jalsa-ticket {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border: 1px solid rgba(196, 143, 35, 0.5);
  background: linear-gradient(145deg, #fdf9ee, #f3e3bb 62%, #e6c87f);
  box-shadow: 0 0.9rem 2rem rgba(16, 42, 58, 0.09);
}

.jalsa-ticket__qr {
  display: grid;
  place-items: center;
  padding: 0.6rem;
  background: #fff;
  border: 1px solid rgba(16, 42, 58, 0.16);
}

.jalsa-ticket__qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.jalsa-ticket__badge {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.3rem 0.55rem;
  font: 700 0.68rem/1 var(--font-body, system-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #102a3a;
  color: #fff;
}

.jalsa-ticket__badge.is-issued { background: oklch(44% 0.09 155); }
.jalsa-ticket__badge.is-used { background: oklch(66% 0.14 75); color: #102a3a; }
.jalsa-ticket__badge.is-cancelled { background: oklch(46% 0.16 28); }

/* --- spent / cancelled tickets ------------------------------------------- */
/* A ticket that has been scanned (or cancelled) must not look like a live one
   at a glance. The card is muted, the QR is dimmed, and a clear stamp is placed
   over it — while the status is still stated in words, never colour alone. */
.jalsa-ticket.is-spent,
.jalsa-ticket.is-cancelled {
  border-color: rgba(16, 42, 58, 0.25);
  background: linear-gradient(145deg, #f4f4f2, #ececeb 62%, #e2e1de);
  box-shadow: none;
}

.jalsa-ticket.is-spent .jalsa-ticket__qr,
.jalsa-ticket.is-cancelled .jalsa-ticket__qr {
  position: relative;
  border-color: rgba(16, 42, 58, 0.22);
  background: #f7f7f6;
}

/* Dim the QR so it reads as no longer scannable, while staying visible. */
.jalsa-ticket.is-spent .jalsa-ticket__qr img,
.jalsa-ticket.is-cancelled .jalsa-ticket__qr img {
  opacity: 0.3;
  filter: grayscale(1);
}

.jalsa-ticket.is-spent h3,
.jalsa-ticket.is-cancelled h3 { color: #5a6a72; }

.jalsa-ticket__stamp {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 1rem/1 var(--font-body, system-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(45% 0.12 60);
  transform: rotate(-14deg);
  pointer-events: none;
}

.jalsa-ticket.is-spent .jalsa-ticket__stamp {
  border: 3px solid oklch(52% 0.15 60);
  box-shadow: inset 0 0 0 4px oklch(97% 0.05 85);
  background: oklch(96% 0.07 85 / 0.82);
  height: 4rem;
  margin: auto;
  inset: 0;
}

.jalsa-ticket.is-cancelled .jalsa-ticket__stamp {
  border: 3px solid oklch(50% 0.19 28);
  background: oklch(96% 0.04 28 / 0.85);
  color: oklch(42% 0.17 28);
  height: 4rem;
  margin: auto;
  inset: 0;
}

.jalsa-ticket__spent-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #47585f;
}

.jalsa-ticket h3 { margin: 0 0 0.35rem; font-size: 1.4rem; }

.jalsa-ticket__code {
  margin: 0 0 0.3rem;
  font: 700 0.95rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

.jalsa-ticket__meta { margin: 0; font-size: 0.84rem; color: #47585f; }

.jalsa-ticket__actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.9rem; }

.jalsa-ticket__actions a,
.jalsa-ticket__actions button {
  padding: 0.6rem 0.85rem;
  border: 1px solid #102a3a;
  background: transparent;
  color: inherit;
  font: 700 0.72rem/1 var(--font-body, system-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 40rem) {
  .jalsa-ticket { grid-template-columns: 1fr; }
  .jalsa-ticket__qr { max-width: 12rem; }
}

/* --- live confirmation block (order-confirmation page) ------------------- */
.oc-live { padding: clamp(2.5rem, 5vw, 4rem) 0; background: #fff; }

.oc-live[hidden] { display: none; }

.oc-live__status { margin: 0.5rem 0 0; font-size: 0.92rem; color: #526570; }

.oc-live__fallback { margin: 1rem 0 0; font-size: 0.88rem; }

/* --- account forms (sign-in / sign-up) ---------------------------------- */
.jalsa-auth { width: min(calc(100% - 2.5rem), 32rem); margin: 0 auto; }

.jalsa-auth__field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }

.jalsa-auth__field label { font-weight: 600; font-size: 0.9rem; }

.jalsa-auth input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border, oklch(83% 0.025 90));
  background: transparent;
  padding: 0.7rem 0.85rem;
  color: inherit;
  font: inherit;
}

.jalsa-auth__actions { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }

.jalsa-auth__status { font-size: 0.82rem; color: var(--muted, oklch(46% 0.025 245)); }

.jalsa-auth__message { min-height: 1.4em; margin: 0.9rem 0 0; font-size: 0.92rem; }

.jalsa-auth__message.error { color: oklch(52% 0.18 28); }
.jalsa-auth__message.success { color: oklch(44% 0.1 150); }

/* --- scanner (staff-facing, mobile-first) -------------------------------- */
.jalsa-scan { width: min(calc(100% - 1.5rem), 40rem); margin: 0 auto; }

.jalsa-scan__card {
  padding: clamp(1.1rem, 4vw, 1.85rem);
  border: 1px solid var(--border, oklch(83% 0.025 90));
  background: var(--surface, oklch(100% 0.002 90));
}

.jalsa-scan__field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }

.jalsa-scan__field label { font-weight: 600; font-size: 0.9rem; }

.jalsa-scan input,
.jalsa-scan textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border, oklch(83% 0.025 90));
  background: transparent;
  padding: 0.7rem 0.85rem;
  color: inherit;
  font: inherit;
}

.jalsa-scan textarea { min-height: 5.5rem; resize: vertical; font-family: ui-monospace, monospace; font-size: 0.82rem; }

.jalsa-scan__row { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }

.jalsa-scan__video-wrap {
  position: relative;
  margin: 1rem 0 0;
  background: #071c2b;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.jalsa-scan__video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The big, unambiguous scan result. Colour carries the decision so a glance is
   enough at a busy door — text always states it too, never colour alone. */
.jalsa-scan__result {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 3px solid #102a3a;
  background: #fff;
  text-align: center;
}

.jalsa-scan__result[hidden] { display: none; }

.jalsa-scan__result-verdict {
  display: block;
  font: 800 clamp(2rem, 9vw, 3.5rem) / 1 var(--font-body, system-ui);
  letter-spacing: 0.02em;
}

.jalsa-scan__result-detail { margin: 0.75rem 0 0; font-size: 0.95rem; }

.jalsa-scan__result-detail code { font-family: ui-monospace, monospace; font-weight: 700; }

.jalsa-scan__result.is-valid { border-color: oklch(52% 0.15 150); background: oklch(96% 0.04 150); }
.jalsa-scan__result.is-valid .jalsa-scan__result-verdict { color: oklch(38% 0.13 150); }

.jalsa-scan__result.is-used { border-color: oklch(70% 0.15 75); background: oklch(97% 0.06 85); }
.jalsa-scan__result.is-used .jalsa-scan__result-verdict { color: oklch(45% 0.12 60); }

.jalsa-scan__result.is-invalid { border-color: oklch(52% 0.19 28); background: oklch(96% 0.04 28); }
.jalsa-scan__result.is-invalid .jalsa-scan__result-verdict { color: oklch(42% 0.17 28); }

.jalsa-scan__result.is-error { border-color: oklch(60% 0.02 245); background: oklch(97% 0.01 245); }

.jalsa-scan__message { min-height: 1.4em; margin: 0.9rem 0 0; font-size: 0.9rem; }
.jalsa-scan__message.error { color: oklch(52% 0.18 28); }

.jalsa-scan__hint { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--muted, oklch(46% 0.025 245)); }

/* --- print-friendly tickets --------------------------------------------- */
/* A buyer must be able to print a ticket (or show it on screen). Chrome,
   navigation and anything not part of a ticket is removed for print. */
@media print {
  .jalsa-global-header,
  .jalsa-global-footer,
  .jalsa-whatsapp-helper,
  .jalsa-global-skip,
  header.header,
  footer.footer,
  .skip,
  .jalsa-ticket__actions {
    display: none !important;
  }

  body { background: #fff !important; color: #000 !important; }

  .jalsa-ticket {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 2px solid #000 !important;
    background: #fff !important;
    margin-bottom: 1.25rem;
  }

  .jalsa-ticket__qr { border: 1px solid #000 !important; }

  /* Spent tickets print as clearly retired, not as a usable QR. */
  .jalsa-ticket.is-spent,
  .jalsa-ticket.is-cancelled { background: #fff !important; }

  .jalsa-ticket.is-spent .jalsa-ticket__qr img,
  .jalsa-ticket.is-cancelled .jalsa-ticket__qr img {
    opacity: 0.25 !important;
    filter: grayscale(1) !important;
  }

  .jalsa-ticket__stamp {
    border-color: #000 !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  .jalsa-ticket__badge {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
  }
}
