/* ============================================================
   assets/css/audio-player.css - Dengarkan Berita
   ============================================================ */

/* ===== AUDIO PLAYER WRAPPER ===== */
.audio-player-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
    flex-wrap: wrap;
}

/* ===== TOMBOL DENGARKAN ===== */
.btn-audio {
    background: #1B5E20;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-audio:hover {
    background: #2E7D32;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
    color: #fff;
}

.btn-audio:active {
    transform: scale(0.95);
}

.btn-audio .audio-status {
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.8;
}

.btn-audio.playing {
    background: #DC2626;
    animation: pulseAudio 1.5s ease-in-out infinite;
}

.btn-audio.playing:hover {
    background: #B91C1C;
}

@keyframes pulseAudio {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

/* ===== AUDIO CONTROLS ===== */
.audio-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.audio-controls .btn {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #334155;
    transition: all 0.3s ease;
}

.audio-controls .btn:hover {
    background: #E2E8F0;
}

.audio-controls .btn-outline-secondary {
    background: transparent;
}

body.dark-mode .audio-controls .btn {
    background: #1E293B;
    border-color: #334155;
    color: #CBD5E1;
}

body.dark-mode .audio-controls .btn:hover {
    background: #334155;
}

/* ===== AUDIO SPEED ===== */
.audio-speed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.audio-speed label {
    margin: 0;
    font-size: 0.65rem;
    color: #64748B;
    font-weight: 500;
}

.audio-speed select {
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #E2E8F0;
    font-size: 0.65rem;
    background: #fff;
    color: #334155;
    cursor: pointer;
    outline: none;
}

.audio-speed select:focus {
    border-color: #1B5E20;
}

body.dark-mode .audio-speed select {
    background: #1E293B;
    border-color: #334155;
    color: #CBD5E1;
}

/* ===== AUDIO TIMER ===== */
.audio-timer {
    font-size: 0.7rem;
    color: #64748B;
    font-family: monospace;
    min-width: 90px;
    font-weight: 500;
}

body.dark-mode .audio-timer {
    color: #94A3B8;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .audio-player-wrapper {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
    .btn-audio {
        font-size: 0.75rem;
        padding: 5px 14px;
    }
}

@media (max-width: 768px) {
    .audio-player-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .btn-audio {
        justify-content: center;
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    .audio-controls {
        justify-content: center;
    }
    .audio-speed select {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    .audio-timer {
        font-size: 0.6rem;
        min-width: 70px;
    }
}

@media (max-width: 576px) {
    .audio-player-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .btn-audio {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
    .audio-controls .btn {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    .audio-timer {
        font-size: 0.55rem;
        min-width: 60px;
    }
}