/* Forest Audio Player Styles */

.forest-audio-control {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 800;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Audio Toggle Button */
.audio-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(183, 228, 199, 0.2);
}

.audio-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.4);
    background: linear-gradient(135deg, #2D6A4F 0%, #1B4332 100%);
}

.audio-toggle-btn:active {
    transform: translateY(0);
}

.audio-toggle-btn.playing {
    background: linear-gradient(135deg, #52B788 0%, #40916C 100%);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(82, 183, 136, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(82, 183, 136, 0.6);
    }
}

.audio-icon {
    font-size: 20px;
    display: inline-block;
    animation: none;
}

.audio-toggle-btn.playing .audio-icon {
    animation: sound-wave 1.5s ease-in-out infinite;
}

@keyframes sound-wave {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.audio-text {
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(27, 67, 50, 0.95);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(183, 228, 199, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.forest-audio-control:hover .volume-control {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.volume-icon {
    font-size: 16px;
}

/* Volume Slider */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    transition: background 0.3s ease;
}

.volume-slider:hover {
    background: rgba(255, 255, 255, 0.3);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #B7E4C7;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #52B788;
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(82, 183, 136, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #B7E4C7;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb:hover {
    background: #52B788;
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(82, 183, 136, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .forest-audio-control {
        bottom: 90px;
        right: 20px;
    }

    .audio-toggle-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .audio-icon {
        font-size: 18px;
    }

    .audio-text {
        display: none;
    }

    .audio-toggle-btn {
        border-radius: 50%;
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
    }

    .volume-control {
        position: absolute;
        bottom: 60px;
        right: 0;
        flex-direction: column;
        padding: 15px 10px;
    }

    .volume-slider {
        width: 80px;
        transform: rotate(-90deg);
    }

    .volume-icon {
        font-size: 14px;
    }
}

/* Accessibility */
.audio-toggle-btn:focus {
    outline: 2px solid #B7E4C7;
    outline-offset: 2px;
}

.volume-slider:focus {
    outline: 2px solid #B7E4C7;
    outline-offset: 2px;
}

/* Alternative compact style */
.forest-audio-control.compact {
    bottom: 80px;
    right: 20px;
}

.forest-audio-control.compact .audio-toggle-btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0;
    justify-content: center;
}

.forest-audio-control.compact .audio-text {
    display: none;
}

/* Tooltip for mobile */
.audio-toggle-btn::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: rgba(27, 67, 50, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.audio-toggle-btn:hover::after {
    opacity: 0;
}

@media (max-width: 768px) {
    .audio-toggle-btn::after {
        display: none;
    }
}
