@import url("/platform/tokens.css");

:root {
  --primary: #1a1f26;
  --accent: #2563eb;
  --bg: #f4f6f8;
  --text: #2a3140;
  --muted: #5c6573;
  --border: #d8dee6;
  --surface: #fff;
  --focus: #2563eb;
}

* {
  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: #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: -0.02em;
  font-weight: 700;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  max-width: 1080px;
  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);
}

.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);
}

.hero {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2.75rem;
  text-align: center;
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.1;
  color: var(--primary);
}

.hero-datetime {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 500;
}

.hero-venue {
  margin: 0 0 1rem;
  color: var(--muted);
}

.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: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.store-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .store-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .order-summary-inner {
    position: sticky;
    top: 1rem;
  }
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

@media (min-width: 640px) {
  .ticket-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.ticket-name {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.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.05rem;
  min-width: 4.5rem;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  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);
}

.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: 6px;
  padding: 1.25rem;
  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: #faf8f4;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.hidden {
  display: none !important;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.15rem;
  border-radius: 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(--primary);
  color: #fff;
}

.button-block {
  display: block;
  width: 100%;
}

.button.secondary,
.button-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.button.disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-layout {
  max-width: 960px;
  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) minmax(220px, 300px);
    grid-template-areas: "main sidebar";
  }

  .checkout-main {
    grid-area: main;
  }

  .checkout-sidebar {
    grid-area: sidebar;
  }
}

.checkout-panel {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  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-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(--muted);
  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 {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.totals div,
.totals .summary-row {
  display: flex;
  justify-content: space-between;
  margin: 0.35rem 0;
}

.totals .total-line,
.summary-row-total {
  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.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 0.35rem;
  font: inherit;
}

input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--primary);
}

.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;
}

.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);
  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;
  }
}
