/* ================================================================
   SYNTH AUDIO — botón de música del tema Synthwave
   ----------------------------------------------------------------
   Lo monta/desmonta js/synth-audio.js solo mientras body.theme-synthwave
   está activo, así que estos estilos no necesitan el prefijo de tema:
   si existen en el DOM, siempre están dentro de synthwave.
   ================================================================ */

.synth-audio-widget {
  position: relative;
  flex-shrink: 0;
  z-index: 930;
}

.synth-audio-widget.is-floating {
  position: fixed;
  z-index: 930;
}

.synth-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.30);
  background: rgba(16, 6, 32, 0.82);
  color: #f5e9ff;
  cursor: pointer;
  font-size: 1.05rem;
  box-shadow: 0 0 0 1px rgba(217, 70, 239, 0.12) inset;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.15s ease;
}

.synth-audio-btn:hover {
  border-color: rgba(217, 70, 239, 0.55);
  transform: translateY(-2px);
}

.synth-audio-btn:focus-visible {
  outline: 2px solid #00e5ff;
  outline-offset: 3px;
}

/* Sonando: un halo que respira al ritmo real de la pista, alimentado
   por --synth-beat (js/synth-audio.js, vía Web Audio API). Con la
   música pausada la variable se queda en 0 y el halo desaparece solo. */
.synth-audio-btn.is-playing {
  border-color: rgba(0, 229, 255, calc(0.6 + var(--synth-beat, 0) * 0.4));
  box-shadow:
    0 0 calc(10px + var(--synth-beat, 0) * 26px) rgba(217, 70, 239, calc(0.35 + var(--synth-beat, 0) * 0.45)),
    0 0 calc(4px + var(--synth-beat, 0) * 14px) rgba(0, 229, 255, calc(0.25 + var(--synth-beat, 0) * 0.35));
}

.synth-audio-icon { line-height: 1; }

.synth-audio-dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 13rem;
  padding: 0.85rem 0.9rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: rgba(10, 2, 22, 0.97);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 30px rgba(217, 70, 239, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.synth-audio-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.synth-audio-play {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(135deg, #00e5ff 0%, #7c3aed 35%, #d946ef 65%, #ff8a3d 100%);
  color: #12001f;
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.synth-audio-play:hover { filter: brightness(1.08); }

.synth-audio-vol-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #d9b8ff;
}

.synth-audio-vol {
  width: 100%;
  accent-color: #d946ef;
  cursor: pointer;
}

@media (max-width: 640px) {
  .synth-audio-widget.is-floating { top: auto !important; bottom: 1rem; }
}
