/*
 * Additions for the app pages, on top of the designer's style.css.
 * Their file is left as they made it; everything the app needs beyond it is here.
 */

/* ---------- basics ---------- */
.hidden { display: none !important; }
.register-card, .ddl-menu, .dropdown-menu { color-scheme: light; }
.register-card { color: var(--text); }
select.ddl-native { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn-ghost i { font-size: 1rem; }
.btn-ghost.is-current { background: rgba(247, 245, 242, .1); border-color: rgba(247, 245, 242, .3); }
/*.navbar .logo { width: 220px; height: auto; }*/
/*@media (max-width: 575.98px) {*/
/*    .navbar .logo { width: 112px; }*/
/*    .navbar .logo-name { font-size: .85rem; padding-left: 7px; margin-left: 6px; }*/
/*    .navbar .btn-ghost, .navbar .btn-ted1 { padding: .45rem .7rem; font-size: .8rem; gap: 6px; }*/
/*    .navbar .container { flex-wrap: nowrap; }*/
/*}*/
.tedx-menu { --bs-dropdown-bg: #14161f; --bs-dropdown-link-active-bg: var(--red); border: 1px solid rgba(247, 245, 242, .12); border-radius: 12px; padding: 6px; min-width: 200px; }
.tedx-menu .dropdown-item { border-radius: 8px; padding: .55rem .8rem; font-weight: 500; }
.tedx-menu form { margin: 0; }

/* ---------- inner pages: short dark hero above the white card ---------- */
.page-hero { padding-block: clamp(28px, 5vw, 56px) clamp(8px, 2vw, 16px); }
.page-hero .eyebrow { margin-bottom: .9rem; }
.page-hero h1 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; color: var(--paper); margin: 0; }
.page-hero h1 .accent { color: var(--gold); font-style: italic; font-family: "Fraunces", serif; font-weight: 600; }
.page-hero p.lead-text { color: #b7bcc9; max-width: 60ch; margin: .8rem 0 0; font-size: 1.02rem; line-height: 1.6; }
.register-section.compact { min-height: 0; padding-block: clamp(20px, 4vw, 40px) clamp(48px, 7vw, 88px); }

/* ---------- form bits ---------- */
.register-card label.form-label, .register-card .field-group > label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.field-error { margin-top: 6px; font-size: .8rem; font-weight: 600; color: #c62828; }
.field-error:empty { display: none; }
.field-hint { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.form-control.is-invalid, .ddl-native.is-invalid + .ddl .ddl-toggle { border-color: #c62828; box-shadow: 0 0 0 3px rgba(198, 40, 40, .12); }
.form-control[readonly] { background: #eef1ee; }
.btn-ted { text-decoration: none; }
.btn-ted:disabled { opacity: .6; cursor: not-allowed; }
.btn-ted.w-100 { width: 100%; }
.btn-ted .amount-tag { margin-left: auto; padding-left: 12px; font-weight: 800; }
.btn-ted.justify-between { justify-content: space-between; }
.btn-soft { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); color: var(--text); font-weight: 600; font-size: .95rem; padding: .75rem 1.3rem; border-radius: 10px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.btn-soft:hover { border-color: var(--red); color: var(--text); }
.link-red { color: var(--red); font-weight: 600; border-bottom: 1px solid rgba(229, 40, 59, .35); }
.link-red:hover { color: #c81f30; }
.muted { color: var(--muted); }
.consent-text a { text-decoration: none; }
.form-check-tedx { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--text); cursor: pointer; }
.form-check-tedx input { width: 18px; height: 18px; accent-color: var(--red); }

/* ---------- notes / alerts in the card ---------- */
.tedx-note { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 16px; font-size: .9rem; line-height: 1.5; border: 1px solid; margin-bottom: 20px; }
.tedx-note i { font-size: 1.1rem; line-height: 1.3; flex: none; }
.tedx-note.info { background: #f3f5f8; border-color: #dfe3ea; color: #2b3240; }
.tedx-note.ok { background: #eaf6ef; border-color: #b9e3c6; color: #1c7a43; }
.tedx-note.warn { background: var(--gold-soft); border-color: rgba(169, 114, 12, .25); color: #7a570a; }
.tedx-note.error { background: #fff4f3; border-color: #ffd3cf; color: #9e1f16; }
.tedx-note a { color: inherit; font-weight: 700; text-decoration: underline; }

/* ---------- category cards (prices come from the real price list) ---------- */
.category-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.category-card .register-btn { color: var(--text); font-weight: 500; }
.category-card:hover .register-btn { color: var(--red); }
.category-price { white-space: nowrap; }
.category-price.muted-price { background: var(--surface); border-color: var(--line); }
/* these widgets are <label>s inside .register-form, whose "label { display:block }" rule would flatten them */
.register-form label.category-card { display: flex; margin: 0; font-size: inherit; font-weight: inherit; color: var(--text); }
.register-form label.consent-check { display: flex; margin: 0; font-weight: inherit; }
.register-form label.speaker-card { display: block; margin: 0; font-size: inherit; font-weight: inherit; }
.early-tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #0a7d45; background: #dff3e8; padding: 2px 7px; border-radius: 999px; }
.category-card:focus-within { outline: 3px solid rgba(229, 40, 59, .25); outline-offset: 2px; }

/* ---------- speaker cards ---------- */
.speaker-card input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.speaker-card:focus-within { outline: 3px solid rgba(229, 40, 59, .25); outline-offset: 2px; }
.speaker-avatar.initial { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: var(--muted); }
.speaker-price { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: .85rem; font-weight: 800; color: var(--text); }
.speaker-state { font-size: .74rem; font-weight: 700; color: var(--muted); }
.seats-left.seats-low { color: #8a1f2b; background: #fbdcdf; }
.speaker-empty { padding: 18px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: .9rem; text-align: center; }
.picker-notice { font-size: .85rem; font-weight: 600; color: #7a570a; background: var(--gold-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
/* General Public: every talk is included (ticked and locked), or why it cannot be booked right now */
.picker-all { font-size: .85rem; font-weight: 600; color: var(--text); background: var(--surface, #f6f6f7); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.picker-all.picker-all-blocked { color: #8a1f2b; background: #fbdcdf; border-color: #f3b9bf; }
.speaker-card.speaker-card-locked { cursor: default; }
.speaker-card.speaker-card-locked:hover { transform: none; }
/* General Public card: the total, with "for all N talks" on its own line under it */
.category-all-note { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
/* the designer's section clips its moving background with overflow:hidden, which also stops the sticky
   submit bar (with its total) from sticking; "clip" cuts the same way without that side effect */
.register-section { overflow: hidden; overflow: clip; }
/* ...and a field you tab to near the bottom of the screen is never hidden under that bar */
html:has(.submit-bar) { scroll-padding-bottom: 140px; }

/* ---------- sticky total + submit ---------- */
.submit-bar { position: sticky; bottom: 0; z-index: 5; background: linear-gradient(to top, #fff 75%, rgba(255, 255, 255, 0)); padding: 18px 0 6px; margin-top: 8px; }
.submit-bar .small-note { text-align: center; font-size: .8rem; color: var(--muted); margin: 8px 0 0; }

/* ---------- lists inside the card (tickets, order lines, details) ---------- */
.tedx-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.tedx-list > li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.date-tile { flex: none; width: 58px; height: 64px; border-radius: 14px; background: var(--red); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.date-tile .m { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.date-tile .d { font-family: "Manrope", sans-serif; font-size: 1.6rem; font-weight: 800; }
.date-tile.used { background: #9a9a9a; }
.item-title { font-weight: 800; font-size: 1.02rem; color: var(--text); margin: 0; }
.item-sub { font-size: .88rem; color: #3d4352; font-style: italic; margin: 2px 0 0; }
.item-meta { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 700; border: 0; }
.pill-btn:hover { background: var(--red); color: #fff; }
.text-btn { font-size: .82rem; font-weight: 700; color: var(--muted); }
.text-btn:hover { color: var(--red); }
.status-chip { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: .72rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.status-chip.used { background: #fff4d6; color: #8a5a00; }
.status-chip.refunded { background: #e8f0fc; color: #1f5fbf; }
.status-chip.cancelled, .status-chip.over { background: #eef0f3; color: #5b6270; }
.status-chip.attended { background: #dff3e8; color: #0a7d45; }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); font-size: .92rem; }
.kv li span:first-child { color: var(--muted); }
.kv li span:last-child { font-weight: 600; text-align: right; color: var(--text); word-break: break-word; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; border-top: 2px solid var(--text); margin-top: 4px; }
.total-row .lbl { font-weight: 800; }
.total-row .amt { font-family: "Manrope", sans-serif; font-size: 1.9rem; font-weight: 800; }

/* ---------- dark callout (pending payment, countdown) ---------- */
.callout-dark { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--ink); color: #fff; border-radius: 16px; padding: 16px 18px; margin-bottom: 22px; }
.callout-dark .t { font-weight: 800; margin: 0; }
.callout-dark .s { font-size: .82rem; color: #b7bcc9; margin: 2px 0 0; }
.callout-dark .btn-ted1 { white-space: nowrap; }
.countdown { font-family: "Manrope", sans-serif; font-weight: 800; font-size: clamp(2.6rem, 7vw, 3.6rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- profile summary in the info column ---------- */
.who { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px; }
.who img, .who .ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: #eceef2; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); }
.who .n { font-weight: 800; margin: 0; }
.who .c { font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- ticket image page ---------- */
.ticket-shot { position: relative; max-width: 760px; margin: 0 auto; }
.ticket-shot img { display: block; width: 100%; height: auto; border-radius: 14px; }
/* phones: the QR area of the ticket image (x 1110-1530, y 260-880 of 1600 x 1200), shown large */
.qr-crop { width: 100%; max-width: 320px; margin: 0 auto 12px; aspect-ratio: 420 / 620; background-color: #0b0b0b; background-repeat: no-repeat; background-size: 380.95% auto; background-position: 94.07% 44.83%; border-radius: 18px; }
/* older iPhones (before iOS 15) have no aspect-ratio: give the box a fixed size instead */
@supports not (aspect-ratio: 1 / 1) { .qr-crop { width: 320px; max-width: 100%; height: 472px; } }
.ticket-shot.used img { opacity: .4; filter: grayscale(1); }
.used-stamp { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.used-stamp span { transform: rotate(-12deg); border: 6px solid #e8a100; background: rgba(255, 255, 255, .9); color: #b07a00; border-radius: 16px; padding: 8px 22px; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 2.6rem; }

/* ---------- legal pages ---------- */
.legal-body { max-width: 72ch; color: #2b3240; font-size: 1rem; line-height: 1.75; }
.legal-body h2 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--text); margin: 1.6rem 0 .4rem; }
.legal-body section:first-child h2 { margin-top: 0; }

/* ---------- footer: season line ---------- */
.footer-season { margin: .9rem auto 0; color: #fff; font-weight: 600; letter-spacing: .02em; }

/* ---------- small screens ---------- */
@media (max-width: 575.98px) {
    .register-card { border-radius: 16px; }
    .callout-dark { flex-direction: column; align-items: flex-start; }
    .wizard-progress { gap: 8px; }
    .wp-step { font-size: .8rem; padding: 6px 12px 6px 6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- pay page ---------- */
.pay-msg { text-align: center; font-size: .88rem; font-weight: 600; margin: 10px 0 0; }
.pay-msg:empty { display: none; }
.pay-msg.ok { color: #0a8f4e; }
.pay-msg.err { color: #c62828; }
.min-w-0 { min-width: 0; }
.flex-none { flex: none; }

/* profile: the three category cards stay in one row, also on phones */
.category-grid.compact-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.compact-cats .category-card { align-items: center; text-align: center; padding: 14px 8px !important; gap: 8px; }
.compact-cats .category-icon { width: 40px; height: 40px; }
.compact-cats .category-name { font-size: .9rem; }
/* phones: the side panel (title, intro) comes first, with a rule under it */
@media (max-width: 991.98px) {
    .register-card .register-info { height: auto; border-bottom: 1px solid var(--line-soft); padding-bottom: 24px; }
}
