/* ============================================================
   TicketFor — design tokens
   Poster-energy palette for a touring hip-hop show: near-black
   base, hot-magenta primary accent, gold reserved for VIP tier.
   Display type: Anton (condensed, high-impact headlines).
   Body/UI type: Inter.
   ============================================================ */
:root {
  --bg: #0B0B10;
  --surface: #15151D;
  --surface-2: #1C1C26;
  --line: #262633;
  --text: #F2F1F6;
  --text-muted: #9795A5;
  --accent: #FF3D6E;
  --accent-dim: #591C31;
  --gold: #FFB800;
  --ok: #3DDC84;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  background: rgba(11,11,16,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.5px; }
.logo span { color: var(--accent); }
.header-cta {
  background: var(--accent); color: #fff; border: none; padding: 10px 20px;
  border-radius: 3px; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.header-cta:hover, .hero-cta:hover, .checkout-btn:not(:disabled):hover, .pay-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(255,61,110,0.55);
}

/* ---------- hero ---------- */
.hero { background: #fff; }
.hero-banner {
  width: 100%;
  height: clamp(180px, 32vw, 420px);
  object-fit: contain;
  background: var(--surface);
  display: block;
}
.hero-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 18px;
  padding: 20px 24px;
}
.hero-bar-facts {
  display: flex; flex-wrap: wrap; gap: 26px;
  color: var(--text-muted); font-size: 14.5px;
}
.hero-bar-facts strong { color: var(--text); display: block; font-size: 15.5px; }
.hero-cta {
  background: var(--accent); color: #fff; border: none; padding: 13px 26px;
  font-size: 14.5px; font-weight: 700; border-radius: 3px; cursor: pointer;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .hero-bar { flex-direction: column; align-items: stretch; }
  .hero-cta { width: 100%; }
}

/* ---------- ticket picker ---------- */
.tickets-section { padding: 40px 0 100px; }
.tickets-section h2 {
  font-family: var(--font-display); font-size: 34px; margin: 0 0 6px;
}
.tickets-section .lede { color: var(--text-muted); margin: 0 0 36px; max-width: 60ch; }

.picker-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start;
}
@media (max-width: 880px) {
  .picker-grid { grid-template-columns: 1fr; }
}

.arena-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 28px;
  box-shadow: 0 20px 40px -24px rgba(0,0,0,0.55);
}
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .arena-card { padding: 14px 8px; }
}

.arena-map { width: 100%; }
.arena-loading { color: var(--text-muted); font-size: 14px; text-align: center; padding: 60px 0; }
.arena-svg { width: 100%; height: auto; display: block; }
.arena-zone {
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.arena-zone:hover { filter: brightness(1.12); }
.arena-zone.selected {
  stroke: #fff !important;
  stroke-width: 4 !important;
  filter: brightness(1.08);
}

.legend {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px;
  padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-muted);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 2px; }

.vip-heading { font-family: var(--font-display); font-size: 24px; margin: 40px 0 16px; }
.vip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px;
}
.vip-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 18px; text-align: left; cursor: pointer; color: var(--text);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.vip-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 14px 26px -16px rgba(255,184,0,0.4);
}
.vip-card.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.vip-card .vip-name { font-weight: 700; margin-bottom: 8px; font-size: 14.5px; }
.vip-card .vip-price { color: var(--gold); font-weight: 700; }

/* ---------- order panel ---------- */
.order-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 26px; position: sticky; top: 90px;
  box-shadow: 0 20px 40px -24px rgba(0,0,0,0.55);
}
.order-panel h3 { margin: 0 0 4px; font-size: 18px; }
.order-empty { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.order-zone-name { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.order-zone-type { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }
.order-description {
  background: var(--surface-2); border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0; padding: 12px 14px; margin: -8px 0 18px;
  font-size: 13.5px; color: var(--text-muted); line-height: 1.5;
}
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; }
.qty-stepper button {
  background: none; border: none; color: var(--text); width: 34px; height: 34px;
  font-size: 16px; cursor: pointer;
}
.qty-stepper span { width: 30px; text-align: center; font-weight: 600; }
.price-each { color: var(--text-muted); font-size: 13.5px; }

.adjacent-note {
  background: var(--surface-2); border-radius: 4px; padding: 12px 14px; margin-bottom: 18px;
  font-size: 13px; color: var(--text-muted); display: none;
}
.adjacent-note.show { display: block; }
.adjacent-note label { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--text); cursor: pointer; }

.order-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px;
}
.order-total-row .label { color: var(--text-muted); font-size: 14px; }
.order-total-row .amount { font-size: 26px; font-weight: 700; font-family: var(--font-display); }

.checkout-btn {
  width: 100%; margin-top: 18px; padding: 14px; border: none; border-radius: 4px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
}
.checkout-btn:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }

/* ---------- modal / checkout ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,6,9,0.72);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  width: 100%; max-width: 560px; padding: 32px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7);
}
.modal-card h2 { font-family: var(--font-display); font-size: 26px; margin: 0 0 20px; }
.modal-close { float: right; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; }

.ticket-holder { border-top: 1px solid var(--line); padding: 16px 0; }
.ticket-holder:first-of-type { border-top: none; }
.ticket-holder .th-label {
  font-size: 13px; color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.th-badge {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.field { margin-top: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }

/* Any text-style input anywhere in the app gets this base look — not just
   inputs wrapped in .field, so a ticket-holder name field never falls back
   to an unstyled browser default again. */
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%; padding: 11px 12px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 14.5px;
  font-family: var(--font-body);
  transition: border-color .15s ease;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder { color: var(--text-muted); }
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus { outline: none; border-color: var(--accent); }

input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px; height: 18px;
  vertical-align: -4px;
  margin-right: 2px;
  cursor: pointer;
}

.checkout-summary {
  background: var(--surface-2); border-radius: 4px; padding: 14px 16px; margin: 22px 0;
  font-size: 14px; color: var(--text-muted);
}
.checkout-summary .cs-total { color: var(--text); font-weight: 700; font-size: 18px; margin-top: 8px; }

.form-error { color: #FF6B6B; font-size: 13.5px; margin-top: 12px; display: none; }
.form-error.show { display: block; }

.pay-btn {
  width: 100%; margin-top: 8px; padding: 15px; border: none; border-radius: 4px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15.5px; cursor: pointer;
}
.pay-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.back-link { display: inline-block; margin-top: 16px; color: var(--text-muted); font-size: 13.5px; cursor: pointer; background: none; border: none; }

.confirm-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--ok); display:flex; align-items:center; justify-content:center; font-size: 24px; margin-bottom: 18px; color:#0B0B10; }
.confirm-order-no { font-family: var(--font-display); font-size: 22px; margin: 4px 0 18px; }

/* ---------- footer ---------- */
.site-footer { padding: 40px 24px; text-align: center; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- chat widget ---------- */
.chat-bubble {
  position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); border: none; color: #fff; font-size: 24px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(255,61,110,0.35); z-index: 90;
}
.chat-panel {
  position: fixed; bottom: 94px; right: 24px; width: 320px; max-height: 440px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  display: none; flex-direction: column; overflow: hidden; z-index: 90;
}
.chat-panel.open { display: flex; }
.chat-panel-head { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.chat-panel-head span { display:block; font-weight: 400; font-size: 12px; color: var(--text-muted); margin-top:2px; }
.chat-panel-body { flex: 1; overflow-y: auto; padding: 14px; min-height: 180px; }
.chat-panel-body .empty { color: var(--text-muted); font-size: 13px; }
.chat-panel-form { display: flex; border-top: 1px solid var(--line); }
.chat-panel-form input { flex: 1; border: none; background: transparent; color: var(--text); padding: 12px; font-size: 13.5px; }
.chat-panel-form input:focus { outline: none; }
.chat-panel-form button { border: none; background: var(--accent); color: #fff; padding: 0 16px; cursor: pointer; }

@media (max-width: 480px) {
  .name-row { grid-template-columns: 1fr; }
  .chat-panel { width: calc(100vw - 32px); right: 16px; }
}
