/* ============================================================
   Spiritual Maturity — Persistent Audio Player Bar
   ============================================================ */

#audio-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #002395;
    color: white;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#audio-player-bar.visible {
    transform: translateY(0);
}

/* Controls row */
.player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
}

/* Play/Pause button */
#player-play-pause {
    width: 2.5rem;
    height: 2.5rem;
    background: #eab308;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
    cursor: pointer;
    border: none;
}
#player-play-pause:hover { background: #facc15; }
#player-play-pause svg { color: #1e1b4b; }

/* Prev / Next buttons */
#player-prev, #player-next {
    background: none;
    border: none;
    color: #a5b4fc;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.15s;
    flex-shrink: 0;
}
#player-prev:hover, #player-next:hover { color: white; }

/* Track info */
.player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.player-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#player-title { font-size: 0.875rem; font-weight: 500; }
#player-series { font-size: 0.75rem; color: #a5b4fc; }

/* Seek area */
.player-seek {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1.5;
    min-width: 0;
}
#player-time, #player-duration {
    font-size: 0.7rem;
    color: #a5b4fc;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Range inputs */
input[type="range"]#player-seek-bar {
    flex: 1;
    min-width: 0;
}

input[type="range"]#player-volume {
    width: 5rem;
    flex-shrink: 0;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #eab308;
    cursor: pointer;
    transition: background 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { background: #facc15; }
input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #eab308;
    cursor: pointer;
    border: none;
}

/* Speed select */
#player-speed {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    padding: 0.15rem 0.3rem;
    cursor: pointer;
    flex-shrink: 0;
}
#player-speed option { background: #1e1b4b; }

/* Playlist toggle button */
#player-list-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: background 0.15s;
}
#player-list-toggle:hover { background: rgba(255, 255, 255, 0.18); }

/* Playlist drawer */
#player-playlist {
    max-height: 220px;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#player-playlist::-webkit-scrollbar { width: 4px; }
#player-playlist::-webkit-scrollbar-track { background: transparent; }
#player-playlist::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.player-track-item {
    border: none;
    cursor: pointer;
    border-left: 2px solid transparent;
}
.player-track-item.active {
    border-left-color: #eab308;
}

/* Post page inline player — active track */
.track-item.active {
    border-left-color: #eab308 !important;
    background: rgba(255, 255, 255, 0.05) !important;
}
.track-item.active .track-number {
    color: #eab308 !important;
    opacity: 1 !important;
}

/* Body padding so content isn't hidden behind the bar */
body.player-visible {
    padding-bottom: 4.5rem;
}

/* Responsive: hide volume on small screens */
@media (max-width: 640px) {
    input[type="range"]#player-volume { display: none; }
    #player-speed { display: none; }
    .player-seek { flex: 1; }
}
