/* ============================================================================
   Baqqo · píldora segmentada con pulgar deslizante (1.11). Componente común: js/seg-thumb.js escribe --thumb-x/y/w/h.
   El indicador es el ::before del contenedor (sobrevive a innerHTML). Misma duración y curva que #side-thumb (barra móvil)
   y que la píldora del sommelier del comensal (.mode::before). prefers-reduced-motion: sin transición.
   Requiere los tokens de admin-bq2 / onboarding (--bq2-accent, --bq2-accent-ink). Sin JS el .on de cada botón sigue pintando.
   ============================================================================ */
.seg-thumb { position: relative; isolation: isolate; }
.seg-thumb::before {
  content: ""; position: absolute; z-index: 0; left: 0; top: 0; pointer-events: none;
  width: var(--thumb-w, 0px); height: var(--thumb-h, 0px);
  transform: translate(var(--thumb-x, 0px), var(--thumb-y, 0px));
  border-radius: var(--bq2-r-pill, 999px); background: var(--bq2-accent);
  transition: transform .32s cubic-bezier(.3, .7, .4, 1), width .32s cubic-bezier(.3, .7, .4, 1), height .32s cubic-bezier(.3, .7, .4, 1), opacity .15s ease;
}
/* El .seg de los diseñadores usa esquinas menos redondas: el pulgar las hereda */
.qd .seg-thumb::before { border-radius: calc(var(--bq2-r-m, 14px) - 4px); }
.seg-thumb--instant::before { transition: none !important; }
.seg-thumb--none::before { opacity: 0; }
/* Los botones van por encima del pulgar; el fondo del activo lo pone el pulgar (si el JS no corre, queda el fondo de .on) */
.seg-thumb > button, .seg-thumb > [role="radio"] { position: relative; z-index: 1; transition: color .25s ease; }
.seg-thumb > button.on, .seg-thumb > button[aria-pressed="true"], .seg-thumb > button[aria-checked="true"] { background: transparent; color: var(--bq2-accent-ink); }
.seg-thumb.seg-thumb--none > button.on { background: var(--bq2-accent); }
@media (prefers-reduced-motion: reduce) {
  .seg-thumb::before { transition: none; }
  .seg-thumb > button, .seg-thumb > [role="radio"] { transition: none; }
}
