/* ════════════════════════════════════════════════════════════════
   ALYX — VOICE TYPE SELECTOR (CSS)
   ────────────────────────────────────────────────────────────────
   Pill toggle de 3 segmentos. Diseño:
     · Contenedor único redondeado (no 3 botones sueltos).
     · Active state usa el accent purple del proyecto.
     · Hover sutil — el selector debe sentirse ambient, no agresivo.
     · Cuando vocal-mode = instrumental, se atenúa al 35% (preserva
       la selección visualmente, pero la deja claro que no aplica).
   ════════════════════════════════════════════════════════════════ */

.vtype-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  height: 26px;
  transition: opacity .2s ease, filter .2s ease;
}

.vtype-group.is-dimmed {
  opacity: .35;
  filter: saturate(.4);
}

.vtype-seg {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0 10px;
  height: 22px;
  border-radius: 999px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .3px;
  color: rgba(220, 215, 230, .58);
  transition:
    background .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .12s ease;
  user-select: none;
  white-space: nowrap;
}

.vtype-seg:hover:not(.is-active) {
  color: rgba(232, 224, 248, .85);
  background: rgba(255, 255, 255, .04);
}

.vtype-seg:active:not(.is-active) {
  transform: scale(.97);
}

.vtype-seg.is-active {
  background: linear-gradient(180deg,
    rgba(167, 139, 250, .20),
    rgba(139, 92, 246, .12));
  color: rgba(238, 232, 255, .98);
  /* Sin ring duro: la selección se percibe "teñida con intención",
     no marcada como un radio button. Un inner glow muy suave es
     suficiente para diferenciar. */
  box-shadow: inset 0 0 8px rgba(167, 139, 250, .14);
}

/* Active focus ring para accesibilidad de teclado, sin chocar
   con el active gradient */
.vtype-seg:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(167, 139, 250, .65),
    inset 0 0 8px rgba(167, 139, 250, .14);
}

/* La separación entre el botón de vocal-mode y el voice-type
   se reduce ligeramente: están conceptualmente relacionados. */
#vocalModeGroup + .hsep + #voiceTypeGroup {
  margin-left: 2px;
}

/* En el caso de que el .hsep sea injected después de vmode pero
   antes que llegue voice-type, suavizamos su altura visual. */
.vtype-group + .hsep {
  opacity: .6;
}

/* Light theme parity — si el usuario está en modo claro, los
   tokens de color del topbar cambian de luminosidad. */
[data-theme="light"] .vtype-group {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .10);
}
[data-theme="light"] .vtype-seg {
  color: rgba(40, 30, 60, .58);
}
[data-theme="light"] .vtype-seg:hover:not(.is-active) {
  color: rgba(40, 30, 60, .85);
  background: rgba(0, 0, 0, .05);
}
[data-theme="light"] .vtype-seg.is-active {
  background: linear-gradient(180deg,
    rgba(139, 92, 246, .16),
    rgba(109, 63, 223, .10));
  color: rgba(30, 15, 60, .95);
  box-shadow: inset 0 0 8px rgba(139, 92, 246, .10);
}
