@import url("/platform/tokens.css");

:root {
  --primary: #1a1f26;
  --accent: #6b7280;
  --bg: #f4f6f8;
  --text: #2a3140;
  --muted: #5c6573;
  --border: #d8dee6;
  --surface: #fff;
  --focus: #6b7280;
  --label-tracking: 0.12em;
  --font-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--os-font-body, "Public Sans", system-ui, sans-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 1rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary, #fff);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

h1,
h2,
h3,
.hero-title,
.section-title {
  font-family: var(--os-font-display, "Syne", system-ui, sans-serif);
  letter-spacing: var(--heading-tracking, -0.02em);
  font-weight: var(--heading-weight, 700);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  max-width: var(--shop-max, 1120px);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary-text, var(--primary));
}

.brand-name {
  font-family: var(--os-font-display, "Syne", sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
}

.logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.header-cart-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.header-cart-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cart-count {
  display: inline-block;
  min-width: 1.25rem;
  text-align: center;
  color: var(--primary-text, var(--primary));
}

.hero {
  border-bottom: 1px solid var(--border);
  background: var(--hero-gradient, var(--surface));
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--shop-hero-pad, 3.5rem) 1.25rem;
  text-align: center;
}

.hero-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  letter-spacing: var(--label-tracking, 0.08em);
  text-transform: uppercase;
  color: var(--accent-text, var(--accent));
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-display, inherit);
  margin: 0 0 1rem;
  font-size: calc(clamp(1.85rem, 5vw, 2.75rem) * var(--heading-scale, 1));
  line-height: 1.1;
  color: var(--primary-text, var(--primary));
}

.hero-datetime {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.hero-venue {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.hero-venue:empty,
.hero-description:empty,
.hero-eyebrow:empty {
  display: none;
}

.hero-description {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 1.05rem;
}

.hero-media {
  margin: 1.75rem auto 0;
  max-width: 520px;
}

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.store-layout {
  max-width: var(--shop-max, 1120px);
  margin: 0 auto;
  padding: var(--shop-pad, 2.5rem) 1.25rem 4rem;
}

.store-grid {
  display: grid;
  gap: var(--shop-gap, 2.5rem);
  align-items: start;
}

@media (min-width: 900px) {
  .store-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .order-summary-inner {
    position: sticky;
    top: 1rem;
  }
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: var(--card-pad, 1.25rem 1.5rem);
  border: 1px solid var(--border);
  border-radius: var(--r-card, 12px);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.ticket-row:hover,
.ticket-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

@media (min-width: 640px) {
  .ticket-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.ticket-name {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.ticket-desc {
  margin: 0;
  max-width: 42rem;
}

.ticket-row-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.ticket-price {
  margin: 0;
  font-weight: 600;
  font-size: 1.15rem;
  min-width: 5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-control, 8px);
  overflow: hidden;
  background: var(--bg);
}

.qty-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--primary-text, var(--primary));
}

.qty-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
}

.qty-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-value {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
}

.sold-out-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.order-summary-inner {
  border: 1px solid var(--border);
  border-radius: var(--r-card, 12px);
  padding: var(--summary-pad, 1.5rem);
  background: var(--surface);
}

.summary-lines {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.summary-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.summary-line:last-child {
  border-bottom: none;
}

.summary-line-price {
  font-weight: 600;
  text-align: right;
}

.summary-empty {
  margin: 0 0 1rem;
}

.summary-totals {
  margin: 0 0 0.75rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.35rem 0;
  font-size: 0.95rem;
}

.summary-row dt {
  margin: 0;
  font-weight: 500;
}

.summary-row dd {
  margin: 0;
  font-weight: 600;
}

.summary-row-total {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
}

.all-in-note {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.connect-blocked {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: #9a3412;
}

.muted {
  color: var(--muted);
}

.banner {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.hidden {
  display: none !important;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent, #fff);
  border: 1px solid transparent;
  padding: 0.7rem 1.15rem;
  border-radius: var(--r-button, 6px);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}

.button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.button-primary {
  background: var(--accent);
  color: var(--on-accent, #fff);
}

.button-primary:hover:not(:disabled):not(.disabled) {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}

.button-block {
  display: block;
  width: 100%;
}

.button.secondary,
.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--text) 35%, var(--border));
}

.button-secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.button.disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-layout {
  max-width: min(var(--shop-max, 1120px), 1040px);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: grid;
  gap: 2rem;
  align-items: start;
}

.checkout-main {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.checkout-sidebar {
  min-width: 0;
}

@media (min-width: 900px) {
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "main sidebar";
  }

  .checkout-main {
    grid-area: main;
  }

  .checkout-sidebar {
    grid-area: sidebar;
  }
}

.checkout-panel {
  border: 1px solid var(--border);
  border-radius: var(--r-card, 12px);
  padding: var(--summary-pad, 1.5rem);
  background: var(--surface);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

#payment-section {
  width: 100%;
  max-width: 100%;
}

#payment-element {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 1rem;
}

#payment-element .StripeElement,
#payment-element .p-Input,
#payment-element iframe {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

.checkout-panel h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.checkout-title {
  margin: 0;
  font-size: calc(1.75rem * var(--heading-scale, 1));
  color: var(--primary-text, var(--primary));
}

.promo-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.promo-field {
  flex: 1;
  margin-bottom: 0;
}

.promo-row .button {
  min-height: 2.75rem;
}

#checkout-form .button-block {
  margin-top: 0.25rem;
}

.checkout-sticky {
  position: sticky;
  top: 1rem;
}

.platform-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.platform-footer a {
  color: var(--accent);
  text-decoration: none;
}

.platform-footer a:hover {
  text-decoration: underline;
}

.site-header.compact {
  justify-content: space-between;
}

.back-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.checkout-items {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.checkout-items li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.checkout-items li:last-child {
  border-bottom: 0;
}

.checkout-item-qty {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.checkout-item-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.totals div,
.totals .summary-row {
  display: flex;
  justify-content: space-between;
  margin: 0.35rem 0;
}

.totals .total-line,
.summary-row-total {
  font-size: 1.2rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  margin-top: 0.65rem;
}

label {
  display: block;
  margin-bottom: 0.85rem;
  font-weight: 500;
  font-size: 0.95rem;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--text) 30%, var(--border));
  border-radius: var(--r-control, 8px);
  background: var(--bg);
  color: var(--text);
  margin-top: 0.4rem;
  font: inherit;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
  color: var(--muted);
}

input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}

.error {
  color: #b91c1c;
  font-size: 0.95rem;
}

.confirm-hero {
  text-align: center;
  padding: 2rem 0 1rem;
}

.confirm-hero h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

#tickets.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
  margin: 0 auto;
}

.ticket-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
  background: var(--surface);
}

.ticket-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  text-transform: capitalize;
}

.qr-box {
  display: inline-block;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
}

.ticket-print-brand {
  display: none;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-text, var(--primary));
  padding: 0.5rem 1rem 0;
}

@media print {
  body {
    background: #fff;
    color: #111;
  }
  .site-header,
  .back-link,
  .platform-footer,
  [data-site-platform-credit] {
    display: none !important;
  }
  .ticket-print-brand {
    display: block !important;
  }
  .ticket-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc;
  }
}

/* ------------------------------------------------------------------ shop customisation (event.config `shop`)
   Set as data-shop-* attributes on <body> by site.js. Nothing here sets a colour or font: those stay in brand tokens. */

.ticket-group + .ticket-group {
  margin-top: 2rem;
}

.ticket-group-head {
  margin-bottom: 0.75rem;
}

.ticket-group-title {
  margin: 0;
  font-size: 1.05rem;
}

.ticket-group-desc {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.ticket-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* width */
body[data-shop-width="narrow"] { --shop-max: 880px; }
body[data-shop-width="wide"] { --shop-max: 1360px; }

/* corners */
body[data-shop-radius="sharp"] { --r-card: 2px; --r-control: 2px; }
body[data-shop-radius="round"] { --r-card: 22px; --r-control: 14px; }

/* buttons and steppers */
body[data-shop-buttons="square"] { --r-button: 2px; --r-control: 2px; }
body[data-shop-buttons="pill"] { --r-button: 999px; --r-control: 999px; }

/* density */
body[data-shop-density="compact"] {
  --shop-gap: 1.5rem;
  --shop-pad: 1.5rem;
  --shop-hero-pad: 2.25rem;
  --card-pad: 0.85rem 1.1rem;
  --summary-pad: 1.1rem;
}
body[data-shop-density="spacious"] {
  --shop-gap: 3.5rem;
  --shop-pad: 3.5rem;
  --shop-hero-pad: 5rem;
  --card-pad: 1.6rem 1.9rem;
  --summary-pad: 1.9rem;
}
body[data-shop-density="compact"] .ticket-group-items { gap: 0.5rem; }
body[data-shop-density="spacious"] .ticket-group-items { gap: 1.1rem; }

/* card surface: outlined is the default */
body[data-shop-cards="filled"] .ticket-row,
body[data-shop-cards="filled"] .order-summary-inner {
  border-color: transparent;
  background: color-mix(in srgb, var(--text) 7%, var(--bg));
}
body[data-shop-cards="flat"] .ticket-row,
body[data-shop-cards="flat"] .order-summary-inner {
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}
body[data-shop-cards="flat"] .ticket-row { padding-left: 0; padding-right: 0; }

/* hero */
body[data-shop-hero="left"] .hero-inner {
  max-width: var(--shop-max, 1120px);
  text-align: left;
}
body[data-shop-hero="left"] .hero-description { margin-left: 0; }
body[data-shop-hero="banner"] .hero { position: relative; overflow: hidden; }
body[data-shop-hero="banner"] .hero-media {
  position: absolute;
  inset: 0;
  max-width: none;
  margin: 0;
}
body[data-shop-hero="banner"] .hero-media img {
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}
body[data-shop-hero="banner"] .hero-inner > :not(.hero-media) { position: relative; z-index: 1; }
body[data-shop-hero="banner"] .hero:has(.hero-media:not(.hidden))::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
body[data-shop-hero="banner"] .hero-media { z-index: 0; }

/* order summary below the tickets */
body[data-shop-summary="bottom"] .store-grid { grid-template-columns: minmax(0, 1fr); }
body[data-shop-summary="bottom"] .order-summary-inner { position: static; }

/* ticket grid */
body[data-shop-tickets="grid"] .ticket-group-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
body[data-shop-tickets="grid"] .ticket-row {
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
}
body[data-shop-tickets="grid"] .ticket-row-actions { justify-content: space-between; }
body[data-shop-tickets="grid"] .ticket-price { text-align: left; }

/* ------------------------------------------------------------------ page blocks (shop.blocks, shop.pages)
   Colours come from the brand tokens (--bg, --surface, --primary, --accent, --text); nothing here sets one. */

#shop-blocks {
  display: flex;
  flex-direction: column;
}

/* auto side margins would otherwise shrink these to their content inside the flex column */
#shop-blocks > * {
  width: 100%;
  box-sizing: border-box;
}

.blk {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.blk-pad-none { padding-top: 0; padding-bottom: 0; }
.blk-pad-small { padding-top: calc(var(--blk-gap, 64px) * 0.5); padding-bottom: calc(var(--blk-gap, 64px) * 0.5); }
.blk-pad-normal { padding-top: var(--blk-gap, 64px); padding-bottom: var(--blk-gap, 64px); }
.blk-pad-large { padding-top: calc(var(--blk-gap, 64px) * 1.6); padding-bottom: calc(var(--blk-gap, 64px) * 1.6); }

.blk-bg-surface { background: var(--surface); }
.blk-bg-primary { background: var(--primary); color: var(--on-primary, #fff); }
.blk-bg-primary .blk-title, .blk-bg-primary .blk-card-title { color: inherit; }
.blk-bg-accent { background: var(--accent); color: var(--on-accent, #fff); }
.blk-bg-accent .blk-title, .blk-bg-accent .blk-card-title { color: inherit; }

.blk-inner { margin: 0 auto; }
.blk-w-narrow { max-width: 720px; }
.blk-w-standard { max-width: var(--shop-max, 1120px); }
.blk-w-wide { max-width: calc(var(--shop-max, 1120px) + 240px); }
.blk-w-full { max-width: none; }

.blk-align-center { text-align: center; }
.blk-align-center .blk-body, .blk-align-center .blk-intro { margin-left: auto; margin-right: auto; }

.blk-title {
  margin: 0 0 1rem;
  font-size: calc(1.6rem * var(--heading-scale, 1));
  line-height: 1.15;
  color: var(--primary-text, var(--primary));
}

.blk-intro { margin: 0 0 1.5rem; max-width: 40rem; color: var(--muted); }
.blk-bg-primary .blk-intro, .blk-bg-accent .blk-intro { color: inherit; opacity: 0.85; }
.blk-body p { margin: 0 0 1rem; }
.blk-body p:last-child { margin-bottom: 0; }

.blk-figure { margin: 0; }
.blk-figure img { width: 100%; height: auto; display: block; border-radius: var(--r-card, 12px); }
.blk-figure figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted); }

.blk-card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
@media (max-width: 800px) { .blk-card-grid { grid-template-columns: minmax(0, 1fr); } }
.blk-card {
  display: block;
  padding: var(--card-pad, 1.25rem 1.5rem);
  border: 1px solid var(--border);
  border-radius: var(--r-card, 12px);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
a.blk-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.blk-bg-surface .blk-card { background: var(--bg); }
.blk-card-img { width: 100%; height: auto; display: block; margin-bottom: 0.75rem; border-radius: calc(var(--r-card, 12px) / 2); }
.blk-card-title { margin: 0 0 0.35rem; font-size: 1.1rem; }
.blk-card-body p { margin: 0 0 0.5rem; color: var(--muted); }

.blk-faq-item { border-bottom: 1px solid var(--border); padding: 0.9rem 0; }
.blk-faq-item summary { cursor: pointer; font-weight: 600; }
.blk-faq-item summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.blk-faq-answer { margin-top: 0.6rem; color: var(--muted); }
.blk-faq-answer p { margin: 0 0 0.6rem; }

.blk-cta .blk-intro { margin-left: auto; margin-right: auto; }
.blk-cta.blk-align-left .blk-intro { margin-left: 0; }

.blk-divider-small { height: 1.5rem; }
.blk-divider-normal { height: 3rem; }
.blk-divider-large { height: 5rem; }
.blk-divider-line { background: linear-gradient(var(--border), var(--border)) center / calc(100% - 2.5rem) 1px no-repeat; }

.blk-footer-text { padding-top: 1.5rem; padding-bottom: 0; color: var(--muted); font-size: 0.9rem; text-align: center; }

.hero-subtitle { margin: 0.75rem auto 0; max-width: 36rem; color: var(--muted); }
.hero-cta { margin: 1.5rem 0 0; }
body[data-shop-hero="left"] .hero-subtitle { margin-left: 0; }

.site-nav { display: flex; gap: 1.25rem; margin-left: auto; margin-right: 1rem; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover { color: var(--accent); }
@media (max-width: 640px) { .site-nav { display: none; } }
