/* ════════════════════════════════════════════════════════════════════
   ACCESO CULTURAL — modal de compra, mapa de butacas, sala sheet, estados
   ════════════════════════════════════════════════════════════════════ */

/* ─────────────────  OVERLAY + SHEET base  ───────────────── */
.scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10,4,8,.7);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* compra: full-screen on mobile, centered panel on desktop */
.mc {
  position: fixed; z-index: 95;
  inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform .34s cubic-bezier(.4,0,.2,1);
}
.mc.is-open { transform: translateY(0); }
@media (min-width: 800px) {
  .mc {
    inset: auto; top: 50%; left: 50%;
    width: min(880px, calc(100vw - 48px));
    height: min(86vh, 860px);
    transform: translate(-50%, -46%) scale(.98);
    opacity: 0; pointer-events: none;
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    box-shadow: var(--sh-lg);
    overflow: hidden;
  }
  .mc.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
}

/* función header */
.mc__head {
  flex: none;
  position: relative;
  padding: 18px var(--gutter) 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.mc__head .close {
  position: absolute; top: 14px; right: 14px;
}
.mc__eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 7px;
}
#mc-show-name { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 4vw, 32px); line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 9px; padding-right: 46px; }
.mc__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.mc__meta span { display: inline-flex; align-items: center; gap: 7px; }
.mc__meta svg { width: 15px; height: 15px; opacity: .8; }
/* sala = clickable */
.sala-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold); font-weight: 600;
  background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line);
}
.sala-link:hover { text-decoration-color: var(--gold); }
.sala-link svg { width: 14px; height: 14px; }
#mc-show-desc { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 4px 0 0; text-wrap: pretty; }

/* ─────────────────  PROGRESS  ───────────────── */
.progress {
  flex: none;
  display: flex; gap: 9px;
  padding: 16px var(--gutter) 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.progress__step { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.progress__bar { height: 4px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.progress__bar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: var(--r-pill); transition: width .4s ease; }
.progress__step.is-done .progress__bar i,
.progress__step.is-cur  .progress__bar i { width: 100%; }
.progress__lbl { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--faint); }
.progress__lbl .n {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 10px;
  background: var(--line); color: var(--muted);
}
.progress__step.is-cur .progress__lbl, .progress__step.is-done .progress__lbl { color: var(--ink); }
.progress__step.is-cur .progress__lbl .n { background: var(--gold); color: var(--gold-ink); }
.progress__step.is-done .progress__lbl .n { background: var(--gold-soft); color: var(--gold-ink); }
@media (max-width: 420px) { .progress__lbl .txt { display: none; } }

/* body / steps */
.mc__body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 18px var(--gutter); }
.mc-step { display: none; }
.mc-step.is-active { display: block; animation: stepIn .3s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-title { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0 0 4px; }
.step-hint { font-size: 13px; color: var(--faint); margin: 0 0 16px; }

/* ─────────────────  TIPO / CANTIDAD (libre)  ───────────────── */
.tier {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px;
  transition: border-color .15s;
}
.tier.has-qty { border-color: var(--gold-soft); }
.tier__name { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 9px; }
.tier__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tier__desc { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tier__price { font-family: var(--display); font-weight: 600; font-size: 16px; margin-top: 5px; color: var(--gold); }
.stepper { display: flex; align-items: center; gap: 13px; flex: none; }
.stepper button {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface-2);
  color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
}
.stepper button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper .v { width: 24px; text-align: center; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ════════════════════════════════════════════════════════════
   MAPA DE BUTACAS — con zoom (pinch) + pan + controles
   ════════════════════════════════════════════════════════════ */
.seatmap-wrap { position: relative; }
.seatmap-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.seatmap-toolbar .hint {
  font-size: 12px; color: var(--faint);
  display: inline-flex; align-items: center; gap: 7px;
}
.seatmap-toolbar .hint svg { width: 15px; height: 15px; }
.zoom-ctrl { display: flex; gap: 7px; }
.zoom-ctrl button {
  width: 40px; height: 40px;
  border-radius: var(--r); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink);
  display: grid; place-items: center;
}
.zoom-ctrl button:hover { border-color: var(--gold); color: var(--gold); }
.zoom-ctrl button svg { width: 19px; height: 19px; }

/* the viewport that clips + captures gestures */
#mc-seatmap-scroll {
  position: relative;
  height: clamp(300px, 46vh, 440px);
  background:
    radial-gradient(120% 80% at 50% 0%, var(--surface-2), var(--bg) 75%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  touch-action: none;            /* we handle pan/zoom ourselves */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
#mc-seatmap-scroll.is-grabbing { cursor: grabbing; }

/* the transformable canvas */
#mc-seatmap {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  padding: 18px 22px 22px;
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
  will-change: transform;
}

/* escenario */
.stage-arc {
  width: 320px; max-width: 70vw;
  height: 34px; margin-bottom: 14px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 22%, transparent), transparent);
  border-top: 2px solid var(--gold);
  display: grid; place-items: start center; padding-top: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
}
.sector-band {
  align-self: stretch;
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 5px;
}
.sector-band::before, .sector-band::after { content:""; height: 1px; background: var(--line); flex: 1; }
.sector-band .sw { width: 11px; height: 11px; border-radius: 3px; }

.seat-row { display: flex; align-items: center; gap: 7px; justify-content: center; }
.seat-row .rownum {
  width: 16px; text-align: center; flex: none;
  font-family: var(--mono); font-size: 10px; color: var(--faint); font-weight: 500;
}
.seat-row .aisle { width: 18px; }

/* SEATS — generous hit target (≈30px) */
.seat {
  width: 30px; height: 27px;
  border: 0; padding: 0;
  border-radius: 7px 7px 9px 9px;
  background: var(--surface);
  position: relative;
  transition: transform .08s, filter .12s, box-shadow .12s;
  cursor: pointer;
}
.seat::after {  /* seat "cushion" cue */
  content: ""; position: absolute; inset: 4px 5px 6px;
  border-radius: 4px; background: rgba(255,255,255,.07);
}
.seat:hover:not(.seat-occ) { transform: translateY(-2px); filter: brightness(1.15); z-index: 2; }
.seat-vip { background: var(--seat-vip); }
.seat-vip::after { background: rgba(42,27,5,.18); }
.seat-plA { background: var(--seat-plA); }
.seat-plB { background: var(--seat-plB); }
.seat-occ {
  background: var(--seat-occ);
  border: 1.5px solid var(--seat-line);
  cursor: not-allowed;
}
.seat-occ::after { display: none; }
.seat-sel {
  background: var(--seat-sel) !important;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--seat-sel), 0 6px 14px -4px var(--seat-sel);
  transform: translateY(-2px);
  z-index: 3;
}
.seat-sel::after { background: rgba(255,255,255,.25); }

/* legend with prices */
#mc-legend {
  display: flex; flex-wrap: wrap; gap: 9px 16px;
  margin-top: 14px;
}
.legend-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted);
}
.legend-item i { width: 16px; height: 14px; border-radius: 4px; flex: none; }
.legend-item b { color: var(--ink); font-weight: 600; }
.legend-item .pr { font-family: var(--display); font-weight: 600; color: var(--gold); }
.legend-item.occ i { background: var(--seat-occ); border: 1.5px solid var(--seat-line); }
.legend-item.sel i { background: var(--seat-sel); }

/* selección actual */
#mc-selection-box {
  margin-top: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 16px;
}
.selbox__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.selbox__head .t { font-weight: 700; font-size: 14px; }
.selbox__clear { background: none; border: 0; color: var(--rose); font-weight: 600; font-size: 13px; }
.sel-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.sel-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 8px 6px 12px;
  font-size: 13px; font-weight: 600;
}
.sel-tag .x { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--muted); }
.sel-tag .x:hover { color: var(--rose); }
.sel-empty { font-size: 13px; color: var(--faint); }

/* ─────────────────  DATOS (paso 2)  ───────────────── */
.form-note {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 13px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 14px; margin-top: 6px;
}
.form-note svg { width: 16px; height: 16px; color: var(--gold); margin-top: 1px; flex: none; }

/* ─────────────────  REVISAR (paso 3)  ───────────────── */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 14px; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 7px 0; color: var(--muted); }
.summary__row b { color: var(--ink); font-weight: 600; }
.summary__row.item { color: var(--ink); align-items: flex-start; }
.summary__row.item small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.summary__row.disc { color: var(--ok); }
.summary__div { height: 1px; background: var(--line); margin: 9px 0; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 13px; border-top: 2px solid var(--line); }
.summary__total .l { font-size: 14px; font-weight: 700; }
.summary__total .v { font-family: var(--display); font-weight: 600; font-size: 30px; }
.service-line { display: inline-flex; align-items: center; gap: 6px; }
.service-line .info { width: 15px; height: 15px; color: var(--faint); }

.coupon { display: flex; gap: 9px; margin-bottom: 6px; }
.coupon input {
  flex: 1; font-family: var(--ui); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); background: var(--surface-2); border: 1.5px dashed var(--line);
  border-radius: var(--r); padding: 13px 15px; outline: none;
}
.coupon input::placeholder { letter-spacing: 0.01em; text-transform: none; color: var(--faint); }
.coupon input:focus { border-color: var(--gold); border-style: solid; }
.coupon button { flex: none; }
.coupon-msg { font-size: 13px; font-weight: 600; margin: 10px 2px 0; display: none; }
.coupon-msg.ok { color: var(--ok); display: block; }
.coupon-msg.bad { color: var(--rose); display: block; }
.pay-secure { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 16px 2px 0; }
.pay-secure svg { width: 15px; height: 15px; color: var(--gold); }

/* ─────────────────  STICKY FOOT (total + pago)  ───────────────── */
.mc__foot {
  flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -12px 28px -20px rgba(0,0,0,.7);
}
.mc__foot .tot { flex: none; min-width: 92px; }
.mc__foot .tot .l { display: block; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.mc__foot .tot .v { font-family: var(--display); font-weight: 600; font-size: 25px; line-height: 1; }
.mc__foot .tot .c { font-size: 11.5px; color: var(--muted); }
.mc__foot .btn { flex: 1; }
#mc-btn-back { flex: none; }
.mp-mark { display: inline-flex; align-items: center; gap: 7px; }
.mp-mark svg { width: 20px; height: 20px; }

/* ════════════════════════════════════════════════════════════
   CUADRITO DE SALA — popover (desktop) / hoja inferior (mobile)
   ════════════════════════════════════════════════════════════ */
.sala-sheet {
  position: fixed; z-index: 100;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sh-lg);
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  max-height: 84vh; overflow-y: auto;
  padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom));
}
.sala-sheet.is-open { transform: translateY(0); }
.sala-sheet__grip { width: 42px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 16px; }
@media (min-width: 800px) {
  .sala-sheet {
    left: auto; right: auto; bottom: auto;
    width: 380px; border-radius: var(--r-xl);
    border: 1px solid var(--line);
    transform: translateY(8px) scale(.98); opacity: 0; pointer-events: none;
    transition: transform .2s, opacity .2s;
    max-height: min(560px, 80vh);
    padding: 22px 22px 24px;
  }
  .sala-sheet.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
  .sala-sheet__grip { display: none; }
}
.sala-sheet__name { font-family: var(--display); font-weight: 600; font-size: 23px; margin: 0 0 6px; padding-right: 36px; }
.sala-sheet__close { position: absolute; top: 16px; right: 16px; }
@media (max-width: 799px) { .sala-sheet__close { top: 14px; } }
.sala-sheet__desc { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 18px; text-wrap: pretty; }
.sala-info-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line);
  font-size: 14px;
}
.sala-info-row > svg { width: 18px; height: 18px; color: var(--gold); margin-top: 1px; flex: none; }
.sala-info-row .k { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.sala-info-row .val { color: var(--ink); font-weight: 600; }
.sala-info-row a.val { text-decoration: none; }
.sala-info-row a.val:hover { color: var(--gold); }
.sala-info-row .grow { flex: 1; }
.sala-socials { display: flex; gap: 9px; margin-top: 16px; }
.sala-maps { margin-top: 18px; }

/* ════════════════════════════════════════════════════════════
   ESTADOS
   ════════════════════════════════════════════════════════════ */
/* skeleton */
.sk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.sk__poster { aspect-ratio: 16/9; }
.sk__body { padding: 17px 18px 19px; }
.sk-line { height: 12px; border-radius: 6px; background: var(--surface-2); margin-bottom: 10px; }
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(244,234,221,.06), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* generic state block */
.state {
  text-align: center;
  padding: 70px 20px;
  max-width: 460px; margin: 0 auto;
}
.state__icon {
  width: 76px; height: 76px; margin: 0 auto 22px;
  border-radius: 22px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--gold);
}
.state__icon svg { width: 34px; height: 34px; }
.state__icon.bad { color: var(--rose); }
.state__icon.warn { color: var(--warn); }
.state__icon.ok { color: var(--ok); }
.state h3 { font-family: var(--display); font-weight: 600; font-size: 28px; margin: 0 0 10px; }
.state p { color: var(--muted); margin: 0 0 24px; text-wrap: pretty; }
.state__cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* toast + countdown pill reuse */
.countdown {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 8px 16px;
  color: var(--ink); margin-bottom: 22px;
}
.countdown svg { width: 15px; height: 15px; color: var(--warn); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg);
  font-size: 13.5px; font-weight: 600;
  padding: 12px 20px; border-radius: var(--r-pill);
  opacity: 0; pointer-events: none; transition: .25s;
  box-shadow: var(--sh-lg); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
