/* ============ Theatre seat picker (offline, Eventa identity) ============ */

.theatre { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Live stats bar ---------- */
.theatre-stats {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.theatre-stats .tstats { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.ts-stat { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.ts-stat b { color: var(--text); font-size: 13.5px; }
.ts-stat .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ts-stat .dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.ts-stat .dot.taken { background: var(--muted); }
.ts-stat .dot.sel { background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.ts-stat .dot.cy { background: var(--accent); }

.tier-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.tf-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 11px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: all .15s ease;
}
.tf-btn .tdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tf-btn.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 36%, transparent); }

/* ---------- Map viewport ---------- */
.t-viewport {
    position: relative; overflow: hidden; border-radius: 22px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border); box-shadow: var(--shadow);
    min-height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding: 18px 14px 26px; user-select: none;
}
.t-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
.t-canvas { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; transform-origin: center top; transition: transform .15s ease-out; }

.t-zoom { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 10; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.t-zoom button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 15px; display: grid; place-items: center; }
.t-zoom button:hover { color: var(--text); background: var(--surface-3); }
.t-zoom span { text-align: center; font-size: 10px; font-family: ui-monospace, monospace; color: var(--muted); padding: 3px 0; }
.t-hint { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 10; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 11.5px; box-shadow: var(--shadow-sm); }

/* ---------- Curved stage ---------- */
.t-stage { width: min(560px, 94%); margin: 8px 0 26px; text-align: center; perspective: 800px; }
.t-stage-board {
    transform: rotateX(24deg); border-radius: 0 0 60px 60px; padding: 14px 22px;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-3) 70%, transparent), color-mix(in srgb, var(--primary) 30%, transparent));
    border-block: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--accent) 45%, transparent);
}
.t-stage-board h4 { font-family: var(--font-display); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; font-size: 14px; color: color-mix(in srgb, var(--text) 92%, var(--accent)); margin: 0; }
.t-stage-board small { color: var(--muted); font-size: 11px; }

/* ---------- Zones & rows ---------- */
.t-zones { width: 100%; display: flex; flex-direction: column; gap: 22px; }
.t-zone-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.t-zone-head .h { height: 1px; width: 54px; background: currentColor; opacity: .35; }
.t-zone-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, #000 0%, transparent); border: 1px solid currentColor; opacity: .9; }
.t-rows { display: flex; flex-direction: column; gap: 9px; align-items: center; }
.t-row { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.t-rlabel { width: 22px; text-align: center; font-size: 11px; font-weight: 800; font-family: ui-monospace, monospace; color: var(--muted); flex-shrink: 0; }

/* ---------- Seats ---------- */
.t-seat {
    width: clamp(26px, 3.4vw, 34px); height: clamp(26px, 3.4vw, 34px); border-radius: 9px;
    border: 1.5px solid transparent; position: relative; cursor: pointer;
    display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff;
    transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s ease, opacity .18s ease;
}
.t-seat:hover:not(.taken) { transform: scale(1.25) translateY(-2px); z-index: 5; box-shadow: 0 8px 14px -4px rgba(0,0,0,.5); }
.t-seat.taken { cursor: not-allowed; opacity: .3; filter: grayscale(80%); }
.t-seat.dimmed { opacity: .14; filter: grayscale(100%); pointer-events: none; }
.t-seat.sel { transform: scale(1.22) translateY(-2px); box-shadow: 0 0 0 2px var(--ok), 0 0 16px var(--ok); animation: tPulse 1.8s infinite; z-index: 6; }
@keyframes tPulse { 0%, 100% { box-shadow: 0 0 0 2px var(--ok), 0 0 10px var(--ok); } 50% { box-shadow: 0 0 0 2px var(--ok), 0 0 24px color-mix(in srgb, var(--ok) 70%, transparent); } }

/* ---------- Legend ---------- */
.t-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 12px; box-shadow: var(--shadow-sm); }
.t-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.t-legend .sw { width: 15px; height: 15px; border-radius: 5px; display: inline-block; }

/* ---------- Cart bar ---------- */
.t-cart {
    position: sticky; bottom: 12px; z-index: 30;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 16px; border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.t-cart-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-cart-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); flex-shrink: 0; }
.t-cart-ic .ic { width: 20px; height: 20px; }
.t-cart-info { min-width: 0; }
.t-cart-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.t-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 9px; background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary-strong); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); font-size: 11.5px; font-weight: 700; }
.t-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.t-cart-right { display: flex; align-items: center; gap: 16px; }
.t-total { text-align: start; }
.t-total .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.t-total .v { font-family: var(--font-display); font-weight: 900; font-size: 21px; }

/* ---------- Tooltip ---------- */
.t-tooltip {
    position: fixed; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .15s ease;
    padding: 12px 14px; border-radius: 14px; min-width: 190px;
    background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.t-tooltip.show { opacity: 1; }
.t-tip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 7px; margin-bottom: 7px; }
.t-tip-head b { font-size: 12.5px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.t-tip-head .price { color: var(--text); font-weight: 800; font-size: 14px; }
.t-tip-row { display: flex; justify-content: space-between; gap: 14px; font-size: 11.5px; color: var(--muted); padding: 2px 0; }
.t-tip-row strong { color: var(--text); font-weight: 700; }

@media (max-width: 640px) {
    .t-cart { flex-direction: column; align-items: stretch; }
    .t-cart-right { justify-content: space-between; }
    .t-hint { display: none; }
}