/* ========== OCRR AUDIO PLAYER ========== */

#article-audio-player {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #0a0a0a;
    border: 1px solid rgba(255, 160, 40, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-family: 'IBM Plex Mono', monospace;
    transition: border-color 0.3s ease;
}

.audio-player:hover {
    border-color: rgba(255, 160, 40, 0.35);
}

/* Hidden state when no audio */
.audio-player.audio-player--hidden {
    display: none;
}

/* Disabled/loading state */
.audio-player.audio-player--loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Listen label ---- */
.audio-player__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    color: #737373;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.audio-player__label svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #737373;
    stroke-width: 1.5;
}

/* ---- Play / Pause ---- */
.audio-player__play {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #FFA028;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.audio-player__play:hover {
    background: #FFB147;
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(255, 160, 40, 0.3);
}

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

.audio-player__play svg {
    width: 18px;
    height: 18px;
    fill: #000;
    stroke: none;
}

/* ---- Rewind 15s ---- */
.audio-player__rewind {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #404040;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.audio-player__rewind:hover {
    border-color: #737373;
    background: rgba(255, 255, 255, 0.04);
}

.audio-player__rewind svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #a3a3a3;
    stroke-width: 1.5;
}

/* ---- Progress bar ---- */
.audio-player__progress-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.audio-player__scrub-tip {
    display: none;
    position: absolute;
    top: -28px;
    transform: translateX(-50%);
    background: #1a1a1a;
    border: 1px solid rgba(255,160,40,0.5);
    color: #FFA028;
    font-size: 11px;
    font-family: 'IBM Plex Mono', monospace;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.audio-player__progress {
    flex: 1;
    min-width: 0;
    height: 32px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.audio-player__track {
    width: 100%;
    height: 4px;
    background: #262626;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.audio-player__fill {
    height: 100%;
    background: #FFA028;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-player__progress:hover .audio-player__track {
    height: 6px;
}

/* ---- Time display ---- */
.audio-player__time {
    font-size: 11px;
    color: #737373;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* ---- Speed selector ---- */
.audio-player__speeds {
    display: flex;
    gap: 0.15rem;
    flex-shrink: 0;
}

.audio-player__speed-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #525252;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.35rem;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
    letter-spacing: 0;
}

.audio-player__speed-btn:hover {
    color: #a3a3a3;
    background: rgba(255, 255, 255, 0.04);
}

.audio-player__speed-btn.active {
    color: #FFA028;
    background: rgba(255, 160, 40, 0.1);
}

/* ========== MOBILE ========== */

@media (max-width: 768px) {
    #article-audio-player {
        padding: 1.25rem 1rem 0;
    }

    .audio-player {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }

    .audio-player__label {
        width: 100%;
        font-size: 10px;
    }

    .audio-player__progress-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.audio-player__scrub-tip {
    display: none;
    position: absolute;
    top: -28px;
    transform: translateX(-50%);
    background: #1a1a1a;
    border: 1px solid rgba(255,160,40,0.5);
    color: #FFA028;
    font-size: 11px;
    font-family: 'IBM Plex Mono', monospace;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.audio-player__progress {
        order: 10;
        width: 100%;
        flex-basis: 100%;
    }

    .audio-player__speeds {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    #article-audio-player {
        padding: 1rem 0.75rem 0;
    }

    .audio-player {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .audio-player__play {
        width: 36px;
        height: 36px;
    }

    .audio-player__play svg {
        width: 14px;
        height: 14px;
    }

    .audio-player__rewind {
        width: 26px;
        height: 26px;
    }
}
