/* =========================================================================
   Conference booking (/conference) — builds on hbs.css tokens.
   The gate, coupon, GST and order-summary components deliberately mirror
   competition.css (same class names, same look) so both paid forms match.
   Loaded via $page['styles'] = ['conference.css'].
   ========================================================================= */

/* [hidden] must beat component display rules (.alert, .row, .fields are flex/grid) */
.cf [hidden], .paybar[hidden] { display: none !important; }

/* ---------- intro ---------- */
.cf-intro { max-width: 1100px; margin-bottom: clamp(28px, 4vw, 44px); }
.cf-intro .cf-facts { max-width: 900px; }
.cf-intro .display { margin-bottom: 16px; }
.cf-intro .display em { font-style: italic; font-weight: 500; color: var(--accent); }
.cf-intro .lede { margin: 0 0 24px; }
.cf-facts {
  list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--ink);
  display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 12px 40px;
  font-size: 15px; font-weight: 600; line-height: 1.4;
}
.cf-facts li { display: grid; gap: 2px; align-content: start; }
.cf-facts span { font-size: 13px; font-weight: 500; color: var(--muted); }
.cf-facts small { font-size: 13px; font-weight: 500; color: var(--muted); }
@media (max-width: 760px) { .cf-facts { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- form chrome (same as the competition form) ---------- */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.opt-label { font-weight: 400; color: var(--muted); }
.cf .panel-title { gap: 14px; }
.panel-lede { margin: -6px 0 18px; color: var(--muted); font-size: 15px; }
.cf .select:disabled, .cf .input:disabled { background-color: var(--mist); color: var(--faint); cursor: not-allowed; }

/* mobile gate */
.cf .input-group { position: relative; }
.cf .input-group .input { min-width: 0; }
#mobile-field .input { padding-right: 44px; }
.gate-icon { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; }
.is-checking .gate-icon { border: 2px solid var(--mist-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.is-ok .gate-icon {
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  border-radius: 50%; animation: pop .35s var(--ease);
}
.gate-status:empty { display: none; }
.gate-card {
  margin-top: 18px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--mist); display: grid; gap: 12px; font-size: 15px; animation: rise .4s var(--ease) both;
}
.gate-card p { margin: 0; }
.gate-card strong { display: block; font-size: 16px; margin-bottom: 2px; }
.gate-card .actions { margin: 0; }
.gate-card .btn { min-height: 44px; font-size: 16px; padding: 0 20px; }
.gate-card.is-registered { background: var(--ok-wash); border-color: #bfe3cf; }
.gate-card.is-pending { background: var(--warn-wash); border-color: #f1d9a3; }

/* progressive reveal of steps 2-5 */
.gated { margin-top: 20px; }
.js .gated:not(.is-open) { display: none; }
.js .gated.is-open > .panel { animation: rise .6s var(--ease) both; }
.js .gated.is-open > .panel:nth-child(2) { animation-delay: .07s; }
.js .gated.is-open > .panel:nth-child(3) { animation-delay: .14s; }
.js .gated.is-open > .panel:nth-child(4) { animation-delay: .21s; }

.offer-ribbon {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  margin: 0 0 22px; padding: 12px 16px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--accent) 7%, #fff); border-left: 3px solid var(--accent);
  font-size: 14px;
}
.offer-ribbon strong { color: var(--accent-ink); font-weight: 800; font-stretch: 85%; font-size: 16px; }

/* ---------- step 3 · pass cards ---------- */
fieldset.pass-field { border: 0; margin: 0; padding: 0; min-inline-size: 0; gap: 0; }
.passes { gap: 12px; }
.pass.opt { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 18px 20px; font-weight: 400; }
.pass.opt input { margin-top: 3px; }
.opt-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pass .opt-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; line-height: 1.1; }
.pass .opt-meta { display: grid; gap: 2px; font-size: 14px; line-height: 1.45; }
.pass .opt-meta b { color: var(--text); font-weight: 600; }
.pass-save { color: var(--ok); font-weight: 600; }
.pass-flag {
  font-family: var(--f-ui); font-size: 12px; font-weight: 700; letter-spacing: .01em;
  color: var(--on-accent); background: var(--accent-btn); border-radius: 999px; padding: 3px 10px; line-height: 1.3;
}
.pass .opt-price { display: grid; justify-items: end; gap: 1px; font-size: 22px; line-height: 1.1; padding-top: 2px; }
.pass .opt-price small { font-size: 12px; font-weight: 500; font-stretch: 100%; color: var(--muted); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.opt:has(input:checked) { background: color-mix(in srgb, var(--accent) 4%, #fff); }
.opt input:checked { animation: pop .3s var(--ease); }
.pass-field.has-error .opt { border-color: #f1b8b9; }
.pass-hint { margin: 12px 0 0; }
.pass-field .error { margin-top: 10px; }
@media (max-width: 520px) {
  .pass.opt { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 6px 12px; }
  .pass .opt-price { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; font-size: 19px; }
  .pass .opt-price s { display: inline; }
}

/* ---------- step 4 · tickets stepper + delegate rows ---------- */
.tickets { margin-bottom: 4px; }
.tickets-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.tickets-row .label { font-size: 15px; font-weight: 600; }
.stepper {
  display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); padding: 3px;
}
.stepper-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .15s var(--ease);
}
.stepper-btn:hover { background: var(--ink); color: #fff; }
.stepper-btn:active { transform: scale(.92); }
.stepper-btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.stepper-btn[aria-disabled="true"] { color: var(--faint); cursor: not-allowed; background: transparent; transform: none; }
.stepper-val {
  min-width: 48px; text-align: center; font-weight: 800; font-stretch: 80%; font-size: 1.6rem;
  line-height: 1; font-variant-numeric: tabular-nums; /* Bodoni's "1" reads as a capital I */
}
.tickets-calc { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tickets .hint { margin: 10px 0 0; }

.delegates { margin-top: 8px; }
.delegate {
  display: grid; grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows .45s var(--ease), opacity .3s ease;
}
.delegate.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
.delegate-inner { min-height: 0; overflow: hidden; padding: 22px 0 2px; border-top: 1px solid var(--line); margin-top: 20px; }
.delegate:first-child .delegate-inner { margin-top: 14px; }
.delegate-inner > .fields { padding: 4px; margin: -4px; } /* room for focus rings inside overflow:hidden */
.delegate-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.delegate-title {
  margin: 0; font-size: 16px; font-weight: 700; color: var(--ink);
  display: inline-flex; align-items: center; gap: 10px;
}
.delegate-title::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.delegate-sync {
  font-size: 12px; font-weight: 600; color: var(--ok); background: var(--ok-wash); border-radius: 999px; padding: 3px 10px;
}
.delegate-head .link-btn { margin-left: auto; font-size: 13px; color: var(--muted); }
.delegate-head .link-btn:hover { color: var(--red-deep); }
.delegate-head .delegate-resync:hover { color: var(--ink); }
.delegates-hint { margin: 16px 0 0; }

/* ---------- step 5 · coupon & GST (same as the competition form) ---------- */
.coupon-row { display: flex; gap: 10px; }
.coupon-row .input { flex: 1; min-width: 0; }
.coupon-row .btn { flex: none; min-width: 108px; }
.coupon-ok {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--ok-wash); color: var(--ok); border: 1px solid #bfe3cf; font-size: 15px;
  animation: rise .35s var(--ease) both;
}
.coupon-ok svg { flex: none; }
.coupon-ok b { letter-spacing: .04em; }
.link-btn {
  margin-left: auto; padding: 4px 2px; background: none; border: 0; cursor: pointer;
  font-weight: 700; font-size: 14px; color: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }
.mono { text-transform: uppercase; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.mono::placeholder { letter-spacing: .04em; }
.gst-fields { padding: 18px; border-radius: var(--r-md); background: var(--mist); animation: rise .35s var(--ease) both; }

/* ---------- right column: live badge + order ---------- */
.cf-side { position: sticky; top: 88px; display: grid; gap: 22px; align-content: start; }
.cf-side .reg-aside { position: static; }

/* the badge shrinks with the window height so the pay button stays on screen (conference.js sets the exact width) */
.badge-deck {
  position: relative; width: clamp(200px, calc((100vh - 640px) * .75), 100%); margin: 0 auto;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); transition: transform .6s var(--ease);
}
.badge-deck:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.badge-deck .badge-card { transform: none; z-index: 2; }
.badge-deck .badge-card:hover { transform: none; }
.deck-layer {
  position: absolute; inset: 0; border-radius: 14px; background: #111 center/cover no-repeat;
  box-shadow: var(--shadow-1); opacity: 0; filter: brightness(.55) grayscale(.4);
  transition: transform .5s var(--ease), opacity .35s ease;
}
.deck-layer.l1 { z-index: 1; }
.deck-layer.l2 { z-index: 0; }
.badge-deck[data-stack="1"] .l1,
.badge-deck[data-stack="2"] .l1 { opacity: 1; transform: translate(12px, -10px) rotate(3deg); }
.badge-deck[data-stack="2"] .l2 { opacity: .8; transform: translate(22px, -18px) rotate(6deg); }
/* badge type scales with the card (it changes size with the window), never with the viewport */
.cf .badge-card { container-type: inline-size; }
.cf .badge-card .slot { gap: .6cqw; }
.cf .badge-card .b-name { font-size: 6.6cqw; line-height: 1.05; max-width: 100%; }
.cf .badge-card .b-org { font-size: 3.3cqw; line-height: 1.2; }
.cf .badge-card .b-code { font-size: 3.3cqw; letter-spacing: .12em; margin-top: 1.2cqw; color: #111; }
.cf .badge-card .b-qr { margin-top: 1.2cqw; }
.deck-text { margin-top: 14px; text-align: center; }
.deck-caption { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 10px; }
.deck-caption .live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-ink);
}
.deck-caption .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: live 2.4s ease-in-out infinite; }
@keyframes live { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.deck-caption b { color: var(--text); font-weight: 700; }
.deck-note { display: none; margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* order summary (ticket) — mirrors competition.css */
.order {
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-2);
}
.order-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 18px 22px; background: var(--ink); color: #fff;
}
.order-head h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.order-count { font-size: 13px; color: rgba(255, 255, 255, .72); white-space: nowrap; }
.order-body { padding: 20px 22px 22px; }
.order-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.order-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 14px; font-size: 14px; animation: line-in .3s var(--ease) both; }
.order-lines .l-name { font-weight: 650; line-height: 1.3; }
.order-lines .l-group { font-size: 12px; color: var(--muted); }
.order-lines .l-amt { grid-column: 2; grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes line-in { from { opacity: 0; transform: translateY(-4px); } }
.order .summary { margin-top: 18px; font-size: 14px; }
.order .summary .row span:last-child { font-variant-numeric: tabular-nums; }
.order .summary .row.total { align-items: baseline; font-size: 15px; font-stretch: 100%; font-weight: 700; }
/* money stays in Archivo (as on the competition form): Bodoni's hairline comma reads like a decimal point */
.order .amount {
  font-weight: 800; font-stretch: 78%; font-size: 2.05rem; line-height: 1;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.amount.tick { animation: tick .45s var(--ease); }
@keyframes tick { from { opacity: .25; transform: translateY(6px); } }
.order-msg { margin: 14px 0 0; font-size: 14px; line-height: 1.45; animation: rise .35s var(--ease) both; }
.order .btn-lg { margin-top: 18px; }
.order .btn-label, .btn-amt { white-space: nowrap; }
@media (max-width: 420px) { .order .btn-lg { padding: 0 14px; font-size: 18px; } }
.btn-amt:not(:empty)::before { content: "·"; margin: 0 8px; opacity: .65; }
.order-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.order-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 0; font-size: 12px; color: var(--faint); text-align: center; }

/* not enough height for a big badge (set by conference.js): thumbnail with the caption beside it */
.cf-side.is-compact .cf-preview { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; }
.cf-side.is-compact .badge-deck { width: 100%; transform: none; }
.cf-side.is-compact .badge-deck[data-stack="1"] .l1,
.cf-side.is-compact .badge-deck[data-stack="2"] .l1 { transform: translate(6px, -5px) rotate(3deg); }
.cf-side.is-compact .badge-deck[data-stack="2"] .l2 { transform: translate(11px, -9px) rotate(6deg); }
.cf-side.is-compact .deck-text { margin: 0; text-align: left; }
.cf-side.is-compact .deck-caption { justify-content: flex-start; }
.cf-side.is-compact .deck-note { display: block; }
/* very short screens: the column scrolls with the page and the bottom pay bar keeps the total in view */
.cf-side.is-static { position: static; }
body.cf-short .paybar { display: flex; }

/* ---------- tablet / phone ---------- */
@media (max-width: 980px) {
  /* badge preview goes above the form, the order summary below it */
  .cf-side { display: contents; }
  .cf-preview { order: -1; position: static; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; align-items: center; }
  .badge-deck { width: 100%; transform: none; }
  .badge-deck:hover { transform: none; }
  .badge-deck[data-stack="1"] .l1,
  .badge-deck[data-stack="2"] .l1 { transform: translate(7px, -6px) rotate(3deg); }
  .badge-deck[data-stack="2"] .l2 { transform: translate(13px, -11px) rotate(6deg); }
  .deck-text { margin: 0; text-align: left; }
  .deck-caption { justify-content: flex-start; }
  .deck-note { display: block; }
  .order-aside { margin-top: 4px; }
  .js .cf-grid:not(.is-open) .order-aside { display: none; } /* phones: the total appears once the form opens */
}
@media (max-width: 420px) {
  .cf-preview { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; }
  .deck-note { font-size: 12px; }
  .coupon-row .btn { min-width: 90px; padding: 0 16px; }
  .stepper-btn { width: 40px; height: 40px; }
}

/* ---------- mobile pay bar (same as the competition form) ---------- */
.paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: none;
  align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); box-shadow: 0 -12px 30px -20px rgba(0, 0, 0, .45);
  transform: translateY(110%); transition: transform .35s var(--ease);
}
.paybar.is-on { transform: none; }
.paybar-sum { display: grid; line-height: 1.15; min-width: 0; }
.paybar-sum span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paybar-sum b { font-weight: 800; font-stretch: 80%; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.paybar .btn { min-height: 46px; flex: none; }
@media (max-width: 980px) { .paybar { display: flex; } }
body.has-paybar .toast-stack { bottom: 86px; }
body.has-paybar .site-foot { padding-bottom: 96px; }

/* ---------- closed / no passes ---------- */
.cf-closed { max-width: 640px; }
.cf-closed p { margin: 0 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .badge-deck, .badge-deck:hover { transform: none; }
  .deck-caption .live::before { animation: none; }
  .delegate { transition: none; }
}
