/* ==========================================================================
   WEBPOT SPATIAL SOUND CONTROLLER
   Animated equalizer toggle + modern glassmorphism pill design
   ========================================================================== */

/* ---- Sound Toggle Button (Floating Pill) ---- */
.sound-toggle-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(17, 17, 17, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
}

.sound-toggle-btn:hover {
    background: #111111;
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.25), 0 0 20px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px) scale(1.03);
}

.sound-toggle-btn.is-active {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(17, 17, 17, 0.95);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---- Equalizer Bars ---- */
.sound-eq-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}

.sound-eq-bar {
    width: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease, height 0.2s ease;
}

.sound-eq-bar:nth-child(1) { height: 5px; }
.sound-eq-bar:nth-child(2) { height: 9px; }
.sound-eq-bar:nth-child(3) { height: 4px; }

/* Active State: Animated bouncing bars with neon gradient */
.sound-toggle-btn.is-active .sound-eq-bar {
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
    animation: eqBounce 0.8s ease-in-out infinite alternate;
}

.sound-toggle-btn.is-active .sound-eq-bar:nth-child(1) {
    animation-delay: 0s;
}
.sound-toggle-btn.is-active .sound-eq-bar:nth-child(2) {
    animation-delay: 0.2s;
}
.sound-toggle-btn.is-active .sound-eq-bar:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes eqBounce {
    0% { height: 3px; }
    100% { height: 14px; }
}

/* ---- Label ---- */
.sound-toggle-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.sound-toggle-btn.is-active .sound-toggle-label {
    color: #38bdf8;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .sound-toggle-btn.is-active .sound-eq-bar {
        animation: none;
    }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sound-toggle-btn {
        bottom: 18px;
        right: 18px;
        padding: 8px 14px;
    }
    .sound-toggle-label {
        display: none;
    }
}
