/* Decoración de estados: no se analiza ni se visualiza el audio del usuario. */
.voice-fx-visual {
  --fx-color: #67ddb5;
  position: relative;
  min-height: 224px;
  height: 224px;
  margin: 18px auto 0;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at center, #32c58c12, transparent 65%);
}
.fx-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 87px;
  height: 87px;
  border: 1px solid #51bd9877;
  border-radius: 50%;
  background: linear-gradient(140deg, #173b30, #0c201c);
  color: var(--fx-color);
  box-shadow: inset 0 0 22px #4dd6a215, 0 0 30px #3fc99416;
  transition: color .25s, border-color .25s, box-shadow .25s;
}
.fx-core .ui-icon { width: 37px; height: 37px; }
.fx-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 127px;
  height: 127px;
  margin: -63.5px;
  border: 1px solid #59d3aa40;
  border-radius: 50%;
  pointer-events: none;
  opacity: .7;
}
.orbit-two { width: 163px; height: 163px; margin: -81.5px; border-style: dashed; opacity: .4; }
.orbit-three { width: 193px; height: 193px; margin: -96.5px; border-color: #45977722; opacity: .5; }
.orbit-one::after {
  content: '';
  position: absolute;
  top: -3px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fx-color);
  box-shadow: 0 0 10px var(--fx-color);
}
.fx-spectrum {
  position: absolute;
  z-index: 3;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  color: var(--fx-color);
}
.fx-spectrum i { display: block; width: 4px; height: 5px; border-radius: 2px; background: currentColor; opacity: .45; }
.voice-fx-state { margin: 12px 19px 0; text-align: center; font: 600 11px var(--mono); letter-spacing: .13em; color: #9edec4; line-height: 1.5; }
.voice-fx-note { margin: 5px 19px 19px; text-align: center; color: #93aaa4; font: 10px var(--sans); }
.voice-effect-controls {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 18px 19px 22px;
  padding: 15px;
  border: 1px solid #32514a;
  border-radius: 10px;
  background: #0a1815;
}
.voice-effect-controls button {
  min-height: 43px;
  padding: 9px 12px;
  border: 1px solid #447761;
  border-radius: 7px;
  color: #bcf0d7;
  background: #173a2c;
  font: 500 11px var(--sans);
  cursor: pointer;
}
.voice-effect-controls button[aria-pressed='false'] { background: #142028; color: #a3b7be; border-color: #43545c; }
.voice-effect-controls button:hover:not(:disabled) { border-color: #82d4b0; background: #20553e; }
.voice-effect-controls button:disabled { opacity: .6; cursor: default; }
.voice-effect-controls label { display: grid; gap: 10px; color: #b2c8bf; font: 11px var(--sans); min-width: 0; }
.voice-effect-controls input { width: 100%; margin: 0; accent-color: #67ddb5; cursor: pointer; }
.voice-effect-controls p { grid-column: 1 / -1; font: 10px var(--sans); line-height: 1.6; color: #9db5aa; margin: 0; }
.voice-effect-controls input:focus-visible { outline: 2px solid #9fefcc; outline-offset: 6px; }
/* Una llamada entrante respira; la conexión orbital comienza al abrir el enlace. */
[data-voice-state='incoming'] .fx-core { animation: fxInvitation 1.8s ease-in-out infinite; }
[data-voice-state='incoming'] .orbit-one, [data-voice-state='connecting'] .orbit-one { animation: fxOrbit 4s linear infinite; }
[data-voice-state='connecting'] .orbit-two { animation: fxOrbit 7s linear infinite reverse; }
[data-voice-state='connected'] .orbit-one { animation: fxOrbit 8s linear infinite; }
[data-voice-state='connected'] .fx-core { box-shadow: inset 0 0 25px #4dd6a230, 0 0 42px #55d5ac30; }
[data-voice-state='connected'] .fx-spectrum i { opacity: .8; animation: fxBars 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--bar) * -.16s); }
/* Escucha azul: el micrófono sigue sin activarse automáticamente. */
#walkie-view .voice-fx-visual { --fx-color: #84dadd; background: radial-gradient(ellipse at center, #4fbabc14, transparent 65%); }
#walkie-view .fx-core { border-radius: 23px; border-color: #60babb65; background: linear-gradient(140deg, #153636, #102226); }
[data-voice-state='listening'] .orbit-one { animation: fxOrbit 12s linear infinite; }
[data-voice-state='listening'] .fx-core { box-shadow: inset 0 0 20px #72dbce12, 0 0 25px #5ac8c520; }
[data-voice-state='transmitting'] .voice-fx-visual { --fx-color: #ffd185; background: radial-gradient(ellipse at center, #e799341c, transparent 65%); }
[data-voice-state='transmitting'] .fx-core { color: #ffd185; border-color: #d9a34c; background: linear-gradient(145deg, #533512, #2c2113); box-shadow: 0 0 38px #d8953933; }
[data-voice-state='transmitting'] .fx-orbit { border-color: #dea94970; animation: fxTransmit 1.5s ease-out infinite; }
[data-voice-state='transmitting'] .orbit-two { animation-delay: -.5s; }
[data-voice-state='transmitting'] .orbit-three { animation-delay: -1s; }
[data-voice-state='transmitting'] .fx-spectrum i { opacity: 1; animation: fxBars .45s ease-in-out infinite alternate; animation-delay: calc(var(--bar) * -.09s); }
[data-voice-state='transmitting'] .voice-fx-state { color: #ffd18c; }
.voice-invite { box-shadow: inset 3px 0 #6cddaf; }
@keyframes fxOrbit { to { transform: rotate(360deg); } }
@keyframes fxInvitation { 0%,100% { box-shadow: 0 0 20px #59d5a525; } 50% { box-shadow: 0 0 45px #59d5a545; } }
@keyframes fxTransmit { 0% { transform: scale(.86); opacity: .7; } 100% { transform: scale(1.16); opacity: .1; } }
@keyframes fxBars { from { transform: scaleY(.4); height: 15px; } to { transform: scaleY(1); height: 26px; } }
.effects-paused .fx-orbit, .effects-paused .fx-core, .effects-paused .fx-spectrum i { animation-play-state: paused !important; }
@media (max-width: 580px) {
  .voice-effect-controls { grid-template-columns: 1fr 1fr; margin-left: 16px; margin-right: 16px; gap: 15px; }
  .voice-effect-controls label { grid-column: 1 / -1; grid-row: 2; }
  .voice-fx-visual { height: 215px; min-height: 215px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-orbit, .fx-core, .fx-spectrum i { animation: none !important; transition: none !important; }
  .voice-room-view { animation: none; }
}
