/* ==========================================================================
   Ruby Event Center - Shared Ticket Checkout (#tickets-modal)
   Desktop: wide two-column dialog (event summary | booking).
   Mobile (< 900px): full-screen sheet, compact event header, sticky total bar.
   Markup: includes/modals.php  Behaviour: assets/js/main.js
   ========================================================================== */

#tickets-modal {
  --tk-wine: #5b0f23;
  --tk-wine-deep: #360812;
  --tk-ruby: #7a1530;
  --tk-ruby-hover: #8c1a39;
  --tk-gold: #c9a05a;
  --tk-gold-soft: #f3e3c3;
  --tk-gold-tint: #fbf1de;
  --tk-cream: #fbf7f1;
  --tk-paper: #ffffff;
  --tk-ink: #2a1a1d;
  --tk-muted: #75666a;
  --tk-line: #e7dccf;
  --tk-line-strong: #d6c6b4;
  --tk-error: #b42318;
  --tk-ok: #0f7a4a;
  --tk-ease: cubic-bezier(.22, .8, .24, 1);
  --tk-serif: 'Cormorant Garamond', 'Libre Caslon Display', Georgia, serif;
  --tk-sans: 'Outfit', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 24px;
  overflow: hidden;
  font-family: var(--tk-sans);
  -webkit-font-smoothing: antialiased;
}

#tickets-modal .tk-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
#tickets-modal [hidden] { display: none !important; }

/* ---------- Dialog shell ---------- */
.tk-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(201, 160, 90, .10), transparent 60%),
    linear-gradient(180deg, #fffdf9 0%, var(--tk-cream) 100%);
  color: var(--tk-ink);
  border: 1px solid rgba(201, 160, 90, .38);
  border-radius: 24px;
  box-shadow: 0 40px 90px -20px rgba(20, 3, 8, .55), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}

.tk-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 40px; height: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--tk-muted); background: rgba(255, 255, 255, .7);
  border: 1px solid var(--tk-line); cursor: pointer;
  transition: color .2s, background-color .2s, transform .2s var(--tk-ease);
}
.tk-close:hover { color: var(--tk-ink); background: #fff; transform: rotate(90deg); }
.tk-close:focus-visible { outline: 2px solid var(--tk-ruby); outline-offset: 2px; }

.tk-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 32px;
  padding: 22px 30px 22px 22px;
  align-items: start;
}

/* ---------- Left: event summary ---------- */
.tk-aside {
  position: sticky; top: 0;
  border-radius: 18px;
  padding: 14px 14px 22px;
  color: #f8eee6;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(201, 160, 90, .18), transparent 70%),
    linear-gradient(165deg, #7a1530 0%, var(--tk-wine) 45%, var(--tk-wine-deep) 100%);
  border: 1px solid rgba(201, 160, 90, .35);
  box-shadow: 0 18px 40px -18px rgba(54, 8, 18, .7);
  overflow: hidden;
}
.tk-aside-media {
  border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3;
  background: #3d0a17;
  box-shadow: 0 0 0 1px rgba(201, 160, 90, .35);
}
.tk-aside-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--tk-ease); }
.tk-aside:hover .tk-aside-media img { transform: scale(1.03); }
.tk-aside-body { padding: 18px 8px 0; }
.tk-aside-eyebrow {
  margin: 0 0 6px; font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--tk-gold-soft); opacity: .85; font-weight: 600;
}
.tk-aside-title {
  margin: 0; font-family: var(--tk-serif); font-weight: 600;
  font-size: 30px; line-height: 1.08; color: #fff; letter-spacing: -.01em;
}
.tk-aside-meta { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: #f1e2d6; }
.tk-aside-meta li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.tk-aside-meta li.hidden { display: none; }
.tk-aside-meta svg { flex: 0 0 auto; margin-top: 2px; color: var(--tk-gold); }

.tk-highlights { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(201, 160, 90, .35); }
.tk-highlights.hidden { display: none; }
.tk-highlights-title {
  margin: 0 0 10px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--tk-gold); font-weight: 600;
}
.tk-highlights ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tk-highlights li {
  position: relative; padding-left: 28px; font-size: 14px; line-height: 1.35; color: #f6ebe2;
}
.tk-highlights li::before {
  content: ''; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 999px;
  border: 1px solid rgba(201, 160, 90, .7);
  background: rgba(201, 160, 90, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2c38a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---------- Right: booking ---------- */
.tk-main { min-width: 0; padding-top: 4px; }

.tk-steps {
  list-style: none; margin: 0 44px 22px 0; padding: 0;
  display: flex; align-items: center; gap: 10px;
}
.tk-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tk-muted); white-space: nowrap; }
.tk-step-dot {
  width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; border: 1px solid var(--tk-line-strong); background: #fff; color: var(--tk-muted);
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--tk-ease);
}
.tk-step-line { flex: 1 1 auto; height: 1px; min-width: 16px; background: var(--tk-line-strong); }
.tk-dialog[data-step="1"] .tk-step[data-step="1"],
.tk-dialog[data-step="2"] .tk-step[data-step="2"],
.tk-dialog[data-step="3"] .tk-step[data-step="3"] { color: var(--tk-ink); font-weight: 600; }
.tk-dialog[data-step="1"] .tk-step[data-step="1"] .tk-step-dot,
.tk-dialog[data-step="2"] .tk-step[data-step="2"] .tk-step-dot,
.tk-dialog[data-step="3"] .tk-step[data-step="3"] .tk-step-dot {
  background: var(--tk-ruby); color: #fff; border-color: var(--tk-ruby); transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(122, 21, 48, .12);
}
.tk-dialog[data-step="2"] .tk-step[data-step="1"] .tk-step-dot,
.tk-dialog[data-step="3"] .tk-step[data-step="1"] .tk-step-dot,
.tk-dialog[data-step="3"] .tk-step[data-step="2"] .tk-step-dot { background: var(--tk-gold-tint); border-color: var(--tk-gold); color: var(--tk-wine); }
.tk-dialog[data-step="notice"] .tk-steps { display: none; }

.tk-heading {
  margin: 0; font-family: var(--tk-serif); font-weight: 600; font-size: 32px; line-height: 1.1;
  color: var(--tk-ink); letter-spacing: -.01em;
}
.tk-heading:focus { outline: none; }
.tk-sub { margin: 4px 0 0; font-size: 14px; color: var(--tk-muted); }
.tk-form-head { margin-bottom: 18px; }

.tk-form { display: grid; gap: 16px; }
.tk-form.hidden { display: none; }
.tk-block { display: grid; gap: 10px; }

.tk-label {
  display: block; margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: #4b3a3d;
}
.tk-label-soft { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--tk-muted); }
.tk-hint { display: block; font-size: 12px; color: var(--tk-muted); margin-top: 2px; }

/* Tier cards */
.tk-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tk-tier {
  position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: var(--tk-paper); border: 1px solid var(--tk-line); color: var(--tk-ink);
  transition: border-color .2s, background-color .25s, box-shadow .25s, transform .2s var(--tk-ease);
}
.tk-tier.hidden { display: none; }
.tk-tier:hover { border-color: var(--tk-line-strong); transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(54, 8, 18, .35); }
.tk-tier:focus-visible { outline: 2px solid var(--tk-ruby); outline-offset: 2px; }
.tk-tier.is-selected {
  border-color: var(--tk-ruby);
  background: linear-gradient(180deg, #fffaf1 0%, var(--tk-gold-tint) 100%);
  box-shadow: 0 0 0 1px var(--tk-ruby) inset, 0 10px 22px -14px rgba(122, 21, 48, .55);
}
.tk-radio {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; border-radius: 999px;
  border: 1.5px solid var(--tk-line-strong); background: #fff; position: relative;
  transition: border-color .2s;
}
.tk-radio::after {
  content: ''; position: absolute; inset: 4px; border-radius: 999px; background: var(--tk-ruby);
  transform: scale(0); transition: transform .22s var(--tk-ease);
}
.tk-tier.is-selected .tk-radio { border-color: var(--tk-ruby); }
.tk-tier.is-selected .tk-radio::after { transform: scale(1); }
.tk-tier-body { display: grid; gap: 2px; min-width: 0; }
.tk-tier-name { font-size: 15px; font-weight: 600; }
.tk-tier-price { font-variant-numeric: lining-nums; font-family: var(--tk-serif); font-size: 20px; font-weight: 600; color: var(--tk-ruby); line-height: 1.2; }
.tk-tier-price small { font-family: var(--tk-sans); font-size: 13px; font-weight: 400; color: var(--tk-muted); }
.tk-tier-note { font-size: 12px; color: var(--tk-muted); }

.tk-vip {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(90deg, #f8ecd4, #f6e7cb); border: 1px solid #ecd6ab;
  font-size: 14px; color: #4a2a1a;
}
.tk-vip.hidden { display: none; }
.tk-vip svg { color: #a2712a; flex: 0 0 auto; }
.tk-vip a { color: var(--tk-wine); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(91, 15, 35, .3); }
.tk-vip a:hover { border-bottom-color: var(--tk-wine); }

/* Quantity */
.tk-qty-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--tk-paper); border: 1px solid var(--tk-line);
}
.tk-qty { display: inline-flex; align-items: center; border: 1px solid var(--tk-line); border-radius: 12px; background: var(--tk-cream); }
.tk-qty button {
  width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--tk-ink); border-radius: 11px;
  transition: background-color .15s, color .15s, transform .1s;
}
.tk-qty button:hover:not(:disabled) { background: #fff; color: var(--tk-ruby); }
.tk-qty button:active:not(:disabled) { transform: scale(.92); }
.tk-qty button:disabled { color: #c9bcbd; cursor: not-allowed; }
.tk-qty button:focus-visible { outline: 2px solid var(--tk-ruby); outline-offset: -2px; }
.tk-qty output { min-width: 36px; text-align: center; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }

/* Fields */
.tk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.tk-field { display: grid; gap: 6px; min-width: 0; }
.tk-field-full { grid-column: 1 / -1; }
.tk-input-wrap { position: relative; }
.tk-input-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #a39294; pointer-events: none; transition: color .2s; }
.tk-input-wrap input {
  width: 100%; height: 46px; padding: 0 14px 0 40px; border-radius: 12px;
  border: 1px solid var(--tk-line-strong); background: #fff; color: var(--tk-ink);
  font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.tk-input-wrap input::placeholder { color: #ab9c9e; }
.tk-input-wrap input:focus { outline: none; border-color: var(--tk-ruby); box-shadow: 0 0 0 3px rgba(122, 21, 48, .12); }
.tk-input-wrap:focus-within svg { color: var(--tk-ruby); }
.tk-input-wrap input[aria-invalid="true"] { border-color: var(--tk-error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
.tk-error { margin: 0; font-size: 12.5px; color: var(--tk-error); font-weight: 500; }

/* Final-sale acknowledgement */
.tk-ack-wrap { display: grid; gap: 6px; }
.tk-ack { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: #4b3a3d; cursor: pointer; }
.tk-ack input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tk-ruby); cursor: pointer; }
.tk-ack input[aria-invalid="true"] { outline: 2px solid var(--tk-error); outline-offset: 1px; }
.tk-ack strong { color: var(--tk-ink); }

/* Promo */
.tk-promo { border: 1px solid var(--tk-line); border-radius: 12px; background: var(--tk-paper); }
.tk-promo summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer;
  font-size: 14px; color: #4b3a3d; border-radius: 12px;
}
.tk-promo summary::-webkit-details-marker { display: none; }
.tk-promo summary:focus-visible { outline: 2px solid var(--tk-ruby); outline-offset: 1px; }
.tk-promo summary span { flex: 1 1 auto; }
.tk-promo summary > svg:first-child { color: #a2712a; }
.tk-chevron { transition: transform .25s var(--tk-ease); color: var(--tk-muted); }
.tk-promo[open] .tk-chevron { transform: rotate(180deg); }
.tk-promo-body { display: flex; gap: 8px; padding: 0 12px 12px; }
.tk-promo[open] .tk-promo-body { animation: tkStepIn .28s var(--tk-ease); }
.tk-promo-body input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--tk-line-strong);
  font: inherit; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; background: #fff;
}
.tk-promo-body input:focus { outline: none; border-color: var(--tk-ruby); box-shadow: 0 0 0 3px rgba(122, 21, 48, .12); }
.tk-promo-body button {
  height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--tk-ruby); background: #fff;
  color: var(--tk-ruby); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s;
}
.tk-promo-body button:hover:not(:disabled) { background: var(--tk-ruby); color: #fff; }
.tk-promo-body button:disabled { opacity: .6; cursor: wait; }
#ticket-promo-msg { padding: 0 14px 12px; font-size: 13px; font-weight: 500; }
#ticket-promo-msg.hidden { display: none; }
#ticket-promo-msg.is-ok { color: var(--tk-ok); }
#ticket-promo-msg.is-err { color: var(--tk-error); }

.tk-discount { display: grid; gap: 4px; font-size: 14px; color: var(--tk-muted); }
.tk-discount.hidden { display: none; }
.tk-discount > div { display: flex; justify-content: space-between; }
.tk-discount-save { color: var(--tk-ok); font-weight: 600; }

.tk-alert {
  padding: 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  background: #fdf0ef; color: #8a1c13; border: 1px solid #f3c9c4;
}
.tk-alert.hidden { display: none; }

/* Total + CTA */
.tk-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding-top: 16px; border-top: 1px solid var(--tk-line);
}
.tk-total { display: grid; gap: 0; }
.tk-total-label { font-size: 13px; color: var(--tk-muted); }
.tk-total-price {
  font-family: var(--tk-serif); font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--tk-ruby);
  font-variant-numeric: lining-nums tabular-nums; display: inline-block; transform-origin: left center;
}
.tk-total-price.is-bump { animation: tkBump .36s var(--tk-ease); }

.tk-cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border: 0; border-radius: 14px; cursor: pointer;
  font: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: .01em; color: #fff;
  background-color: var(--tk-ruby);
  background-image: linear-gradient(180deg, #8d1d3b 0%, #6a1129 55%, #530c1f 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 12px 24px -12px rgba(91, 15, 35, .8);
  transition: transform .18s var(--tk-ease), box-shadow .25s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.tk-cta:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 16px 28px -12px rgba(91, 15, 35, .85); }
.tk-cta:active:not(:disabled) { transform: translateY(0) scale(.985); }
.tk-cta:focus-visible { outline: 3px solid var(--tk-gold); outline-offset: 2px; }
.tk-cta:disabled { cursor: progress; filter: saturate(.7); opacity: .85; }
.tk-cta-arrow { transition: transform .25s var(--tk-ease); }
.tk-cta:hover:not(:disabled) .tk-cta-arrow { transform: translateX(3px); }
.tk-cta-short { display: none; }
.tk-cta-full { width: 100%; }
.tk-spinner {
  width: 16px; height: 16px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  display: inline-block; vertical-align: -3px; margin-right: 8px; animation: tkSpin .8s linear infinite;
}
.tk-cta.is-loading .tk-cta-lock,
.tk-cta.is-loading .tk-cta-arrow { display: none; }

/* Payment step */
.tk-payment { display: grid; gap: 16px; }
.tk-payment.hidden { display: none; }
.tk-payment:not(.hidden) { animation: tkStepIn .32s var(--tk-ease); }
.tk-payment-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tk-back {
  border: 1px solid var(--tk-line-strong); background: #fff; color: var(--tk-ink); border-radius: 10px;
  padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .2s;
}
.tk-back:hover { background: var(--tk-gold-tint); }
.tk-badge {
  font-size: 13px; font-weight: 600; color: var(--tk-wine); padding: 6px 12px; border-radius: 999px;
  background: var(--tk-gold-tint); border: 1px solid #ecd6ab;
}
.tk-payment-box { padding: 14px; background: #fff; border: 1px solid var(--tk-line); border-radius: 14px; }
.tk-loading { padding: 40px 0; text-align: center; font-size: 13px; color: var(--tk-muted); animation: tkPulse 1.6s ease-in-out infinite; }
.tk-footer-pay { border-top: 0; padding-top: 0; }
.tk-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 12px; color: var(--tk-muted); }
.tk-secure svg { color: var(--tk-ok); }

/* Notice view (booking paused) */
.tk-notice { display: grid; gap: 10px; justify-items: start; padding: 8px 0; }
.tk-notice.hidden { display: none; }
.tk-notice-pill {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; background: #fdf2dc; color: #7a4a10;
}
.tk-notice-event { margin: 4px 0 0; font-weight: 600; }
.tk-notice-copy { margin: 0; font-size: 14px; line-height: 1.55; color: #4b3a3d; }
.tk-notice-small { font-size: 13px; color: var(--tk-muted); }
.tk-notice-copy a { color: var(--tk-ruby); font-weight: 600; }
.tk-btn-secondary {
  margin-top: 8px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--tk-line-strong); background: #fff;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* Pass view keeps its existing (Tailwind) styling; give it room */
#tickets-pass-view:not(.hidden) { animation: tkStepIn .35s var(--tk-ease); }

/* ---------- Motion ---------- */
#tickets-modal:not(.hidden) { animation: tkFade .26s ease-out; }
#tickets-modal:not(.hidden) .tk-dialog { animation: tkRise .42s var(--tk-ease); }
#tickets-modal.is-closing { animation: tkFadeOut .2s ease-in forwards; }
#tickets-modal.is-closing .tk-dialog { animation: tkSink .2s ease-in forwards; }

@keyframes tkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tkFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes tkRise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes tkSink { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.99); } }
@keyframes tkStepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tkBump { 0% { transform: scale(1); } 40% { transform: scale(1.06); color: var(--tk-wine); } 100% { transform: scale(1); } }
@keyframes tkSpin { to { transform: rotate(360deg); } }
@keyframes tkPulse { 50% { opacity: .45; } }

/* ---------- Tablet / mobile: full-screen sheet ---------- */
@media (max-width: 899.98px) {
  #tickets-modal { padding: 0; align-items: stretch; }
  .tk-dialog {
    width: 100%; max-height: none; height: 100vh; height: 100dvh;
    border-radius: 0; border: 0;
    background: var(--tk-cream);
  }
  .tk-close {
    top: calc(10px + env(safe-area-inset-top)); right: 10px;
    color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25);
  }
  .tk-close:hover { color: #fff; background: rgba(255, 255, 255, .2); }
  .tk-layout { display: block; padding: 0; }

  .tk-aside {
    position: relative; border-radius: 0; border: 0; box-shadow: none;
    padding: calc(16px + env(safe-area-inset-top)) 60px 16px 16px;
    display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; align-content: center;
    grid-template-areas: "media eyebrow" "media title" "media meta" "hl hl";
  }
  .tk-aside-media { grid-area: media; width: 88px; height: 88px; aspect-ratio: auto; align-self: center; }
  .tk-aside-body { display: contents; }
  .tk-aside-eyebrow { grid-area: eyebrow; align-self: end; }
  .tk-aside-title { grid-area: title; }
  .tk-aside-meta { grid-area: meta; align-self: start; }
  .tk-highlights { grid-area: hl; }
  .tk-aside-eyebrow { font-size: 9px; letter-spacing: .22em; margin-bottom: 3px; }
  .tk-aside-title { font-size: 21px; }
  .tk-aside-meta { margin-top: 6px; gap: 3px; font-size: 12.5px; }
  .tk-aside-meta svg { width: 13px; height: 13px; margin-top: 2px; }
  #tickets-modal-aside-time-row { display: none; }
  /* Inclusions are shown on the event page itself; the sheet header stays compact. */
  .tk-highlights { display: none !important; }
  .tk-highlights-title { display: none; }
  .tk-highlights ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .tk-highlights li {
    padding: 5px 10px 5px 24px; font-size: 12px; line-height: 1.3; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(201, 160, 90, .3);
  }
  .tk-highlights li::before { left: 6px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; background-size: 8px; }

  .tk-main { padding: 16px 16px 0; }
  .tk-steps { margin: 0 0 16px; gap: 6px; }
  .tk-step { font-size: 12px; gap: 6px; }
  .tk-step-dot { width: 22px; height: 22px; font-size: 11px; }
  .tk-heading { font-size: 26px; }
  .tk-form-head { margin-bottom: 4px; }
  .tk-form-head .tk-sub { display: none; }
  .tk-form { gap: 14px; }

  .tk-tiers { grid-template-columns: 1fr; gap: 10px; }
  .tk-tier { padding: 14px; min-height: 64px; }
  .tk-tier:hover { transform: none; }
  .tk-tier-body { grid-template-columns: 1fr auto; align-items: baseline; column-gap: 10px; width: 100%; }
  .tk-tier-name { grid-column: 1 / -1; }
  .tk-tier-note { grid-column: 1 / -1; }

  .tk-qty button { width: 44px; height: 44px; }
  .tk-fields { grid-template-columns: 1fr; gap: 12px; }
  .tk-input-wrap input { height: 50px; font-size: 16px; } /* 16px avoids iOS zoom-on-focus */
  .tk-promo-body input { font-size: 16px; }

  .tk-footer {
    position: sticky; bottom: 0; z-index: 4;
    margin: 4px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--tk-line);
    box-shadow: 0 -10px 24px -16px rgba(54, 8, 18, .4);
  }
  .tk-footer-pay { margin-top: 0; }
  .tk-total-label { font-size: 12px; }
  .tk-total-price { font-size: 26px; }
  .tk-cta { min-height: 52px; padding: 0 22px; }
  .tk-cta-long { display: none; }
  .tk-cta-short { display: inline; }
  .tk-footer-pay .tk-cta { width: 100%; }
  .tk-secure { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .tk-notice { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  #tickets-pass-view { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

  #tickets-modal:not(.hidden) .tk-dialog { animation: tkSheetUp .4s var(--tk-ease); }
  #tickets-modal.is-closing .tk-dialog { animation: tkSheetDown .22s ease-in forwards; }
}
@media (max-width: 899.98px) and (min-width: 600px) {
  .tk-tiers { grid-template-columns: 1fr 1fr; }
  .tk-fields { grid-template-columns: 1fr 1fr; }
  .tk-main { padding: 20px 28px 0; }
  .tk-footer { margin: 4px -28px 0; padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 359.98px) {
  .tk-step-label { display: none; }
  .tk-dialog[data-step="1"] .tk-step[data-step="1"] .tk-step-label,
  .tk-dialog[data-step="2"] .tk-step[data-step="2"] .tk-step-label,
  .tk-dialog[data-step="3"] .tk-step[data-step="3"] .tk-step-label { display: inline; }
}
@keyframes tkSheetUp { from { transform: translateY(32px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes tkSheetDown { to { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #tickets-modal *,
  #tickets-modal *::before,
  #tickets-modal *::after,
  #tickets-modal:not(.hidden),
  #tickets-modal.is-closing { animation: none !important; transition-duration: .01ms !important; }
  .tk-spinner { animation: tkSpin 1.6s linear infinite !important; }
}

/* ==========================================================================
   Approved-mockup alignment (applies to the overlay and the inline panel)
   ========================================================================== */
@media (min-width: 900px) {
  .tk-layout {
    grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
    gap: 48px; padding: 28px 40px 30px 28px; align-items: stretch;
  }
  .tk-aside { position: relative; top: auto; display: flex; flex-direction: column; padding: 16px 16px 26px; }
  /* The image absorbs the card's spare height so the card matches the form column without dead space. */
  .tk-aside-media { aspect-ratio: auto; flex: 1 1 auto; min-height: 150px; max-height: 340px; }
  .tk-aside-media img { object-position: 50% 40%; }
  .tk-aside-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 22px 10px 0; }
  .tk-aside-title { font-size: 32px; line-height: 1.1; }
  .tk-aside-meta { margin-top: 18px; gap: 10px; font-size: 15px; }
  .tk-highlights { margin-top: 22px; padding-top: 20px; }
  .tk-highlights ul { gap: 12px; }
  .tk-highlights li { font-size: 15px; }
  .tk-steps { margin-bottom: 24px; }
  .tk-form-head { margin-bottom: 6px; }
}
.tk-tier-heading span { color: var(--tk-ruby); }
.tk-tier { padding: 13px 16px; align-items: center; }
.tk-tier .tk-radio { margin-top: 0; }
.tk-qty-row { padding: 0; border: 0; background: transparent; border-radius: 0; }
.tk-qty-row .tk-hint { margin-top: 3px; }
.tk-footer { align-items: center; }
.tk-total { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.tk-total-label { font-size: 14px; font-weight: 500; color: var(--tk-ink); }
@media (min-width: 900px) {
  .tk-cta { min-width: 340px; }
}

/* ==========================================================================
   Inline panel (premium event page): the checkout lives on the page itself
   ========================================================================== */
#tickets-modal.tk-inline {
  position: relative; display: block; padding: 0; overflow: visible; background: transparent;
  animation: none !important; scroll-margin-top: 96px;
}
#tickets-modal.tk-inline .tk-dialog {
  width: 100%; max-height: none; overflow: visible; animation: none !important;
  border-radius: 22px;
  background:
    radial-gradient(70% 40% at 100% 0%, rgba(201, 160, 90, .12), transparent 70%),
    linear-gradient(180deg, #fffdf9 0%, #fbf6ef 100%);
  border: 1px solid rgba(201, 160, 90, .45);
  box-shadow: 0 50px 90px -40px rgba(30, 3, 10, .65), 0 0 0 6px rgba(255, 255, 255, .06);
}
#tickets-modal.tk-inline .tk-steps { margin-right: 0; }

@media (max-width: 899.98px) {
  #tickets-modal.tk-inline { padding: 0; align-items: initial; }
  #tickets-modal.tk-inline .tk-dialog { height: auto; border-radius: 22px; border: 1px solid rgba(201, 160, 90, .4); }
  #tickets-modal.tk-inline .tk-main { padding: 18px 16px 0; }
  #tickets-modal.tk-inline .tk-footer {
    margin: 4px -16px 0; border-radius: 0 0 22px 22px;
  }
  #tickets-modal.tk-inline #tickets-pass-view,
  #tickets-modal.tk-inline .tk-secure { padding-bottom: 18px; }
  /* The hero above already carries the event title, date and venue (mobile mockup). */
  #tickets-modal.tk-inline .tk-form-head { display: none; }
  #tickets-modal.tk-inline .tk-tier-heading {
    font-family: var(--tk-serif); font-size: 23px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--tk-ink);
  }
  #tickets-modal.tk-inline .tk-tier-heading span { display: none; }
}
/* Tablet: compact summary row at the top of the panel */
@media (min-width: 600px) and (max-width: 899.98px) {
  #tickets-modal.tk-inline .tk-aside {
    border-radius: 22px 22px 0 0; padding: 16px 20px;
    grid-template-columns: 120px minmax(0, 1fr); grid-template-areas: "media title" "media meta" "hl hl";
  }
  #tickets-modal.tk-inline .tk-aside-media { width: 120px; height: 84px; }
  #tickets-modal.tk-inline .tk-highlights { display: block !important; margin-top: 14px; padding-top: 12px; }
  #tickets-modal.tk-inline .tk-highlights ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
  #tickets-modal.tk-inline .tk-highlights li { background: none; border: 0; padding: 0 0 0 24px; font-size: 13px; border-radius: 0; }
  #tickets-modal.tk-inline .tk-highlights li::before { left: 0; top: 1px; transform: none; width: 16px; height: 16px; }
  #tickets-modal.tk-inline .tk-main { padding: 20px 24px 0; }
  #tickets-modal.tk-inline .tk-footer { margin: 4px -24px 0; padding-left: 24px; padding-right: 24px; }
}
/* Phone: the panel is just the booking card (mobile mockup); labels become placeholders */
@media (max-width: 599.98px) {
  #tickets-modal.tk-inline .tk-aside { display: none; }
  .tk-field > .tk-label {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .tk-fields { gap: 10px; }
  .tk-tier { min-height: 58px; padding: 10px 14px; }
  .tk-tier-body { grid-template-columns: 1fr; }
  .tk-tier-price { font-size: 18px; }
  .tk-vip { padding: 9px 12px; font-size: 13.5px; justify-content: center; }
  .tk-total { display: grid; gap: 0; }
}

/* Mockup density (desktop): larger type and controls in the booking column */
@media (min-width: 900px) {
  .tk-steps .tk-step { font-size: 15px; }
  .tk-steps .tk-step-dot { width: 30px; height: 30px; font-size: 13px; }
  .tk-heading { font-size: 38px; }
  .tk-sub { font-size: 15.5px; }
  .tk-label { font-size: 12.5px; letter-spacing: .12em; }
  .tk-form { gap: 18px; }
  .tk-tier { padding: 15px 18px; }
  .tk-tier-name { font-size: 17px; }
  .tk-tier-price { font-size: 23px; }
  .tk-tier-price small { font-size: 15px; }
  .tk-vip { font-size: 15.5px; padding: 12px 16px; }
  .tk-input-wrap input { height: 50px; font-size: 16px; }
  .tk-ack { font-size: 14.5px; }
  .tk-promo summary { font-size: 15px; padding: 13px 16px; }
  .tk-total-label { font-size: 16px; }
  .tk-total-price { font-size: 34px; }
  .tk-cta { min-height: 58px; font-size: 17px; }
}
.tk-hint:empty { display: none; }
@media (max-width: 599.98px) {
  .tk-qty-row .tk-label { font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--tk-ink); }
  .tk-step-long { display: none; }
}
