/* ── Header additions ── */
[hidden] {
  display: none !important;
}

.header-back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}

.header-back:hover { background: var(--paper); color: var(--ink); }


/* ── Hero ── */
.event-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: var(--ink);
}

.event-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--flyer-position, center center);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.event-hero-img.loaded { opacity: 1; }

.event-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12, 18, 34, 0.15) 0%,
    transparent 40%,
    rgba(12, 18, 34, 0.75) 100%
  );
}

.event-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 48px 36px;
  max-width: 1280px;
  margin: 0 auto;
}

.event-hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  height: 24px;
  padding: 0 11px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 740;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

.badge--upcoming {
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent-light);
}

.badge--past {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.65);
}

.badge--soldout {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.65);
}

.badge--age {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.event-age-hint {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.event-age-hint[hidden] { display: none; }

.event-hero-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.event-hero-meta {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

/* ── Anfahrt ── */
.directions-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.directions-card[hidden] { display: none; }

.directions-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(207, 17, 12, 0.08);
  color: var(--accent-light);
}

.directions-text { flex: 1; min-width: 0; }

.directions-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.directions-venue {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  font-weight: 640;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.directions-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(207, 17, 12, 0.28);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.directions-button:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(207, 17, 12, 0.34);
}

/* ── Main ── */
.event-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 100px;
}

/* Loading spinner */
.event-loading {
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

.event-loading-spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--line);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Content grid */
.event-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 36px;
  align-items: start;
}

/* ── Left column ── */
.event-left { display: flex; flex-direction: column; gap: 24px; }

.event-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.event-description {
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink);
  white-space: pre-wrap;
}

/* ── Right column: ticket card ── */
.event-right { position: sticky; top: calc(var(--header-h) + 24px); }

.ticket-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ticket-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.ticket-card-title {
  font-size: 15px;
  font-weight: 760;
  color: var(--ink);
}

.ticket-card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Inline ticket options (reuse modal styles) */
.ticket-options-wrap {
  padding: 16px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 20px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

/* Sold-out / past ticket card state */
.ticket-card.is-unavail .ticket-card-footer .btn-primary {
  background: var(--line);
  color: var(--ink-soft);
  cursor: default;
  pointer-events: none;
}

/* The purchase ticket becomes the checkout dialog. Scoped to the event page. */
.ticket-card-footer { gap: 14px; flex-wrap: wrap; }
/* The total gives way (its fee line wraps) before the buy button drops a row. */
.ticket-card-footer .modal-total { flex: 1 1 0; min-width: 0; }
.btn-primary.event-ticket-button {
  min-height: 64px;
  padding: 0;
  gap: 0;
  border-radius: 10px;
  flex-shrink: 0;
  text-align: left;
  mask-image: radial-gradient(circle 7px at 0 50%, transparent 98%, black 100%), radial-gradient(circle 7px at 100% 50%, transparent 98%, black 100%);
  mask-composite: intersect;
}
.event-ticket-copy { display: flex; flex-direction: column; gap: 5px; padding: 12px 18px; white-space: nowrap; }
.event-ticket-label { font-size: 8px; letter-spacing: .14em; font-weight: 500; opacity: .75; }
.event-ticket-stub { display: grid; place-items: center; align-self: stretch; width: 36px; margin: 9px 0; border-left: 1px dashed #ffffff70; }
.btn-primary.event-ticket-button:active { transform: none; }
.event-ticket-button:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px white; }
/* PayPal under the buy button, on its own row; it skips the checkout dialog. */
.checkout-paypal.event-paypal-button { flex-basis: 100%; height: 46px; }
.checkout-paypal.event-paypal-button[hidden] { display: none; }

dialog.event-ticket-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 20px 16px;
  background: transparent;
  color: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
  transition: none;
  overflow: hidden;
  perspective: 1300px;
}
dialog.event-ticket-dialog:not([open]) { display: none; }
dialog.event-ticket-dialog[open] { display: flex; pointer-events: auto; }
.event-ticket-dialog::backdrop { background: rgb(12 18 34 / 0); backdrop-filter: blur(0); transition: background .4s, backdrop-filter .4s; }
.event-ticket-dialog.open::backdrop { background: rgb(12 18 34 / .52); backdrop-filter: blur(5px); }
.event-ticket-flight { position: relative; width: min(540px, 100%); flex-shrink: 0; transform-style: preserve-3d; transform: rotateY(180deg); }
.event-ticket-dialog .ticket-modal,
.event-ticket-dialog.open .ticket-modal {
  width: 100%;
  max-height: calc(100dvh - 40px);
  transform: rotateY(180deg);
  transition: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  mask-image: radial-gradient(circle 9px at 0 calc(100% - var(--ticket-perforation-offset, 75px)), transparent 98%, black 100%), radial-gradient(circle 9px at 100% calc(100% - var(--ticket-perforation-offset, 75px)), transparent 98%, black 100%);
  mask-composite: intersect;
}
.event-ticket-dialog .modal-body { min-height: 0; overscroll-behavior: contain; }
.event-ticket-dialog .modal-footer {
  border-top: 2px dotted #b8bec8;
  flex-shrink: 0;
}
.event-ticket-dialog .modal-body { scroll-padding-bottom: 180px; }
.event-ticket-dialog .ticket-modal { position: relative; }

/* Checkout: flyer header, order lines, grouped contact fields, folded promo code. */
.event-ticket-dialog .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgb(12 18 34 / .38);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.event-ticket-dialog .modal-close:hover { background: rgb(12 18 34 / .55); color: #fff; }
.event-ticket-dialog .modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.checkout-hero { position: relative; height: 168px; flex-shrink: 0; overflow: hidden; background: var(--ink); }
.checkout-hero img { width: 100%; height: 100%; object-fit: cover; object-position: var(--flyer-position, center center); }
.checkout-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(12 18 34 / .05) 20%, rgb(12 18 34 / .82)); }
.checkout-hero-text { position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 1; display: grid; gap: 2px; color: #fff; }
.checkout-hero-date { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.checkout-hero-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.checkout-hero-venue { font-size: 13px; opacity: .85; }

.checkout-content { display: grid; gap: 22px; padding: 18px 22px 4px; }

.checkout-lines { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.checkout-line { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; }
.checkout-line + .checkout-line { border-top: 1px solid var(--line); }
.checkout-line-qty { display: grid; place-items: center; height: 26px; border-radius: 7px; background: var(--paper); font-size: 12.5px; font-weight: 700; }
.checkout-line-name { min-width: 0; }
.checkout-line-name b { display: block; font-weight: 650; }
.checkout-line-name small { display: block; font-size: 12px; color: var(--ink-soft); }
.checkout-line-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.checkout-line--discount { color: #1a7f4b; }
.checkout-line--discount .checkout-line-qty { background: rgb(26 127 75 / .1); }

.checkout-heading { font-size: 15px; font-weight: 750; letter-spacing: -0.01em; margin-bottom: 10px; }
.checkout-group { border: 1px solid #dfe3ea; border-radius: 14px; overflow: hidden; }
.checkout-group-field { display: grid; gap: 1px; padding: 9px 14px 8px; background: var(--card); transition: background .15s, box-shadow .15s; }
.checkout-group-field + .checkout-group-field { border-top: 1px solid #dfe3ea; }
.checkout-group-field span { font-size: 11.5px; font-weight: 650; color: var(--ink-soft); }
.checkout-group-field i { font-style: normal; color: var(--accent-light); }
.checkout-group-field input { border: 0; outline: 0; padding: 0; background: transparent; color: var(--ink); font-size: 15px; }
.checkout-group-field:focus-within { background: #fff7f6; box-shadow: inset 3px 0 0 var(--accent-light); }
.checkout-group-field:has(input.error) { box-shadow: inset 3px 0 0 #e05252; }
.checkout-group + .checkout-error { margin: 6px 2px 0; }
.checkout-hint { font-size: 12.5px; color: var(--ink-soft); margin: 8px 2px 0; }
.checkout-newsletter { margin: 12px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); }
.checkout-newsletter label { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 6px; color: var(--ink); font-weight: 600; cursor: pointer; }
.checkout-newsletter input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent-light); }

.checkout-promo { border-top: 1px solid var(--line); padding-top: 14px; }
.checkout-promo summary { display: flex; align-items: center; gap: 8px; width: fit-content; font-size: 13.5px; font-weight: 650; color: var(--ink-soft); cursor: pointer; list-style: none; }
.checkout-promo summary::-webkit-details-marker { display: none; }
.checkout-promo summary::before { content: "+"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--paper); color: var(--ink); font-weight: 700; }
.checkout-promo[open] summary::before { content: "−"; }
.checkout-promo summary:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 4px; }
.checkout-promo .promo-code-row { width: 100%; max-width: 340px; margin-top: 10px; }
.checkout-promo .promo-code-row .checkout-input,
.checkout-promo .promo-code-btn { height: 38px; }
.checkout-promo .promo-code-row .checkout-input { padding: 0 12px; font-size: 13.5px; background: var(--card); }
.checkout-promo .checkout-error { margin-top: 6px; }
.checkout-promo .promo-code-ok:not([hidden]) { display: block; margin-top: 6px; }

.event-ticket-dialog .modal-footer { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 18px; padding: 16px 22px 18px; }
.checkout-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.checkout-sum-label { font-size: 12px; color: var(--ink-soft); }
.checkout-sum-label b { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.checkout-sum-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.btn-primary.checkout-buy { justify-content: center; height: 50px; border-radius: 12px; font-size: 15px; box-shadow: 0 8px 22px rgb(207 17 12 / .28); }
/* Safari draws the Apple Pay button itself, in the page's language. */
.checkout-applepay { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: buy; -apple-pay-button-style: black; width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer; }
.checkout-applepay:disabled { opacity: .5; cursor: default; }
.checkout-paypal { width: 100%; height: 50px; border: 0; border-radius: 12px; background: #ffc439; color: #111; font: inherit; font-size: 15px; cursor: pointer; }
.checkout-paypal b { font-style: italic; font-weight: 800; color: #003087; }
.checkout-paypal:hover { background: #f2ba36; }
.checkout-paypal:disabled { opacity: .5; cursor: default; }
/* Next to Apple Pay or PayPal the other methods step back to a plain outline button. */
.btn-primary.checkout-buy--alt { height: 44px; background: none; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.checkout-fine { font-size: 11.5px; color: #6b7180; text-align: center; }
.event-ticket-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}
.event-ticket-flight.is-flying .event-ticket-front { visibility: visible; }
.event-ticket-flight.is-flying .ticket-modal { height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .event-ticket-dialog::backdrop { transition: none; }
}

/* ── Not found ── */
.event-notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0;
  text-align: center;
}

/* ── Table Reservation Card ── */
.res-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 16px;
}

.res-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.res-card-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-light);
}

.res-card-title {
  font-size: 15px;
  font-weight: 760;
  color: var(--ink);
}

.res-card-avail {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.res-card-sub {
  padding: 12px 22px 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.res-card-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 22px 20px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .event-grid {
    grid-template-columns: 1fr;
  }
  .event-right {
    position: static;
    order: -1; /* ticket card above description on mobile */
  }
  .event-hero-content { padding: 24px 20px 28px; }
}

@media (max-width: 700px) {
  .event-hero { height: 360px; }
  .event-main { padding: 24px 20px 60px; }
  /* Button unter den Text statt daneben, sonst wird beides zu schmal. */
  .directions-card { flex-wrap: wrap; }
  .directions-button { width: 100%; justify-content: center; }
  .header-back span { display: none; }
}
