/* Unified audio player for all site audio (recordings, nigun, songs, digital tree, chizuk).
   One accessible control set everywhere: play/pause, seek, speed, volume, download.
   The original <audio> element stays in the DOM (hidden) so existing continuity logic keeps working. */
.olim-audio-off{display:none!important}
.olim-player{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;max-width:560px;min-height:52px;padding:6px 10px;border:1px solid #b9cfc9;border-radius:14px;background:#eef4f2;font-family:Arial,sans-serif;direction:ltr}
.olim-play{flex:0 0 44px;width:44px;height:44px;min-height:44px;border-radius:50%;border:0;background:var(--teal-dark,#075d58);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.olim-play svg{width:20px;height:20px;fill:currentColor;display:block}
.olim-play .olim-icon-pause{display:none}
.olim-player[data-state="playing"] .olim-icon-play{display:none}
.olim-player[data-state="playing"] .olim-icon-pause{display:block}
.olim-time{font-size:13px;font-variant-numeric:tabular-nums;color:#173d37;white-space:nowrap;line-height:1}
.olim-seek{flex:1 1 0;min-width:40px;height:36px;margin:0;accent-color:var(--teal-dark,#075d58);cursor:pointer}
.olim-seek:disabled{cursor:default;opacity:.5}
.olim-rate{flex:0 0 auto;min-width:46px;min-height:36px;padding:4px 7px;border:1px solid #8db7b0;border-radius:9px;background:#fff;color:var(--teal-dark,#075d58);font:700 13px Arial,sans-serif;cursor:pointer;white-space:nowrap}
.olim-rate[data-fast="1"]{background:var(--teal-dark,#075d58);color:#fff;border-color:var(--teal-dark,#075d58)}
.olim-vol{flex:0 0 84px;width:84px;height:36px;margin:0;accent-color:var(--teal-dark,#075d58);cursor:pointer}
.olim-dl{flex:0 0 40px;width:40px;height:40px;border-radius:9px;border:1px solid #8db7b0;background:#fff;color:var(--teal-dark,#075d58);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.olim-dl svg{width:18px;height:18px;fill:currentColor}
.olim-player[data-state="error"]{opacity:.65}
.olim-player[data-state="error"] .olim-play{background:#9aa7a3;cursor:default}
@media(pointer:coarse){.olim-vol{display:none}}
@media(max-width:420px){.olim-vol{display:none}.olim-player{gap:5px;padding:6px 8px}.olim-seek{min-width:24px}.olim-time{font-size:12px}.olim-rate{min-width:42px;padding:4px 5px}}
@media(max-width:340px){.olim-player{gap:4px}.olim-seek{min-width:16px}.olim-cur{display:none}}
/* Expanded in-page player under a recording row (replaces the old Drive iframe box) */
.inline-drive-player{padding-top:10px}
.inline-drive-player .olim-player{max-width:100%}
/* Songs box and tree tiles: player fills the card */
.nav-box-body .song-item .olim-player,
.tree-song-body .olim-player,
.tree-listen-panel .olim-player,
.chizuk-card .olim-player{max-width:100%}
/* The main nigun keeps its previous width */
.songs-section > .olim-player{max-width:440px}
/* Loading the file (Pages has no Range support, so the whole file is fetched once) */
.olim-player[data-state="loading"] .olim-play{opacity:.65;cursor:progress}
.olim-player[data-state="loading"] .olim-dur{color:#075d58;font-weight:700}
/* Library rows (language pages): the player takes the whole row */
.material-action .olim-player{max-width:100%}
/* Hebrew audio cards: compact */
.audio-block .material:has(audio[aria-label="האזנה ישירות מהדף"]){padding:8px 10px;gap:6px}
.audio-block .material:has(audio[aria-label="האזנה ישירות מהדף"]) .material-main{flex-direction:row;align-items:center;gap:10px}
.audio-block .material:has(audio[aria-label="האזנה ישירות מהדף"]) .topic-badge{width:34px!important;height:34px!important}
.audio-block .material:has(audio[aria-label="האזנה ישירות מהדף"]) .topic-badge svg{width:21px;height:21px}
.audio-block .material:has(audio[aria-label="האזנה ישירות מהדף"]) h3{margin:0;font-size:16px}
.audio-block .material:has(audio[aria-label="האזנה ישירות מהדף"]) .olim-player{min-height:44px;padding:4px 8px}
.audio-block .material:has(audio[aria-label="האזנה ישירות מהדף"]) .olim-play{flex-basis:38px;width:38px;height:38px;min-height:38px}
