/* ---------- Seat selector / stadium map ---------- */
.seat-page { padding-top: 118px; }
.seat-layout { display: grid; grid-template-columns: 1.5fr 0.9fr; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .seat-layout { grid-template-columns: 1fr; } }

/* match picker */
.match-picker { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.match-pill { flex-shrink: 0; padding: 12px 16px; border-radius: 16px; cursor: pointer; background: var(--surface); border: 1px solid var(--stroke); transition: 0.3s var(--ease); text-align: left; color: var(--text); }
.match-pill:hover { background: var(--surface-2); }
.match-pill.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.match-pill .mp-teams { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; }
.match-pill .mp-meta { color: var(--text-faint); font-size: 0.78rem; }

/* match banner */
.match-banner { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 5vw, 60px); padding: 22px; margin-bottom: 18px; text-align: center; }
.mb-team { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mb-team .abbr { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1; }
.mb-team .name { font-weight: 600; font-size: 0.9rem; }
.mb-team .rank { color: var(--text-faint); font-size: 0.76rem; }
.mb-flag { width: 46px; height: auto; border-radius: 5px; margin: 8px auto 0; display: block; border: 1px solid var(--stroke); box-shadow: 0 5px 14px -6px rgba(0,0,0,0.4); }
.mb-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mb-vs { font-family: var(--font-display); font-weight: 700; color: var(--text-faint); font-size: 1.1rem; }
.mb-info { color: var(--text-dim); font-size: 0.82rem; display: flex; align-items: center; gap: 6px; }

/* stadium */
.stadium-wrap { padding: 18px; }
.stadium-canvas { position: relative; width: 100%; aspect-ratio: 400 / 360; }
.stadium-canvas svg { width: 100%; height: 100%; overflow: visible; display: block; }
.sec { cursor: pointer; transition: opacity 0.3s, filter 0.25s; }
.sec:hover { filter: brightness(1.12); }
.sec.dim { opacity: 0.2; }
.sec.soldout { cursor: not-allowed; }
.sec.active { filter: brightness(1.15) drop-shadow(0 0 10px currentColor); }
.sec-outline { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2; pointer-events: none; opacity: 0; transition: opacity .2s; }
.sec.active .sec-outline { opacity: 1; }
.sec-lbl { font: 600 8px var(--font); fill: rgba(255,255,255,.9); pointer-events: none; }
:root[data-theme="light"] .sec-lbl { fill: rgba(255,255,255,.95); }
.pitch-rect { fill: url(#pitchGrad); stroke: rgba(255,255,255,.35); }
.pitch-line { stroke: rgba(255,255,255,.4); fill: none; }
.pitch-label { font: 700 11px var(--font-display); fill: rgba(255,255,255,.6); letter-spacing: 4px; }

/* HTML price chips over the SVG */
.sec-tags { position: absolute; inset: 0; pointer-events: none; }
.sec-tag {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer;
  background: #fff; color: #0d1424; border-radius: 9px; padding: 4px 8px; text-align: center;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.45); border: 1px solid rgba(0,0,0,.06);
  font-size: 0.72rem; line-height: 1.15; white-space: nowrap; transition: transform 0.2s var(--ease), box-shadow 0.2s;
  min-width: 46px;
}
.sec-tag:hover { transform: translate(-50%,-50%) scale(1.08); box-shadow: 0 10px 22px -6px rgba(0,0,0,.5); z-index: 5; }
.sec-tag .p { font-weight: 800; }
.sec-tag .left { color: #d63a4b; font-weight: 700; font-size: 0.64rem; }
.sec-tag .left.ok { color: #1f9d57; }
.sec-tag.soldout { opacity: 0.55; }
.sec-tag.soldout .left { color: #8a92a6; }
.sec-tag.hidden { display: none; }
@media (max-width: 620px) { .sec-tag { font-size: 0.6rem; padding: 3px 5px; min-width: 34px; } .sec-tag .left { font-size: 0.55rem; } }

/* legend + filters */
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; justify-content: center; }
.legend .li { display: inline-flex; gap: 7px; align-items: center; font-size: 0.8rem; color: var(--text-dim); }
.legend .sw { width: 13px; height: 13px; border-radius: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.filter-chip { padding: 8px 14px; border-radius: 100px; font-size: 0.82rem; font-weight: 600; background: var(--surface); border: 1px solid var(--stroke); color: var(--text-dim); transition: 0.25s var(--ease); display: inline-flex; align-items: center; gap: 7px; }
.filter-chip:hover { background: var(--surface-2); color: var(--text); }
.filter-chip.active { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.filter-chip .sw { width: 10px; height: 10px; border-radius: 3px; }

/* details panel */
.detail-panel { padding: 22px; position: sticky; top: 90px; }
.detail-empty { text-align: center; padding: 40px 14px; color: var(--text-faint); }
.detail-empty-mark { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; letter-spacing: 0.05em; color: color-mix(in srgb, var(--accent) 55%, transparent); margin-bottom: 8px; }
.detail-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.detail-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--stroke); }
.detail-row:last-of-type { border-bottom: 0; }
.detail-row .k { color: var(--text-dim); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 7px; }
.detail-row .v { font-weight: 600; }
.detail-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0; }
.detail-total .amt { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }

.view-preview { height: 120px; border-radius: 14px; margin: 6px 0 16px; position: relative; overflow: hidden; background: radial-gradient(120% 100% at 50% 130%, #1f7a4d 0%, #0f3d26 45%, #0a1420 100%); border: 1px solid var(--stroke); }
.view-preview .vp-pitch { position: absolute; inset: 58% 16% 8% 16%; border-radius: 50% / 42%; background: linear-gradient(180deg, #24905c, #16613c); box-shadow: inset 0 0 20px rgba(0,0,0,0.4); }
.view-preview .vp-line { position: absolute; left: 50%; top: 58%; bottom: 8%; width: 1px; background: rgba(255,255,255,0.3); }
.view-preview .vp-tag { position: absolute; top: 10px; left: 12px; font-size: 0.72rem; color: rgba(255,255,255,0.9); background: rgba(0,0,0,0.4); padding: 3px 9px; border-radius: 100px; display: inline-flex; gap: 5px; align-items: center; }

/* seat grid */
.seatmap { margin-top: 6px; }
.seat-rows { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 6px 0; }
.seat-row { display: flex; gap: 5px; align-items: center; }
.seat-row .rl { width: 16px; font-size: 0.68rem; color: var(--text-faint); text-align: center; }
.seat { width: 19px; height: 19px; border-radius: 5px 5px 7px 7px; border: 1px solid var(--stroke); background: var(--surface-2); cursor: pointer; transition: 0.18s var(--ease); padding: 0; }
.seat:hover:not(.taken) { transform: translateY(-3px) scale(1.1); border-color: var(--accent); }
.seat.avail { background: color-mix(in srgb, var(--good) 26%, transparent); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.seat.taken { background: var(--surface); border-color: transparent; cursor: not-allowed; opacity: 0.4; }
.seat.sel { background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); border-color: transparent; box-shadow: 0 5px 14px -6px var(--accent); transform: translateY(-2px); }
.pitch-mini { text-align: center; font-size: 0.68rem; letter-spacing: 3px; color: var(--text-faint); padding: 7px; border-radius: 9px; background: color-mix(in srgb, var(--good) 10%, transparent); margin: 12px 0; display: flex; align-items: center; justify-content: center; gap: 8px; }

.zoom-controls { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 6; }

.map-hint { display: none; text-align: center; color: var(--text-dim); font-size: 0.86rem; margin-top: 12px; }

@media (max-width: 1000px) {
  .detail-panel { position: static; }
}
/* On phones the price chips overlap badly — hide them and let users
   tap a section to see its price + availability in the panel below. */
@media (max-width: 760px) {
  .sec-tags { display: none; }
  .map-hint { display: block; }
  .sec { stroke: rgba(255,255,255,0.35); stroke-width: 1; }
  .sec.soldout { opacity: 1; }
  .stadium-canvas { aspect-ratio: 400 / 320; }
}
@media (max-width: 560px) {
  .seat-page { padding-top: 100px; }
  .match-banner { gap: 14px; padding: 16px; }
  .mb-team .name { font-size: 0.78rem; }
  .stadium-wrap { padding: 12px; }
  .seat { width: 17px; height: 17px; }
  .filter-chip { padding: 7px 11px; font-size: 0.76rem; }
}
