/* EventRail Tickets — front end.
   The section is a ticket stub: a date panel on the left, a punched perforation, and the
   counterfoil with the rows and the total. The holes are real — each half masks its own edge with
   a CSS mask, so whatever sits behind the stub shows through. `body` scoping beats
   equal-specificity theme rules without !important. Colours derive from EventRail's tokens
   (--tder-accent and friends) so one accent rethemes it; a site may also set --tder-accent-2
   (the second colour) and the three font stacks. */

/* The "Get Tickets" button near the top of an event jumps to this section: glide there, and stop
   a little short so the heading has air above it. Only on pages that hold the section, and not
   for a visitor who has asked their device for less motion. */
@media (prefers-reduced-motion: no-preference) {
	html:has(#tdet-tickets) { scroll-behavior: smooth; }
}
body #tdet-tickets { scroll-margin-top: 32px; }

body .tdet {
	--tdet-plum: var(--tder-accent, #663366);
	--tdet-plum-deep: var(--tder-accent-deep, color-mix(in srgb, var(--tder-accent, #663366) 72%, #000));
	--tdet-plum-soft: var(--tder-accent-soft, color-mix(in srgb, var(--tder-accent, #663366) 10%, #fff));
	--tdet-berry: color-mix(in srgb, var(--tdet-plum) 68%, #e0407f);
	--tdet-teal: var(--tder-accent-2, #88c3c3);
	--tdet-teal-deep: var(--tder-accent-2-deep, color-mix(in srgb, var(--tder-accent-2, #88c3c3) 55%, #000));
	--tdet-ink: var(--tder-ink, #231b24);
	--tdet-muted: var(--tder-muted, #6f636f);
	--tdet-line: var(--tder-line, #ddd3dd);
	--tdet-line-soft: color-mix(in srgb, var(--tdet-line) 55%, #fff);
	--tdet-card: #fff;
	--tdet-off: color-mix(in srgb, var(--tdet-muted) 50%, #fff);
	--tdet-error: #b00020;
	--tdet-font-body: var(--tder-font-body, "Open Sans", system-ui, sans-serif);
	--tdet-font-caps: var(--tder-font-caps, Raleway, "Open Sans", system-ui, sans-serif);
	--tdet-font-display: var(--tder-font-display, "Cormorant Garamond", Georgia, serif);
	--tdet-panel-w: 190px;
	container-type: inline-size;
	container-name: tdet;
	margin: 2em 0 2.5em;
	font-family: var(--tdet-font-body);
	font-size: 16px;
	line-height: 1.5;
	color: var(--tdet-ink);
}
body .tdet .amount, body .tdet .woocommerce-Price-amount, body .tdet .woocommerce-Price-currencySymbol { font: inherit; color: inherit; }

body .tdet__heading { margin: 0 0 16px; font: 700 13px/1.2 var(--tdet-font-caps); letter-spacing: .18em; text-transform: uppercase; color: var(--tdet-plum-deep); }
body .tdet__fineprint { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--tdet-muted); }
body .tdet__fineprint span + span::before { content: " · "; }
body .tdet__fineprint a { color: var(--tdet-plum); }

/* ---------- the stub ---------- */
body .tdet-stub { position: relative; display: grid; grid-template-columns: var(--tdet-panel-w) minmax(0, 1fr); background: transparent; border: 1px solid var(--tdet-line); border-radius: 4px; }

/* ---------- date panel ---------- */
body .tdet-panel { position: relative; display: flex; flex-direction: column; min-height: 340px; padding: 22px 16px 18px; color: #fff; background: var(--tdet-plum); border-radius: 3px 0 0 3px; overflow: hidden; isolation: isolate; -webkit-mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); -webkit-mask-size: 7px 14px, 100% 100%; -webkit-mask-position: right top, 0 0; -webkit-mask-repeat: repeat-y, no-repeat; mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); mask-size: 7px 14px, 100% 100%; mask-position: right top, 0 0; mask-repeat: repeat-y, no-repeat; }
body .tdet-panel > * { position: relative; z-index: 2; }
body .tdet-panel__img, body .tdet-panel__tint, body .tdet-panel__pat, body .tdet-panel__ring { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
body .tdet-panel--photo .tdet-panel__img { background: var(--tdet-photo) center 20% / cover no-repeat; filter: grayscale(1) contrast(1.05); opacity: .55; mix-blend-mode: luminosity; }
body .tdet-panel--photo .tdet-panel__tint { z-index: 1; background: linear-gradient(180deg, color-mix(in srgb, var(--tdet-plum) 35%, transparent) 0%, color-mix(in srgb, var(--tdet-plum-deep) 75%, transparent) 60%, color-mix(in srgb, var(--tdet-plum-deep) 92%, #000) 100%); }
body .tdet-panel--guilloche { background: linear-gradient(160deg, var(--tdet-berry) 0%, var(--tdet-plum) 45%, var(--tdet-plum-deep) 100%); }
body .tdet-panel--guilloche .tdet-panel__pat { opacity: .18; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.55) 0 1px, transparent 1px 7px), repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 1px, transparent 1px 11px); }
body .tdet-panel--guilloche .tdet-panel__ring { inset: auto; right: -120px; top: -60px; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
body .tdet-panel--guilloche .tdet-panel__ring--2 { right: -150px; top: -90px; width: 320px; height: 320px; opacity: .6; }
body .tdet-panel--guilloche .tdet-panel__mon { color: var(--tdet-teal); }

body .tdet-panel__mon { display: block; font: 600 11px/1 var(--tdet-font-caps); letter-spacing: .24em; text-transform: uppercase; opacity: .9; }
body .tdet-panel__day { display: block; margin: 8px 0 6px; font: 600 88px/.9 var(--tdet-font-caps); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.04em; }
body .tdet-panel__meta { display: block; }
body .tdet-panel__wk { display: block; font: 400 15px/1.3 var(--tdet-font-body); opacity: .95; }
body .tdet-panel__time { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.28); font: 400 14px/1.3 var(--tdet-font-body); opacity: .95; }
body .tdet-panel__bot { margin-top: auto; padding-top: 16px; }
body .tdet-panel__serial { display: block; font: 600 10px/1.5 var(--tdet-font-caps); letter-spacing: .16em; text-transform: uppercase; opacity: .75; overflow-wrap: anywhere; }
body .tdet-panel__serial span { display: block; }
body .tdet-panel__dates { margin-top: 8px; }
body .tdet-panel__change { display: inline-block; list-style: none; font: 600 10px/1 var(--tdet-font-caps); letter-spacing: .14em; text-transform: uppercase; color: #fff; text-decoration: underline; text-underline-offset: 3px; opacity: .85; cursor: pointer; }
body .tdet-panel__change::-webkit-details-marker { display: none; }
body .tdet-panel__change:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
body .tdet-panel__dates select { display: block; width: 100%; max-width: 100%; margin: 8px 0 0; padding: 6px 8px; font: 400 13px/1.2 var(--tdet-font-body); color: var(--tdet-ink); background: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; }
body .tdet-panel__go { margin-top: 6px; font: 600 10px/1 var(--tdet-font-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--tdet-plum); background: #fff; border: 0; border-radius: 3px; padding: 8px 10px; }
body .tdet-panel__step { display: block; font: 600 10px/1.5 var(--tdet-font-caps); letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
body .tdet-panel__step b { display: block; margin-top: 4px; font: 600 22px/1 var(--tdet-font-caps); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.01em; }
body .tdet-panel__ticks { display: flex; gap: 4px; margin-top: 10px; }
body .tdet-panel__ticks i { display: block; flex: 1 1 0; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); }
body .tdet-panel__ticks i.is-on { background: var(--tdet-teal); }
body .tdet-panel__ticks i.is-done { background: rgba(255,255,255,.75); }

/* ---------- counterfoil ---------- */
body .tdet-main { display: flex; flex-direction: column; min-width: 0; padding: 22px 26px 22px 32px; background: var(--tdet-card); border-radius: 0 3px 3px 0; -webkit-mask-image: radial-gradient(circle at 0 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, transparent 7px, #000 7px); -webkit-mask-size: 7px 14px, 100% 100%; -webkit-mask-position: left top, 0 0; -webkit-mask-repeat: repeat-y, no-repeat; mask-image: radial-gradient(circle at 0 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, transparent 7px, #000 7px); mask-size: 7px 14px, 100% 100%; mask-position: left top, 0 0; mask-repeat: repeat-y, no-repeat; }
body .tdet-main__title { margin: 0 0 3px; font: 500 26px/1.15 var(--tdet-font-display); color: var(--tdet-ink); text-wrap: balance; }
body .tdet-main__title:last-child, body .tdet-main__title + .tdet__form { margin-top: 0; }
body .tdet-main__title + .tdet__form, body .tdet-main__title + .tdet-foil { margin-top: 20px; }
body .tdet-main__place { margin: 0 0 24px; font-size: 14.5px; color: var(--tdet-muted); }
body .tdet__form { display: flex; flex-direction: column; flex: 1 1 auto; margin: 0; }
body .tdet-main__scale { margin: 0 0 6px; font: 600 11px/1 var(--tdet-font-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--tdet-plum); }

body .tdet-line { display: grid; grid-template-columns: minmax(0, 1fr) 88px 116px; align-items: center; gap: 8px 20px; padding: 14px 0; border-top: 1px solid var(--tdet-line-soft); }
body .tdet-line:first-child { border-top-color: var(--tdet-line); }
body .tdet-line__name { min-width: 0; font: 600 16px/1.3 var(--tdet-font-body); color: var(--tdet-ink); }
body .tdet-line__st { display: inline-block; margin-left: 8px; font: 600 10px/1 var(--tdet-font-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--tdet-muted); vertical-align: 1px; white-space: nowrap; }
body .tdet-line__st--left { color: var(--tdet-teal-deep); }
body .tdet-line__desc { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--tdet-muted); }
body .tdet-line__price { font: 600 17px/1 var(--tdet-font-body); font-variant-numeric: lining-nums tabular-nums; text-align: right; color: var(--tdet-ink); white-space: nowrap; }
body .tdet-line--off .tdet-line__label, body .tdet-line--off .tdet-line__price { color: var(--tdet-off); }

/* the control everyone already knows: round − / + around a plain numeral */
body .tdet-qty { display: inline-grid; grid-template-columns: 36px 44px 36px; align-items: center; justify-items: center; justify-self: end; width: 116px; }
body .tdet-qty__btn { appearance: none; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 1.5px solid var(--tdet-plum); border-radius: 50%; background: var(--tdet-card); color: var(--tdet-plum); font: 400 22px/1 var(--tdet-font-body); letter-spacing: 0; text-transform: none; box-shadow: none; cursor: pointer; }
body .tdet-qty__btn:hover { background: var(--tdet-plum-soft); color: var(--tdet-plum); }
body .tdet-qty__btn:focus-visible { outline: 2px solid var(--tdet-plum); outline-offset: 2px; }
body .tdet-qty__btn[disabled] { border-color: color-mix(in srgb, var(--tdet-line) 80%, #000); color: var(--tdet-off); background: var(--tdet-card); cursor: default; }
body .tdet-qty__input { width: 44px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 3px; background: transparent; box-shadow: none; text-align: center; font: 600 18px/1 var(--tdet-font-body); font-variant-numeric: lining-nums tabular-nums; color: var(--tdet-ink); -moz-appearance: textfield; appearance: textfield; }
body .tdet-qty__input::-webkit-outer-spin-button, body .tdet-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body .tdet-qty__input.is-zero { color: var(--tdet-off); }
body .tdet-qty__input:focus-visible { outline: 2px solid var(--tdet-plum); outline-offset: 0; color: var(--tdet-ink); }

body .tdet-foil { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 18px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--tdet-line); }
body .tdet-foil__sum { min-width: 0; }
body .tdet-foil__count { display: block; font: 600 11px/1 var(--tdet-font-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--tdet-muted); }
body .tdet-foil__total { display: block; margin-top: 8px; font: 600 28px/1 var(--tdet-font-body); font-variant-numeric: lining-nums tabular-nums; color: var(--tdet-ink); }
body .tdet-foil__breakdown { display: block; margin-top: 4px; font-size: 13.5px; color: var(--tdet-muted); }
body .tdet-foil__breakdown:empty { display: none; }
body .tdet-foil__notice { margin: 0; font-size: 15px; color: var(--tdet-muted); }

body .tdet-btn { display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 17px 26px; border: 0; border-radius: 3px; background: var(--tdet-plum); color: #fff; font: 700 12.5px/1 var(--tdet-font-caps); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; white-space: nowrap; box-shadow: none; cursor: pointer; }
body .tdet-btn:hover, body .tdet-btn:focus { background: var(--tdet-plum-deep); color: #fff; }
body .tdet-btn:focus-visible { outline: 2px solid var(--tdet-plum); outline-offset: 3px; }
body .tdet-btn[disabled] { background: color-mix(in srgb, var(--tdet-plum) 28%, #fff); color: #fff; cursor: not-allowed; }

/* ---------- narrow containers: the panel becomes a banner ---------- */
@container tdet (max-width: 620px) {
	body .tdet-stub { grid-template-columns: 1fr; }
	body .tdet-stub .tdet-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; align-items: end; min-height: 0; padding: 16px 16px 14px; border-radius: 3px 3px 0 0; -webkit-mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(180deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); -webkit-mask-size: 14px 7px, 100% 100%; -webkit-mask-position: left bottom, 0 0; -webkit-mask-repeat: repeat-x, no-repeat; mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(180deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); mask-size: 14px 7px, 100% 100%; mask-position: left bottom, 0 0; mask-repeat: repeat-x, no-repeat; }
	body .tdet-stub .tdet-panel__mon { grid-column: 1; grid-row: 1; }
	body .tdet-stub .tdet-panel__day { grid-column: 1; grid-row: 2; margin: 2px 0 0; font-size: 52px; }
	body .tdet-stub .tdet-panel__meta { grid-column: 2; grid-row: 1 / 3; align-self: end; text-align: right; }
	body .tdet-stub .tdet-panel__time { margin: 0; padding: 0; border: 0; }
	body .tdet-stub .tdet-panel__bot { display: none; }
	body .tdet-stub .tdet-panel--guilloche .tdet-panel__ring { top: -180px; }
	body .tdet-stub .tdet-panel--guilloche .tdet-panel__ring--2 { top: -220px; }
	body .tdet-stub .tdet-main { padding: 14px 16px 16px; border-radius: 0 0 3px 3px; -webkit-mask-image: radial-gradient(circle at 7px 0, transparent 3.5px, #000 4px), linear-gradient(180deg, transparent 7px, #000 7px); -webkit-mask-size: 14px 7px, 100% 100%; -webkit-mask-position: left top, 0 0; -webkit-mask-repeat: repeat-x, no-repeat; mask-image: radial-gradient(circle at 7px 0, transparent 3.5px, #000 4px), linear-gradient(180deg, transparent 7px, #000 7px); mask-size: 14px 7px, 100% 100%; mask-position: left top, 0 0; mask-repeat: repeat-x, no-repeat; }
	body .tdet-stub .tdet-main__title { font-size: 21px; }
	body .tdet-stub .tdet-line { grid-template-columns: minmax(0, 1fr) 100px; gap: 2px 10px; padding: 11px 0; }
	body .tdet-stub .tdet-line__name { grid-column: 1; font-size: 15px; }
	body .tdet-stub .tdet-line__price { grid-column: 1; text-align: left; font-size: 15px; }
	body .tdet-stub .tdet-line__price:empty { display: none; }
	body .tdet-stub .tdet-qty { grid-column: 2; grid-row: 1 / 3; grid-template-columns: 32px 36px 32px; width: 100px; }
	body .tdet-stub .tdet-qty__btn { width: 32px; height: 32px; font-size: 20px; }
	body .tdet-stub .tdet-qty__input { width: 36px; font-size: 16px; }
	body .tdet-stub .tdet-foil { position: sticky; bottom: 0; z-index: 2; margin-top: 14px; padding: 12px 0 0; align-items: center; background: var(--tdet-card); }
	body .tdet-stub .tdet-foil__total { margin-top: 5px; font-size: 22px; }
	body .tdet-stub .tdet-btn { padding: 14px 18px; font-size: 11.5px; }
}

/* ---------- the attendee dialog: the same object ---------- */
body .tdet-modal { width: min(780px, 94vw); max-width: 94vw; height: min(760px, 88vh); max-height: 88vh; padding: 0; border: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4); background: var(--tdet-card); color: var(--tdet-ink); font-family: var(--tdet-font-body); font-size: 16px; line-height: 1.5; } /* white behind the masked halves: the holes read as light punched paper, not as the dark scrim */
body .tdet-modal:not([open]) { display: none !important; }
body .tdet-modal::backdrop { background: rgba(24, 10, 26, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body .tdet-modal .tdet-modal__form { --tdet-panel-w: 200px; position: relative; display: grid; grid-template-columns: var(--tdet-panel-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; margin: 0; }
body .tdet-modal .tdet-panel { min-height: 0; padding: 24px 18px 20px; border-radius: 0; -webkit-mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); -webkit-mask-size: 7px 14px, 100% 100%; -webkit-mask-position: right top, 0 0; -webkit-mask-repeat: repeat-y, no-repeat; mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); mask-size: 7px 14px, 100% 100%; mask-position: right top, 0 0; mask-repeat: repeat-y, no-repeat; }
body .tdet-modal .tdet-panel__day { font-size: 72px; }
body .tdet-modal .tdet-panel__wk { font-size: 14.5px; }
body .tdet-modal .tdet-panel__time { margin-top: 10px; padding-top: 10px; font-size: 13.5px; }
body .tdet-modal .tdet-modal__main { display: flex; flex-direction: column; min-height: 0; height: 100%; padding: 26px 32px 22px 36px; background: var(--tdet-card); -webkit-mask-image: radial-gradient(circle at 0 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, transparent 7px, #000 7px); -webkit-mask-size: 7px 14px, 100% 100%; -webkit-mask-position: left top, 0 0; -webkit-mask-repeat: repeat-y, no-repeat; mask-image: radial-gradient(circle at 0 7px, transparent 3.5px, #000 4px), linear-gradient(90deg, transparent 7px, #000 7px); mask-size: 7px 14px, 100% 100%; mask-position: left top, 0 0; mask-repeat: repeat-y, no-repeat; }
body .tdet-modal .tdet-modal__head { flex: 0 0 auto; padding-right: 36px; } /* room for the close button */
body .tdet-modal .tdet-modal__close { position: absolute; top: 10px; right: 12px; z-index: 3; appearance: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; font: 400 30px/1 var(--tdet-font-body); color: var(--tdet-muted); cursor: pointer; }
body .tdet-modal .tdet-modal__close:hover { background: var(--tdet-line-soft); color: var(--tdet-plum); }
body .tdet-modal .tdet-modal__close:focus-visible { outline: 2px solid var(--tdet-plum); outline-offset: 2px; }
body .tdet-modal .tdet-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
body .tdet-modal .tdet-modal__title { margin: 0 0 3px; font: 500 31px/1.15 var(--tdet-font-display); color: var(--tdet-ink); outline: none; }
body .tdet-modal .tdet-modal__sub { margin: 0 0 18px; font-size: 15px; color: var(--tdet-muted); }
body .tdet-modal .tdet-modal__scroll { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
/* The body scrolls; the plugin draws its own rail (right edge) so the cue is the same in every
   browser and OS — native bars hide themselves on a Mac. Wheel, touch and keys still scroll. */
body .tdet-modal .tdet-modal__body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 2px 18px 6px 2px; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; }
body .tdet-modal .tdet-modal__body::-webkit-scrollbar { display: none; width: 0; height: 0; }
body .tdet-modal .tdet-modal__rail { position: absolute; top: 4px; bottom: 10px; right: 0; width: 6px; border-radius: 3px; background: var(--tdet-line-soft); pointer-events: none; }
body .tdet-modal .tdet-modal__rail i { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: 3px; background: color-mix(in srgb, var(--tdet-plum) 65%, #fff); }
body .tdet-modal .tdet-modal__rail[hidden] { display: none; }
body .tdet-modal .tdet-modal__more { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 2; margin: 0; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--tdet-plum); color: #fff; font: 700 11px/1 var(--tdet-font-caps); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 18px rgba(40, 10, 40, .28); cursor: pointer; }
body .tdet-modal .tdet-modal__more:hover { background: var(--tdet-plum-deep); color: #fff; }
body .tdet-modal .tdet-modal__more:focus-visible { outline: 2px solid var(--tdet-plum); outline-offset: 3px; }
body .tdet-modal .tdet-modal__more[hidden] { display: none; }
body .tdet-modal .tdet-modal__body.has-more::after { content: ""; position: sticky; bottom: -6px; display: block; height: 44px; margin-top: -44px; background: linear-gradient(to bottom, rgba(255,255,255,0), var(--tdet-card) 80%); pointer-events: none; }
body .tdet-modal .tdet-modal__foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--tdet-line); background: var(--tdet-card); }
body .tdet-modal .tdet-modal__back { appearance: none; margin: 0; padding: 6px 0; border: 0; background: none; box-shadow: none; font: 600 11px/1 var(--tdet-font-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--tdet-muted); cursor: pointer; }
body .tdet-modal .tdet-modal__back:hover { color: var(--tdet-plum); background: none; }
body .tdet-modal .tdet-modal__back:focus-visible { outline: 2px solid var(--tdet-plum); outline-offset: 3px; }
body .tdet-modal .tdet-modal__continue { padding: 14px 22px; font-size: 12px; }
body .tdet-step[hidden] { display: none; }
body .tdet-modal .tdet-modal__names { display: block; }
body .tdet-modal .tdet-modal__holder[hidden] { display: none; }
body .tdet-modal .tdet-q--for .tdet-q__option > span { display: block; }
body .tdet-modal .tdet-q--for .tdet-q__option .tdet-q__help { margin-top: 0; }
/* "Me" on a ticket when another ticket already has it: shown as taken, still tappable (it moves) */
body .tdet-modal .tdet-q--for label.tdet-q__option.is-taken { color: var(--tdet-muted); }
body .tdet-modal .tdet-q--for .tdet-q__option.is-taken input { border-style: dashed; }
body .tdet-modal .tdet-modal__rule { margin: 4px 0 14px; padding-top: 16px; border-top: 1px solid var(--tdet-line-soft); font: 600 11px/1 var(--tdet-font-caps); letter-spacing: .16em; text-transform: uppercase; color: var(--tdet-plum); }
body .tdet-modal .tdet-modal__block + .tdet-modal__block { margin-top: 6px; }

/* fields: one column, boxed, a readable label above each; choices are plain radios and checkboxes */
body .tdet-modal .tdet-q { position: relative; margin: 0 0 20px; max-width: 480px; }
body .tdet-modal .tdet-q > label, body .tdet-modal .tdet-q legend { display: block; float: none; width: auto; margin: 0 0 8px; padding: 0; font: 600 16px/1.35 var(--tdet-font-body); letter-spacing: 0; text-transform: none; color: var(--tdet-ink); }
body .tdet-modal .tdet-q__label { font: inherit; }
body .tdet-modal .tdet-q .required { margin-left: 3px; border: 0; text-decoration: none; color: var(--tdet-plum); }
body .tdet-modal .tdet-q__help { display: block; margin-top: 2px; font: 400 14px/1.4 var(--tdet-font-body); letter-spacing: 0; text-transform: none; color: var(--tdet-muted); }
body .tdet-modal .tdet-q input[type="text"], body .tdet-modal .tdet-q input[type="email"], body .tdet-modal .tdet-q input[type="tel"], body .tdet-modal .tdet-q select, body .tdet-modal .tdet-q textarea { width: 100%; max-width: none; margin: 0; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--tdet-muted) 45%, #fff); border-radius: 3px; background: var(--tdet-card); box-shadow: none; outline: 0; font: 400 17px/1.3 var(--tdet-font-body); color: var(--tdet-ink); }
body .tdet-modal .tdet-q textarea { min-height: 4.5em; resize: vertical; }
body .tdet-modal .tdet-q input:focus, body .tdet-modal .tdet-q select:focus, body .tdet-modal .tdet-q textarea:focus { border-color: var(--tdet-plum); box-shadow: inset 0 0 0 1px var(--tdet-plum); outline: 0; }
body .tdet-modal .tdet-q__group { margin: 0; padding: 0; border: 0; min-width: 0; }
body .tdet-modal .tdet-q__options { display: grid; grid-template-columns: 1fr; gap: 10px; }
body .tdet-modal .tdet-q label.tdet-q__option { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 2px 0; border: 0; border-radius: 0; background: none; font: 400 17px/1.35 var(--tdet-font-body); letter-spacing: 0; text-transform: none; color: var(--tdet-ink); cursor: pointer; }
body .tdet-modal .tdet-q__option input { appearance: none; -webkit-appearance: none; flex: 0 0 22px; width: 22px; height: 22px; margin: 1px 0 0; padding: 0; display: grid; place-items: center; border: 1.5px solid color-mix(in srgb, var(--tdet-muted) 70%, #fff); border-radius: 50%; background: var(--tdet-card); box-shadow: none; cursor: pointer; }
body .tdet-modal .tdet-q__option input[type="checkbox"] { border-radius: 3px; }
body .tdet-modal .tdet-q__option input::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; transform: scale(0); }
body .tdet-modal .tdet-q__option input[type="checkbox"]::before { width: 6px; height: 10px; border-radius: 0; border: solid #fff; border-width: 0 2px 2px 0; background: none; transform: scale(0); }
body .tdet-modal .tdet-q__option input:checked { border-color: var(--tdet-plum); background: var(--tdet-plum); }
body .tdet-modal .tdet-q__option input:checked::before { transform: scale(1); }
body .tdet-modal .tdet-q__option input[type="checkbox"]:checked::before { transform: rotate(45deg) translate(-1px, -1px); }
body .tdet-modal .tdet-q__option input:focus-visible { outline: 2px solid var(--tdet-plum); outline-offset: 2px; }
body .tdet-modal .tdet-q--error input[type="text"], body .tdet-modal .tdet-q--error input[type="email"], body .tdet-modal .tdet-q--error input[type="tel"], body .tdet-modal .tdet-q--error select, body .tdet-modal .tdet-q--error textarea, body .tdet-modal .tdet-q--error .tdet-q__option input { border-color: var(--tdet-error); }
body .tdet-modal .tdet-q__error { display: block; margin-top: 6px; font-size: 14px; color: var(--tdet-error); }
body .tdet-modal .tdet-q__note, body .tdet-checkout .tdet-q__note { margin: 0; font: 400 15px/1.5 var(--tdet-font-body, inherit); color: var(--tdet-muted, #666); }
body .tdet-modal .tdet-q--instruction { max-width: none; }

@media (max-width: 640px) {
	body .tdet-modal { width: 100vw; max-width: 100vw; height: 92vh; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
	body .tdet-modal .tdet-modal__form { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
	body .tdet-modal .tdet-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; align-items: end; padding: 16px 16px 14px; border-radius: 14px 14px 0 0; -webkit-mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(180deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); -webkit-mask-size: 14px 7px, 100% 100%; -webkit-mask-position: left bottom, 0 0; -webkit-mask-repeat: repeat-x, no-repeat; mask-image: radial-gradient(circle at 7px 7px, transparent 3.5px, #000 4px), linear-gradient(180deg, #000 calc(100% - 7px), transparent calc(100% - 7px)); mask-size: 14px 7px, 100% 100%; mask-position: left bottom, 0 0; mask-repeat: repeat-x, no-repeat; }
	body .tdet-modal .tdet-panel__mon { grid-column: 1; grid-row: 1; }
	/* On a phone the close button sits on the date panel: white on plum, and the step count moves left of it. */
	body .tdet-modal .tdet-modal__close { top: 6px; right: 6px; color: #fff; }
	body .tdet-modal .tdet-modal__close:hover { background: rgba(255, 255, 255, .16); color: #fff; }
	body .tdet-modal .tdet-modal__close:focus-visible { outline-color: #fff; }
	body .tdet-modal .tdet-modal__head { padding-right: 0; }
	body .tdet-modal .tdet-panel__day { grid-column: 1; grid-row: 2; margin: 2px 0 0; font-size: 48px; }
	body .tdet-modal .tdet-panel__meta { display: none; }
	body .tdet-modal .tdet-panel__bot { grid-column: 2; grid-row: 1 / 3; margin: 0; padding: 0 42px 0 0; text-align: right; }
	body .tdet-modal .tdet-panel__step b { font-size: 20px; }
	body .tdet-modal .tdet-panel__ticks { justify-content: flex-end; margin-top: 8px; }
	body .tdet-modal .tdet-panel__ticks i { flex: 0 0 18px; }
	body .tdet-modal .tdet-modal__main { height: auto; padding: 16px 18px 16px; -webkit-mask-image: radial-gradient(circle at 7px 0, transparent 3.5px, #000 4px), linear-gradient(180deg, transparent 7px, #000 7px); -webkit-mask-size: 14px 7px, 100% 100%; -webkit-mask-position: left top, 0 0; -webkit-mask-repeat: repeat-x, no-repeat; mask-image: radial-gradient(circle at 7px 0, transparent 3.5px, #000 4px), linear-gradient(180deg, transparent 7px, #000 7px); mask-size: 14px 7px, 100% 100%; mask-position: left top, 0 0; mask-repeat: repeat-x, no-repeat; }
	body .tdet-modal .tdet-modal__title { font-size: 25px; }
	body .tdet-modal .tdet-modal__continue { padding: 13px 18px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: no-preference) {
	body .tdet-qty__btn, body .tdet-btn, body .tdet-modal .tdet-q__option input { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
}

/* ---------- checkout questions (the no-JS fallback; unchanged) ---------- */
body .tdet-checkout { margin: 1.5em 0; }
body .tdet-checkout__line { margin: 0 0 1.25em; padding: 1em 1.1em; border: 1px solid var(--tder-line, #e6e6e6); border-radius: var(--tder-radius, 6px); }
body .tdet-checkout__event { margin: 0 0 .6em; }
body .tdet-checkout__ticket { margin: .5em 0; padding: .3em 0; border-top: 1px dashed var(--tder-line, #e6e6e6); }
body .tdet-checkout__ticket > summary { cursor: pointer; font-weight: 600; padding: .35em 0; }
body .tdet-checkout .tdet-q { margin: .6em 0; }
body .tdet-checkout .tdet-q label, body .tdet-checkout .tdet-q legend { display: block; margin: 0 0 .25em; padding: 0; }
body .tdet-checkout .tdet-q__label { font-weight: 600; }
body .tdet-checkout .tdet-q__help { display: block; font-size: .85em; color: var(--tder-muted, #666); }
body .tdet-checkout .tdet-q input[type="text"], body .tdet-checkout .tdet-q input[type="email"], body .tdet-checkout .tdet-q input[type="tel"], body .tdet-checkout .tdet-q select, body .tdet-checkout .tdet-q textarea { width: 100%; max-width: 32em; font: inherit; padding: .5em .6em; border: 1px solid var(--tder-line, #cfcfcf); border-radius: var(--tder-radius, 6px); }
body .tdet-checkout .tdet-q__group { border: 0; padding: 0; margin: 0; }
body .tdet-checkout .tdet-q__option { display: block; margin: .2em 0; font-weight: 400; }
body .tdet-checkout .tdet-q--error input, body .tdet-checkout .tdet-q--error select, body .tdet-checkout .tdet-q--error textarea { border-color: #b00020; }
body .tdet-checkout .tdet-q__error { display: block; color: #b00020; font-size: .85em; margin-top: .25em; }
body .tdet-foil__count.is-over { color: #a12a2a; }
