/* Audio Player Container */
.custom-audio-player {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 8px 12px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
}

/* Play/Pause Button */
.audio-control-btn {
    background: var(--primary-blue, #1877f2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.audio-control-btn:hover {
    background: var(--primary-blue-dark, #166fe5);
}

.audio-control-btn i {
    font-size: 14px;
    margin-left: 2px;
    /* Visual adjustment for play icon centering */
}

.audio-control-btn.playing i {
    margin-left: 0;
}

/* Progress Area */
.audio-progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

/* Waveform / Progress Bar */
.audio-progress-bar {
    width: 100%;
    height: 4px;
    background: #dcdcdc;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.audio-progress-fill {
    height: 100%;
    background: var(--primary-blue, #1877f2);
    border-radius: 2px;
    width: 0%;
    /* Dynamic */
    position: relative;
    pointer-events: none;
}

.audio-progress-handle {
    width: 10px;
    height: 10px;
    background: var(--primary-blue, #1877f2);
    border-radius: 50%;
    position: absolute;
    right: -5px;
    top: -3px;
    opacity: 0;
    transition: opacity 0.2s;
}

.audio-progress-bar:hover .audio-progress-handle {
    opacity: 1;
}

/* Time Display */
.audio-time {
    font-size: 11px;
    color: #65676b;
    font-family: monospace;
    display: flex;
    justify-content: space-between;
}

/* Loading State */
.audio-control-btn.loading {
    position: relative;
    pointer-events: none;
}

.audio-control-btn.loading i {
    display: none;
}

.audio-control-btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Speed Control Button */
.audio-speed-btn {
    background: #e4e6eb;
    border: none;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #050505;
    cursor: pointer;
    min-width: 32px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    user-select: none;
    margin-left: 5px;
}

.audio-speed-btn:hover {
    background: #d8dadf;
}

.audio-speed-btn.pulse {
    transform: scale(1.1);
    background: var(--primary-blue, #1877f2);
    color: white;
}
