/* ============================================================
   Boletíssimo — SeatMap (selección de asientos)
   ============================================================ */
.sm { display: flex; flex-direction: column; min-height: 100vh; background: var(--surface-page); }

.sm__bar { display: flex; align-items: center; gap: 14px; padding: 12px var(--gutter-desktop); border-bottom: 1px solid var(--border-subtle); background: var(--surface-card); position: sticky; top: 0; z-index: 5; }
.sm__back { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font: var(--text-label-sm); color: var(--text-body); flex: none; }
.sm__back svg { width: 18px; height: 18px; }
.sm__bar-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.sm__bar-mid b { font-family: var(--font-display); font-weight: 700; font-size: var(--size-lg); color: var(--text-strong); }
.sm__bar-mid span { font: var(--text-caption); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm__timer { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-weight: 600; font-size: var(--size-sm); color: var(--warning); background: var(--warning-soft); padding: 6px 11px; border-radius: var(--radius-pill); flex: none; }
.sm__timer svg { width: 14px; height: 14px; }

.sm__body { flex: 1; display: grid; grid-template-columns: 1fr 340px; gap: 0; min-height: 0; }
.sm__stagewrap { position: relative; display: flex; flex-direction: column; min-width: 0; }
.sm__viewport { flex: 1; overflow: hidden; background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in oklch, var(--azul-500) 8%, var(--surface-sunken)), var(--surface-sunken));
    cursor: grab; touch-action: none; display: flex; justify-content: center; }
.sm__viewport:active { cursor: grabbing; }
.sm__canvas { transform-origin: top center; padding: 26px 24px 40px; display: inline-flex; flex-direction: column; align-items: center; gap: 20px; will-change: transform; }
.sm__stage { width: min(70%, 420px); height: 30px; border-radius: 0 0 var(--radius-2xl) var(--radius-2xl); background: linear-gradient(180deg, var(--ink-800), var(--ink-700)); color: #fff; display: flex; align-items: center; justify-content: center; font: var(--text-eyebrow); letter-spacing: 0.18em; text-transform: uppercase; box-shadow: var(--shadow-md); }
.sm__rows { display: flex; flex-direction: column; gap: 6px; }
.sm__row { display: flex; align-items: center; gap: 8px; }
.sm__rowlbl { width: 16px; text-align: center; font-family: var(--font-mono); font-size: 10px; color: var(--text-subtle); flex: none; }
.sm__seats { display: flex; align-items: center; gap: 5px; }
.sm__aisle { width: 16px; flex: none; }
.sm__seat { width: 24px; height: 24px; border-radius: 7px 7px 5px 5px; border: none; background: var(--seat-available); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: transform var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard); flex: none; }
.sm__seat:hover:not(:disabled) { transform: translateY(-2px) scale(1.08); }
.sm__seat-n { font-family: var(--font-mono); font-size: 9px; font-weight: 600; opacity: 0; }
.sm__seat:hover .sm__seat-n { opacity: .9; }
.sm__seat.is-vip { background: var(--seat-vip); }
.sm__seat.is-taken { background: var(--seat-taken); cursor: not-allowed; opacity: .55; }
.sm__seat.is-sel { background: var(--seat-selected); box-shadow: 0 0 0 3px color-mix(in oklch, var(--seat-selected) 30%, transparent); }
.sm__seat.is-sel .sm__seat-n { opacity: 1; }
.sm__seat.is-acc { background: var(--info, var(--azul-500)); }
.sm__seat.is-acc svg { width: 14px; height: 14px; }

.sm__zoom { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 6px; }
.sm__zoom button { width: 38px; height: 38px; border-radius: var(--radius-md); border: 1px solid var(--border-default); background: var(--surface-card); color: var(--text-strong); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.sm__zoom button:hover { border-color: var(--border-strong); }
.sm__zoom svg { width: 17px; height: 17px; }

.sm__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px var(--gutter-desktop); border-top: 1px solid var(--border-subtle); background: var(--surface-card); }
.sm__legend span { display: inline-flex; align-items: center; gap: 7px; font: var(--text-caption); color: var(--text-muted); }
.sm__dot { width: 14px; height: 14px; border-radius: 5px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.sm__dot--free { background: var(--seat-available); }
.sm__dot--sel { background: var(--seat-selected); }
.sm__dot--taken { background: var(--seat-taken); }
.sm__dot--vip { background: var(--seat-vip); }
.sm__dot--acc { background: var(--info, var(--azul-500)); }
.sm__dot--acc svg { width: 10px; height: 10px; }

/* Panel lateral */
.sm__panel { border-left: 1px solid var(--border-default); background: var(--surface-card); padding: 22px; overflow-y: auto; }
.sm__panel-in { display: flex; flex-direction: column; gap: 16px; }
.sm__panel-hd { display: flex; align-items: baseline; justify-content: space-between; }
.sm__panel-hd h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--size-lg); color: var(--text-strong); }
.sm__progress { font-family: var(--font-mono); font-weight: 600; font-size: var(--size-sm); color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: var(--radius-pill); }
.sm__panel-empty { font: var(--text-body-sm); color: var(--text-muted); }
.sm__chips { display: flex; flex-direction: column; gap: 8px; }
.sm__chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); cursor: pointer; font: var(--text-label-sm); color: var(--text-strong); }
.sm__chip span { flex: 1; text-align: left; font-family: var(--font-mono); }
.sm__chip:hover { border-color: var(--border-strong); }
.sm__chip svg { width: 15px; height: 15px; color: var(--text-muted); }
.sm__panel-tot { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--border-subtle); }
.sm__tot-lbl { display: block; font: var(--text-label); color: var(--text-strong); }
.sm__tot-sub { font: var(--text-caption); color: var(--text-muted); }
.sm__tot-amt { font-family: var(--font-mono); font-weight: 700; font-size: var(--size-2xl); color: var(--text-strong); }

/* Barra inferior móvil */
.sm__bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter-mobile) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in oklch, var(--surface-card) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border-subtle); }
.sm__bottom-info { flex: 1; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; background: none; border: none; cursor: pointer; }
.sm__bottom-info b { font-family: var(--font-mono); font-weight: 700; font-size: var(--size-xl); color: var(--text-strong); }
.sm__bottom-info span { display: inline-flex; align-items: center; gap: 3px; font: var(--text-caption); color: var(--text-muted); }
.sm__bottom-info svg { width: 13px; height: 13px; }
.sm__bottom .bls-btn { flex: none; }

/* Responsive */
@media (max-width: 1023px) { .sm__body { grid-template-columns: 1fr 300px; } }
@media (max-width: 767px) {
  .sm { padding-bottom: 76px; }
  .sm__bar { padding: 10px var(--gutter-mobile); }
  .sm__body { grid-template-columns: 1fr; }
  .sm__viewport { min-height: 56vh; }
  .sm__legend { padding: 10px var(--gutter-mobile); gap: 6px 12px; }
  .sm__seat { width: 26px; height: 26px; }
}
