/* AUDIO CONTROL POPUP STYLES */

/* Match .floating-nav style */
.floating-popup {
    position: fixed;
    bottom: 25px;
    bottom: calc(25px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) scale(0.9);

    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    padding: 10px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100001;
    /* Higher than nav */

    width: auto;
    max-width: 90%;
    white-space: nowrap;

    /* Animation */
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.floating-popup.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
    bottom: 25px !important;
    bottom: calc(25px + env(safe-area-inset-bottom)) !important;
}

/* Close Button Fix */
#audio-close-btn {
    background: transparent;
    border: none;
    color: var(--text-color, #333);
    font-size: 1.2rem;
    cursor: pointer;

    /* Critical for mobile: Prevent squashing */
    flex-shrink: 0;
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;

    /* Ensure no margins interfere */
    margin: 0;
    padding: 0;
}

#audio-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Mini Buttons inside control group */
.btn-mini {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--primary-color, #333);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-mini:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-popup {
        width: 85% !important;
        max-width: 85% !important;
        padding: 8px 12px;
        justify-content: space-between;
        gap: 10px;
        /* Reduce gap on mobile */
    }
}