/* GG Call — aba "Voz e vídeo": perfis de entrada, barra de sensibilidade com medidor ao vivo,
   linhas com controle à direita e configurações avançadas recolhíveis (carregado depois de ui-shell.css). */

/* perfis de entrada */
.voice-profiles { gap: 4px; margin-bottom: 8px; }
.voice-profiles .radio-card { padding: 12px; }

/* barra de sensibilidade: fundo amarelo (fechado) até o limiar e verde (aberto) depois dele;
   o nível ao vivo acende as duas cores e a alça marca o limiar. */
.sens-wrap { padding: 12px 0 4px; }
.sens-slider {
  --threshold: 50%; --handle: 0.5;
  position: relative; display: flex; align-items: center; height: 28px; padding: 0 5px; cursor: pointer; touch-action: none; outline: none;
}
.sens-track {
  position: relative; flex: 1; height: 10px; border-radius: 5px; overflow: hidden;
  background: linear-gradient(to right,
    color-mix(in srgb, var(--yellow) 26%, transparent) 0 var(--threshold),
    color-mix(in srgb, var(--green) 26%, transparent) var(--threshold) 100%);
}
.sens-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; }
.sens-fill.low { background: var(--yellow); }
.sens-fill.high { background: var(--green); }
.sens-handle {
  position: absolute; top: 50%; left: calc(5px + (100% - 10px) * var(--handle)); width: 10px; height: 28px; margin-left: -5px; border-radius: 3px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.45);
  transform: translateY(-50%); transition: transform 0.12s ease;
}
.sens-slider:hover .sens-handle, .sens-slider.dragging .sens-handle { transform: translateY(-50%) scale(1.12); }
.sens-slider:focus-visible .sens-handle { outline: 2px solid var(--link); outline-offset: 2px; }
.sens-slider.locked { cursor: default; }
.sens-slider.locked .sens-handle { display: none; }
.sens-slider.always-open .sens-handle { opacity: 0.6; }
.settings-pane .sens-status { margin: 4px 0 0; color: var(--yellow); }
[data-theme='light'] .settings-pane .sens-status { color: #8a6100; }
.sens-status:empty { display: none; }
.sens-wrap + .sens-status + .hint, .sens-wrap + .sens-status:empty + .hint { margin-top: 8px; }

/* linha com texto à esquerda e lista suspensa à direita (supressão de ruído) */
.voice-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--bg-active); }
.voice-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.voice-row-text strong { color: var(--text-strong); font-weight: 500; }
.voice-row-text small { color: var(--text-muted); font-size: 0.8125rem; }
.settings-pane .voice-row-status { color: var(--green); }
.settings-pane .voice-row-status.warn { color: var(--yellow); }
[data-theme='light'] .settings-pane .voice-row-status { color: #1f7a3f; }
[data-theme='light'] .settings-pane .voice-row-status.warn { color: #8a6100; }
.voice-row-status:empty { display: none; }
.voice-row > .select { flex: none; width: 260px; }

/* teste de microfone (ouvir a própria voz) */
.mic-test .hint { margin: 0; flex: 1; min-width: 0; }
.mic-test + h4 { margin-top: 24px; }

/* configurações avançadas recolhíveis */
.voice-advanced-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 4px 0; border-radius: 4px;
  color: var(--link); font-size: 0.875rem; font-weight: 500;
}
.voice-advanced-toggle:hover span { text-decoration: underline; }
.voice-advanced-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.voice-advanced-toggle .icon { transition: transform 0.18s ease; }
.voice-advanced-toggle[aria-expanded='true'] .icon { transform: rotate(180deg); }
.voice-advanced { margin-top: 8px; padding: 4px 16px 0; border-radius: 8px; background: var(--bg-sidebar); }
.voice-advanced .settings-gap { height: 12px; }

@media (max-width: 1000px) {
  .voice-row { flex-wrap: wrap; }
  .voice-row > .select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sens-handle, .voice-advanced-toggle .icon { transition: none; }
}
