/* Quran search states and audio controls — Version 9 palette, both appearances. */
:root[data-theme] #quran-library .empty-state,
:root[data-theme] #verses-holder .empty-state,
:root[data-theme] .quran-audio-panel {
  background:var(--paper)!important;
  border:1px solid var(--border)!important;
  color:var(--ink)!important;
}
:root[data-theme] #quran-library .empty-state h2,
:root[data-theme] #verses-holder .empty-state h2,
:root[data-theme] .quran-audio-panel h2 {
  color:var(--ui-strong)!important;
}
:root[data-theme] #quran-library .empty-state p,
:root[data-theme] #verses-holder .empty-state p,
:root[data-theme] .quran-audio-panel .mini-help,
:root[data-theme] #audio-availability {
  color:var(--muted)!important;
}
:root[data-theme] #quran-search,
:root[data-theme] #audio-ayah-select {
  background:var(--ui-input)!important;
  color:var(--ui-strong)!important;
  border:1px solid var(--border)!important;
  opacity:1;
}
:root[data-theme] #quran-search::placeholder { color:var(--ui-faint)!important;opacity:1 }
:root[data-theme] #quran-library .surah-item,
:root[data-theme] #quran-library .surah-open {
  background:var(--ui-raised)!important;
  color:var(--ink)!important;
  border-color:var(--border)!important;
}
:root[data-theme] #quran-library .surah-content strong,
:root[data-theme] #quran-library .surah-meaning,
:root[data-theme] #quran-library .surah-card-arabic {color:var(--ui-strong)!important}
:root[data-theme] #quran-library .surah-number { background:var(--ui-pill)!important;color:var(--ui-pill-ink)!important }
:root[data-theme] #quran-library .surah-item:hover {background:var(--ui-soft)!important;border-color:var(--ui-accent)!important}
:root[data-theme] .quran-audio-panel .qari-list,
:root[data-theme] .quran-audio-panel .audio-ayah-tools {color:var(--ui-strong)!important}
.quran-audio-panel .audio-ayah-tools {
 grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:10px;
 padding:16px;border-radius:13px;background:var(--ui-soft);
 border:1px solid var(--border);
}
.quran-audio-panel .audio-ayah-tools label {font-weight:800;font-size:12px;color:var(--ui-strong)}
.quran-audio-panel .audio-ayah-tools select {width:auto;min-width:120px;max-width:210px}
.quran-audio-panel .audio-ayah-tools button {min-height:40px}
.quran-audio-panel .audio-ayah-current {font-size:12px;font-weight:800;color:var(--ui-strong)}
.quran-audio-panel>.mini-help {grid-column:1/-1}
.verse .verse-audio-action {
 display:block;background:var(--ui-soft)!important;color:var(--ui-link)!important;
 border:1px solid var(--border)!important;border-radius:8px;
 font-size:10px;font-weight:800;line-height:1.2;padding:6px 3px;min-width:52px;max-width:65px;
}
.verse .verse-audio-action:hover {border-color:var(--ui-accent)!important}
.verse .verse-meta {width:60px}
:root[data-theme] .verse.is-playing-ayah{
 background:var(--ui-soft);
 border-radius:12px;
 box-shadow:inset 3px 0 0 var(--ui-accent);
}
:root[data-theme] .verse.is-playing-ayah .verse-num{
 background:var(--ui-pill)!important;color:var(--ui-pill-ink)!important;
}
@media(max-width:650px){
 .quran-audio-panel .audio-ayah-tools {padding:12px;gap:8px}
 .quran-audio-panel .audio-ayah-tools select{flex:1;min-width:100px}
 .quran-audio-panel .audio-ayah-tools button{flex:1}
 .verse .verse-meta{width:56px}
}

/* General results and loading messages should remain readable in either theme. */
:root[data-theme] .empty-state{background:var(--paper)!important;color:var(--ink)!important;border-color:var(--border)!important}
:root[data-theme] .empty-state h2{color:var(--ui-strong)!important}
:root[data-theme] .empty-state p{color:var(--muted)!important}
:root[data-theme] .reader-status{color:var(--muted)!important}

/* Keep the verse currently playing comfortably centred during automatic reading follow. */
#verses-holder .verse{scroll-margin-top:12vh;scroll-margin-bottom:12vh}
#verses-holder .verse.is-playing-ayah{transition:background-color 180ms ease,box-shadow 180ms ease}
@media(prefers-reduced-motion:reduce){#verses-holder .verse.is-playing-ayah{transition:none}}
