/* ==========================================================================
   Floating Audio Player
   ========================================================================== */

.floating-audio {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 150;
}

/* Button base styles - pill shape with text */
.floating-audio__button {
    --scroll-scale: 1.07;
    height: 72px;
    padding: 0 32px 0 24px;
    border-radius: 36px;
    border: 1px solid var(--color-moss-green);
    background: var(--color-dark-green);
    color: var(--color-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition:
        opacity 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.15s ease,
        padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-radius 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    transform-origin: bottom left;
    transform: scale(var(--scroll-scale));
}

.floating-audio__button:hover {
    transform: scale(calc(var(--scroll-scale) * 1.03));
}

.floating-audio__button:active {
    transform: scale(calc(var(--scroll-scale) * 0.97));
}

/* Icon wrapper */
.floating-audio__icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* Icon styles */
.floating-audio__icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    transition: opacity 0.2s ease;
}

.floating-audio__icon--play {
    opacity: 1;
}

.floating-audio__icon--pause {
    opacity: 0;
}

/* Text label */
.floating-audio__text {
    font-family: 'Jura', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    display: inline-block;
    flex-shrink: 0;
    transition:
        opacity 0.3s ease,
        max-width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 200px;
    overflow: hidden;
}


/* ==========================================================================
   Playing State - orange glow, reduced opacity
   ========================================================================== */

.floating-audio__button--playing {
    opacity: 0.5;
    box-shadow:
        0 0 20px rgba(255, 136, 0, 0.5),
        0 0 40px rgba(255, 136, 0, 0.25),
        0 0 60px rgba(255, 136, 0, 0.15);
}

.floating-audio__button--playing .floating-audio__icon--play {
    opacity: 0;
}

.floating-audio__button--playing .floating-audio__icon--pause {
    opacity: 1;
}

/* ==========================================================================
   Paused State - full opacity, no glow
   ========================================================================== */

.floating-audio__button--paused {
    opacity: 1;
    box-shadow: none;
}

.floating-audio__button--paused .floating-audio__icon--play {
    opacity: 1;
}

.floating-audio__button--paused .floating-audio__icon--pause {
    opacity: 0;
}

/* ==========================================================================
   Pulsing Glow Animation - active in hero area when paused
   ========================================================================== */

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 12px rgba(241, 254, 224, 0.15),
                    0 0 24px rgba(241, 254, 224, 0.08);
    }
    50% {
        box-shadow: 0 0 18px rgba(241, 254, 224, 0.25),
                    0 0 36px rgba(241, 254, 224, 0.12);
    }
}

.floating-audio__button--pulsing {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .floating-audio {
        bottom: 24px;
        left: 24px;
    }

    .floating-audio__button {
        height: 56px;
        padding: 0 20px 0 16px;
        border-radius: 28px;
        gap: 10px;
    }

    .floating-audio__icon-wrapper {
        width: 24px;
        height: 24px;
    }

    .floating-audio__icon {
        width: 24px;
        height: 24px;
    }

    .floating-audio__text {
        font-size: 12px;
    }
}
