/* Selector en hoja (src/indrox/selector.tsx) · UNA sola hoja para el panel y la cara pública (18-nov-2026).
   Se carga en el layout raíz: el selector se usa en el panel (.vv), en la compra pública (.tq: Género, formularios) y en la página de
   entradas, y su hoja se monta con createPortal en <body>, FUERA de .vv y de .tq. Antes estas reglas vivían en vistas-v2.css, que solo
   carga el panel: en /e/… el botón, el campo oculto y la hoja salían sin estilo (franja blanca al final de la página).
   Colores: el botón toma los tokens de donde esté (--vv-* en el panel; --sf/--ink/--line2 en la cara pública). La hoja no hereda nada
   (cuelga de <body>): por defecto usa los --mk-* del panel (Claro y Black) y, en la cara pública, selector.tsx le pasa en línea los
   colores ya resueltos del botón que la abre. */
.vv-sr { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; overflow: hidden; opacity: 0; pointer-events: none; }

.vv-selector, .vv .vv-selector, .tq .vv-selector { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 44px !important; padding: 0 12px; margin: 0;
  border: 1px solid var(--vv-ln2, var(--line2, #DEDEE2)); border-radius: 8px; background: var(--vv-bg, var(--sf, #fff)); color: var(--vv-fg, var(--ink, #1B1C1F));
  font: 400 15px var(--vv-f, inherit); cursor: pointer; text-align: left; -webkit-appearance: none; appearance: none; }
.vv-selector:hover, .vv .vv-selector:hover, .tq .vv-selector:hover { background: var(--vv-hover, var(--sunk, #F0F0F2)); }
.vv-selector:disabled, .vv .vv-selector:disabled, .tq .vv-selector:disabled { opacity: .55; cursor: not-allowed; background: var(--vv-sub, var(--sunk, #F4F4F5)); }
.vv-selector:focus-visible, .tq .vv-selector:focus-visible { outline: 2px solid var(--vv-focus, var(--ink, #3B6EF6)); outline-offset: 2px; }
.vv-selector[aria-invalid="true"], .tq .vv-selector[aria-invalid="true"] { border-color: var(--bad, #CC2E1E); }
.vv-selector__tx, .vv .vv-selector__tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-selector__chev, .vv .vv-selector__chev { flex: none; color: var(--vv-fg2, var(--mut, #5D5E66)); }
.vv .vv-selector--corto { width: 88px; flex: none; }
/* cara pública: la misma talla que sus campos (.tq-in) */
/* cara pública: gana a «.tq button» (que quita borde y fondo) y toma la talla de sus campos (.tq-in) */
.tq .vv-selector { min-height: 48px !important; border-radius: var(--r, 10px); font-size: 16px; }

/* velo y hoja del selector: por encima de todo lo demás de la página (cabeceras fijas, barra de pago, dock) */
.vv-velo--sel { position: fixed; inset: 0; z-index: 9998; background: rgba(9,10,13,.58); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.vv-hoja {
  --vv-bg: var(--mk-bg, #fff); --vv-sub: var(--mk-subtle, #F4F4F5); --vv-hover: var(--mk-hover, #F0F0F2); --vv-sel: var(--mk-sel, #EBEBEE);
  --vv-ln: var(--mk-line, #EBEBED); --vv-ln2: var(--mk-line2, #DEDEE2); --vv-fg: var(--mk-fg, #1B1C1F); --vv-fg2: var(--mk-fg2, #5D5E66); --vv-fg3: var(--mk-fg3, #686A73);
  --vv-ink: var(--mk-ink, #1B1C1F); --vv-on-ink: var(--mk-on-ink, #fff); --vv-focus: var(--mk-focus, #3B6EF6); --vv-f: var(--mk-f, "Inter", ui-sans-serif, system-ui, sans-serif);
  box-sizing: border-box; color: var(--vv-fg); font-family: var(--vv-f); font-size: 14px; line-height: 1.4;
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 9999; width: 100%; max-width: 448px;
  max-height: min(60dvh, 420px); display: flex; flex-direction: column; background: var(--vv-bg); border: 1px solid var(--vv-ln2);
  border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: var(--mk-sh-pop, 0 16px 48px rgba(16,17,20,.14));
  animation: vv-hoja-sube .24s cubic-bezier(.32,.72,0,1);
}
.vv-hoja *, .vv-hoja *::before, .vv-hoja *::after { box-sizing: border-box; }
@keyframes vv-hoja-sube { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.vv-hoja__cab { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px 14px; }
.vv-hoja__t { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.vv-hoja__busca { margin: 4px 8px 6px; }
.vv-hoja .vv-in { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--vv-ln2); border-radius: 8px; background: var(--vv-bg); color: var(--vv-fg); font: 400 15px var(--vv-f); }
.vv-hoja .vv-in:focus { outline: 2px solid var(--vv-focus); outline-offset: -1px; border-color: transparent; }
.vv-hoja .vv-hoja__busca .vv-in { -webkit-appearance: none; appearance: none; font-size: 16px !important; }
.vv-hoja .vv-hoja__busca .vv-in:focus { outline: 1px solid var(--vv-ln2); border-color: transparent; }
.vv-hoja__cuerpo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px calc(12px + env(safe-area-inset-bottom)); }
.vv-hoja .vv-fila { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin: 0; padding: 12px 14px; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.vv-hoja .vv-fila:hover { background: var(--vv-hover); }
.vv-hoja .vv-fila:focus-visible { outline: 2px solid var(--vv-focus); outline-offset: -2px; }
.vv-hoja .vv-fila:disabled { opacity: .45; cursor: not-allowed; }
.vv-hoja .vv-fila--sel { background: var(--vv-sel); }
.vv-hoja .vv-fila__tx { flex: 1; min-width: 0; }
.vv-hoja .vv-fila__t { display: block; font-size: 15px; line-height: 20px; font-weight: 500; overflow-wrap: anywhere; }
.vv-hoja .vv-fila__chk { flex: none; color: var(--vv-ink); font-weight: 700; }
.vv-hoja .vv-vacio { margin: 0; padding: 16px 14px; color: var(--vv-fg2); font-size: 13px; }
.vv-hoja .vv-cerrar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--vv-fg2); cursor: pointer; font: inherit; font-size: 22px; line-height: 1; }
.vv-hoja .vv-cerrar:hover { background: var(--vv-sub); color: var(--vv-fg); }
.vv-hoja .vv-cerrar:focus-visible { outline: 2px solid var(--vv-focus); outline-offset: -2px; }
@media (max-width: 899px), (pointer: coarse) { .vv-hoja :is(input, .vv-selector) { font-size: 16px !important; } }
@media (min-width: 900px) {
  .vv-hoja { bottom: auto; top: 50%; transform: translate(-50%, -50%); max-height: min(70vh, 420px); border-radius: 14px; border-bottom: 1px solid var(--vv-ln2); animation: vv-hoja-entra .16s cubic-bezier(.23,1,.32,1); }
  @keyframes vv-hoja-entra { from { opacity: 0; transform: translate(-50%, -50%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
}
@media (prefers-reduced-motion: reduce) { .vv-hoja { animation: none; } }
