/* Ronda 7 · F · capa final de «física táctil» (17-nov): interruptores, botones principales y segmentados.
   Solo CSS (más fisica-cliente.tsx: marca el envío en curso y mide el indicador deslizante). No cambia textos, marcado ni lógica.
   Se enlaza LA ÚLTIMA entre las i2-r7-* (precedence propia: ordena después de todas, también de las que cargan los componentes).
   Todo movimiento va en no-preference; con reduce, estados finales sin transición. Especificidad: cada regla iguala la del original
   que pisa (no usa !important); las que no pisan nada van con :where() para que bloques posteriores puedan afinarlas. */

:is(.vv, .ix-raiz, .ac) {
  --f-on: #1A73E8; --f-ring: #1A73E8;
  --f-off: #98A0AE; --f-off-ln: rgba(16,17,20,.16);
  --f-knob: #FFFFFF; --f-knob-sh: 0 1px 3px rgba(16,17,20,.32), 0 0 0 .5px rgba(16,17,20,.08);
  --f-spring: cubic-bezier(.34,1.45,.64,1); --f-seg: cubic-bezier(.34,1.35,.64,1); --f-out: cubic-bezier(.23,1,.32,1);
  --f-sheen: none;   /* 19-nov (auditor): sin brillo degradado en los primarios (producto-ui §5/§9.4: sin degradados); color y forma, los mismos */
  --f-lift: 0 6px 14px -8px rgba(16,17,20,.55);
  --f-ind-bg: #FFFFFF; --f-ind-sh: 0 1px 2px rgba(16,17,20,.12), inset 0 0 0 1px rgba(16,17,20,.05), inset 0 -1px 1px rgba(16,17,20,.05);
  --f-ok: #1A7A4C;
}
[data-tema="black"] :is(.vv, .ix-raiz, .ac) {
  --f-ring: #8AB4F8; --f-off: #3B4252; --f-off-ln: #4B5468;
  --f-knob-sh: 0 1px 3px rgba(0,0,0,.55);
  --f-sheen: none;
  --f-lift: 0 6px 16px -8px rgba(0,0,0,.8);
  --f-ind-bg: #2A3040; --f-ind-sh: 0 1px 2px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 0 1px rgba(255,255,255,.05);
  --f-ok: #4ADE80;
}

/* ═════ 1 · INTERRUPTORES · pista 48×26, pomo blanco 20, azul #1A73E8 en activo ═════ */
/* A · Notificaciones (.nt-sw__p, casilla real) */
.vv.i2 .nt-sw__p { width: 48px; height: 26px; background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln); }
.vv.i2 .nt-sw__p::after { top: 3px; left: 3px; width: 20px; height: 20px; background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv.i2 .nt-sw input:checked + .nt-sw__p { background: var(--f-on); box-shadow: none; }
.vv.i2 .nt-sw input:checked + .nt-sw__p::after { transform: translateX(22px); background: var(--f-knob); }
.vv.i2 .nt-sw input:focus-visible + .nt-sw__p { outline-color: var(--f-ring); }
.vv.i2 .nt-sw:active .nt-sw__p { transform: none; }
/* B · Zonas y tarifas (.zt-int: casilla real o botón role=switch; «Tarifa activa», «Permitir pago completo»…) */
.vv.i2 .zt .zt-int > input { width: 48px; height: 26px; margin-top: -13px; }
.vv.i2 .zt .zt-int > i { width: 48px; height: 26px; border-radius: 13px; background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln); }
.vv.i2 .zt .zt-int > i::after { left: 3px; top: 3px; width: 20px; height: 20px; background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv.i2 .zt .zt-int > input:checked + i, .vv.i2 .zt .zt-int[aria-checked="true"] > i { background: var(--f-on); box-shadow: none; }
.vv.i2 .zt .zt-int > input:checked + i::after, .vv.i2 .zt .zt-int[aria-checked="true"] > i::after { left: 3px; transform: translateX(22px); background: var(--f-knob); }
.vv.i2 .zt .zt-int > input:focus-visible + i { outline-color: var(--f-ring); }
.vv.i2 .zt .zt-int:focus-visible > i { outline: 2px solid var(--f-ring); outline-offset: 2px; }
/* C · Taquilla (.bt-sw, 46×28 ya proporcional: solo color y física) */
.vv.bt .bt-sw i { background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln); }
.vv.bt .bt-sw i::after { background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv.bt .bt-sw[aria-checked="true"] i { background: var(--f-on); box-shadow: none; }
.vv.bt .bt-sw:focus-visible i { outline: 2px solid var(--f-ring); outline-offset: 2px; }
/* D · .interr de la taquilla y de la ficha de evento (botón role=switch; activo = sin aria-checked="false") */
[data-ui="panel"] .ix-raiz [data-pantalla="taquilla"] .interr, .ix-raiz .eve .interr {
  width: 48px; min-width: 48px; height: 26px; min-height: 26px; border-radius: 13px; background: var(--f-on); box-shadow: none; }
[data-ui="panel"] .ix-raiz [data-pantalla="taquilla"] .interr[aria-checked="false"], .ix-raiz .eve .interr[aria-checked=false] { background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln); }
.ix-raiz [data-pantalla="taquilla"] .interr::after, .ix-raiz .eve .interr::after, [data-tema="black"] .ix-raiz .eve .interr[aria-checked="true"]::after, [data-tema="black"] .ix-raiz [data-pantalla="taquilla"] .interr[aria-checked="true"]::after, [data-tema="noche"] .eve .interr::after {
  top: 3px; left: 3px; width: 20px; height: 20px; background: var(--f-knob); box-shadow: var(--f-knob-sh); transform: translateX(22px); }
.ix-raiz [data-pantalla="taquilla"] .interr[aria-checked="false"]::after, .ix-raiz .eve .interr[aria-checked=false]::after, [data-tema="black"] .ix-raiz .eve .interr[aria-checked="false"]::after { left: 3px; transform: none; }
.ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr:focus-visible { outline: 2px solid var(--f-ring); outline-offset: 2px; }
/* E · interruptor de la barra de filtros («Comparar», .vv-pil--tog: 28×16 dentro de una píldora de 40 px, no se agranda) */
.vv a.vv-pil--tog i { background: var(--f-off); }
.vv a.vv-pil--tog i::after { background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv a.vv-pil--tog.on i { background: var(--f-on); }
/* F · plano de mesas (.plb-web) */
.plb-herr .plb-web i { background: var(--f-off); }
.plb-herr .plb-web i::after { background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.plb-herr .plb-web[aria-checked="true"] i { background: var(--f-on); }

/* ═════ 2 · BOTONES PRINCIPALES · pastilla suave, brillo, elevación en hover, compresión .97, envío en curso ═════
   Primarios: .vv-b.n, .tq-btn sin contorno, .tl-btn, .nc-btn-pri y .ac-b (Enviar solicitud). Los iconos cuadrados (.ico, solo svg) no se redondean. */
:is(.vv-b.n, .tq-btn:not(.tq-btn--contorno):not(.tq-btn--peligro), .tl-btn:not(.tl-btn--2):not(.tl-btn--mal), .nc-btn-pri):not(.ico):not(:has(> svg:only-child)) {
  border-radius: 999px; background-image: var(--f-sheen); }
.ac .ac-b:not(.ac-b--txt):not(.ac-b--sec) { border-radius: 999px; background-image: var(--f-sheen); }
.ac .ac-b--sec { border-radius: 999px; }
:is(.vv-b.n, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b):not(.ico):not(:has(> svg:only-child)):not(:disabled):not([aria-disabled="true"]):active { transform: scale(.97); }
:is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b):focus-visible { outline: 2px solid var(--f-ring); outline-offset: 2px; }

/* envío en curso (fisica-cliente.tsx pone data-ocupado/aria-busy en el botón que envía; no lo deshabilita): la flecha entra y se desliza */
:is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)[data-ocupado]::after { content: "\2192"; display: inline-block; font-weight: 700; }

/* ═════ 3 · SEGMENTADOS Y PÍLDORAS ═════ */
/* indicador deslizante (CSS + variables --f-x/--f-y/--f-w/--f-h que mide fisica-cliente.tsx): solo en los de estado de cliente y 2-4 opciones */
/* position con :where (especificidad mínima): en el móvil las pestañas de Hoy son sticky (i2-r7-metricas.css) y un «relative» más fuerte
   les quitaba lo fijo y las bajaba 62 px encima de la tarjeta de Ventas. Sticky ya sirve de ancla al indicador. */
:where(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind] { position: relative; }
:is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind] { isolation: isolate; }
:is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind]::before { content: ""; position: absolute; z-index: 0; left: 0; top: 0; width: var(--f-w); height: var(--f-h);
  transform: translate(var(--f-x), var(--f-y)); border-radius: 8px; background: var(--f-ind-bg); box-shadow: var(--f-ind-sh); pointer-events: none; }
:is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind] > * { position: relative; z-index: 1; }
.dsh-pest__tabs[data-f-ind] > button[aria-selected=true], .gr .gr-seg[data-f-ind] > button[aria-pressed="true"], .vv.i2 .zt .zt-seg[data-f-ind] > label.on { background: none; box-shadow: none; }
/* resto de píldoras y segmentados (enlaces: la página se recarga, no hay desplazamiento posible): misma curva y sombra interior en el activo */
.vv .vv-seg a[aria-current], .vv.i2.mz .mz-chips a[aria-current], .vv.i2.rs .rs-seg a[aria-current] { box-shadow: var(--f-ind-sh); }
.vv.i2.bt-ls .tl-seg label:has(input:checked) { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 2px rgba(16,17,20,.2); }

/* ═════ 4 · KPI: pares cortos sin partir ═════ */
.vv.i2 :is(.i2-kv dd, .i2-cifra small, .i2-sec__n, .dsh-apoyo) { white-space: nowrap; }

/* ═════ MOVIMIENTO (solo con preferencia normal) ═════ */
@media (prefers-reduced-motion: no-preference) {
  /* interruptores: pomo con rebote spring, pista en 200 ms, estiramiento del pomo al pulsar */
  .vv.i2 .nt-sw__p { transition: background-color 200ms var(--f-out), box-shadow 200ms var(--f-out); }
  .vv.i2 .nt-sw__p::after { transition: transform 360ms var(--f-spring), width 180ms var(--f-out), background-color 200ms var(--f-out); }
  .vv.i2 .nt-sw:not(.fijo):active .nt-sw__p::after { width: 25px; }
  .vv.i2 .nt-sw:not(.fijo):active input:checked + .nt-sw__p::after { width: 25px; transform: translateX(17px); }

  .vv.i2 .zt .zt-int > i { transition: background-color 200ms var(--f-out), box-shadow 200ms var(--f-out); }
  .vv.i2 .zt .zt-int > i::after { transition: transform 360ms var(--f-spring), width 180ms var(--f-out), background-color 200ms var(--f-out); }
  .vv.i2 .zt .zt-int:not(:disabled):active > i::after { width: 25px; }
  .vv.i2 .zt .zt-int:active > input:checked + i::after, .vv.i2 .zt .zt-int[aria-checked="true"]:active > i::after { width: 25px; transform: translateX(17px); }

  .vv.bt .bt-sw i { transition: background-color 200ms var(--f-out), box-shadow 200ms var(--f-out); }
  .vv.bt .bt-sw i::after { transition: transform 360ms var(--f-spring), width 180ms var(--f-out); }
  .vv.bt .bt-sw:not(:disabled):active i::after { width: 28px; }
  .vv.bt .bt-sw[aria-checked="true"]:not(:disabled):active i::after { width: 28px; transform: translateX(12px); }

  .ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr { transition: background-color 200ms var(--f-out); }
  .ix-raiz [data-pantalla="taquilla"] .interr::after, .ix-raiz .eve .interr::after { transition: transform 360ms var(--f-spring), width 180ms var(--f-out); }
  .ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr:active::after { width: 25px; }
  .ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr:not([aria-checked="false"]):active::after { width: 25px; transform: translateX(17px); }

  .vv a.vv-pil--tog i { transition: background-color 200ms var(--f-out); }
  .vv a.vv-pil--tog i::after { transition: transform 360ms var(--f-spring), width 180ms var(--f-out); }
  .vv a.vv-pil--tog:active i::after { width: 16px; }
  .vv a.vv-pil--tog.on:active i::after { width: 16px; transform: translateX(8px); }
  .plb-herr .plb-web i { transition: background-color 200ms var(--f-out); }
  .plb-herr .plb-web i::after { transition: left 360ms var(--f-spring), width 180ms var(--f-out); }
  .plb-herr .plb-web:active i::after { width: 18px; }
  .plb-herr .plb-web[aria-checked="true"]:active i::after { width: 18px; left: 13px; }

  /* botones: elevación mínima solo con puntero que pasa por encima; compresión al pulsar; envío en curso */
  :is(.vv-b.n, .tq-btn:not(.tq-btn--contorno), .tl-btn, .nc-btn-pri, .ac-b):not(.ico) { transition: transform 160ms var(--f-out), box-shadow 200ms var(--f-out), background-color 150ms ease, opacity 150ms ease, border-color 150ms ease; }
  :is(.vv-b.n, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b):not(.ico):not(:has(> svg:only-child)):not(:disabled):not([aria-disabled="true"]):active { transition-duration: 90ms; }
  @media (hover: hover) {
    :is(.vv-b.n, .tq-btn:not(.tq-btn--contorno), .tl-btn:not(.tl-btn--2), .nc-btn-pri, .ac-b:not(.ac-b--txt)):not(.ico):not(:has(> svg:only-child)):not(:disabled):not([aria-disabled="true"]):hover { transform: translateY(-1px); box-shadow: var(--f-lift); }
    :is(.vv-b.n, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b):not(.ico):not(:has(> svg:only-child)):not(:disabled):not([aria-disabled="true"]):active { transform: scale(.97); }
  }
  :is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)[data-ocupado]::after { animation: f-flecha 900ms var(--f-out) infinite; }
  @keyframes f-flecha { 0% { transform: translateX(-6px); opacity: 0; } 35% { opacity: 1; } 100% { transform: translateX(3px); opacity: 1; } }

  /* segmentados: el indicador se desliza con rebote; las demás píldoras cambian de fondo con la misma curva */
  :is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-lista]::before { transition: transform 280ms var(--f-seg), width 280ms var(--f-seg), height 280ms var(--f-seg); }
  .dsh-pest__tabs button, .gr .gr-seg button, .vv.i2 .zt .zt-seg > label { transition: color 200ms var(--f-out), font-weight 200ms var(--f-out); }
  .vv .vv-seg a, .vv.i2.mz .mz-chips a, .vv.i2.rs .rs-seg a, .vv.i2.bt-ls .tl-seg label { transition: background-color 280ms var(--f-seg), color 200ms var(--f-out), border-color 200ms var(--f-out), box-shadow 280ms var(--f-seg), transform 160ms var(--f-out); }
}

/* ═════ reduce: estados finales, sin transiciones ni animaciones en estos controles ═════ */
@media (prefers-reduced-motion: reduce) {
  :is(.nt-sw__p, .zt-int > i, .bt-sw i, .interr, .vv-pil--tog i, .plb-web i, .vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b, .dsh-pest__tabs button, .gr-seg button, .zt-seg > label, .vv-seg a, .mz-chips a, .rs-seg a, .tl-seg label),
  :is(.nt-sw__p, .zt-int > i, .bt-sw i, .interr, .vv-pil--tog i, .plb-web i, .dsh-pest__tabs, .gr-seg, .zt-seg, .vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)::before,
  :is(.nt-sw__p, .zt-int > i, .bt-sw i, .interr, .vv-pil--tog i, .plb-web i, .vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)::after { transition: none !important; animation: none !important; }
  :is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b):active { transform: none; }
}
/* 18-nov: el pie de la tabla comparativa es una frase larga: no entra en el «nowrap» de las cifras (desbordaba 1.900 px a 390 en Informes del evento) */
.vv.i2 .dsh-tabla-caja > p.dsh-apoyo { white-space: normal; }
