/* ============================================================
   Audio Player — Compact Liquid Glass + Vestment Color  (v1.3.0)
   ============================================================ */

.audio-player {
    /* Background driven by vestment colour via --audio-bg JS variable */
    background: var(--audio-bg, rgba(28,22,52,0.72));
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    color: #fff;
    border-radius: 5px;
    /* Compact: single row layout */
    padding: 8px 12px;
    margin: var(--space-2) var(--space-2) 0;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow:
        0 6px 24px rgba(0,0,0,0.20),
        0 2px 6px  rgba(0,0,0,0.10),
        inset 0 1px 0 rgba(255,255,255,0.18);
    /* Single-line control row */
    display: flex;
    align-items: center;
    gap: 8px;
}
.audio-player.hidden { display: none; }

/* Title: hide on very small screens if needed, truncate */
.audio-title {
    font-size: 11px;
    font-weight: 600;
    opacity: .88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 140px;
    min-width: 0;
    display: none; /* hidden in compact mode — remove if screen space allows */
}

/* All controls in one row */
.audio-controls {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.btn-play-pause {
    width: 36px; height: 36px;     /* smaller than before (was 48px) */
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.20);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    color: #fff;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.30);
    transition: background var(--transition-fast), transform var(--transition-fast);
    cursor: pointer;
}
.btn-play-pause:active { transform: scale(.93); }
.btn-play-pause:hover  {
    background: rgba(255,255,255,0.30);
}

.audio-progress-wrap {
    flex: 1;
    min-width: 0;
}
.audio-progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,.28);
    cursor: pointer;
    margin-bottom: 2px;
}
.audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.audio-times {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    opacity: .65;
}

.audio-speed-btn {
    background: rgba(255,255,255,0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.audio-speed-btn:hover { background: rgba(255,255,255,.26); }

/* Mini audio indicator in header */
.audio-indicator {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.4); }
}

.audio-speed-btn {
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.audio-speed-btn:hover { background: rgba(255,255,255,.25); }

/* Mini audio indicator in header */
.audio-indicator {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.4); }
}
