/* Koran.nl V4 – skin for the surah pages of the quran-learning-app plugin.
   Loaded after the plugin's Bootstrap bundle, so it only overrides looks. */

/* Quran font: the plugin uses font-display: swap, so on a slow load the verses showed in a plain fallback
   font (plain digits instead of the verse ornaments). Same files, now "block": briefly invisible, never
   in the wrong font. Later identical @font-face rules win (14 nov). */
@font-face { font-family: UthmanicHafs1; font-style: normal; font-weight: 400; font-display: block; src: url("../../../plugins/quran-learning-app/public/app/assets/fonts/UH1_Ver17.woff2") format("woff2"); }
@font-face { font-family: UthmanicHafs1; font-style: normal; font-weight: 700; font-display: block; src: url("../../../plugins/quran-learning-app/public/app/assets/fonts/UH1B_Ex1_Ver12.woff2") format("woff2"); }

:root {
  --slate: #2E3F42;
  --slate-2: #374B4F;
  --gold: #C4B66C;
  --gold-text: #7A6B2A;
  --gold-line: #D7CD9B;
  --cream: #F6F3E7;
  --cream-2: #FBF8EC;
  --blue: #EAF4FA;
  --blue-line: #CFE5F2;
  --orange: #FF7700;
  --red: #B3261E;
  --muted: #4A5B5E;
  --line: #E6EAEB;
  --field: #C9D3D4;
  --white: #FFFFFF;
  --font: Manrope, "Segoe UI", Arial, sans-serif;
}

body { font-family: var(--font); color: var(--slate); background: var(--white); }
a { color: #2670C7; }
:focus-visible { outline: 3px solid var(--orange) !important; outline-offset: 2px; }

/* Bootstrap colours → V4 */
.text-primary, .text-primary-dark { color: var(--slate) !important; }
.text-success { color: var(--gold-text) !important; }
.text-danger { color: var(--red) !important; }
.bg-primary { background-color: var(--slate) !important; }
.bg-danger { background-color: var(--gold) !important; }
.bg-light { background-color: var(--white) !important; }
.border, .border-top, .border-bottom, .border-left, .border-right { border-color: var(--line) !important; }
.badge-primary { background: var(--gold); color: var(--slate); }
.btn { font-family: var(--font); }
.btn-light { background: var(--white); border-color: var(--field); color: var(--slate); }
.btn-light:hover, .btn-light:focus, .btn-light.active { background: var(--cream-2); border-color: var(--gold-line); color: var(--slate); }
.btn-primary, .btn-danger { background: var(--slate); border-color: var(--slate); color: var(--white); border-radius: 999px; font-weight: 700; padding-left: 18px; padding-right: 18px; }
.btn-primary:hover, .btn-danger:hover { background: #24343a; border-color: #24343a; color: var(--white); }
.btn-outline-primary { border: 2px solid var(--orange); color: var(--slate); border-radius: 999px; font-weight: 700; }
.form-control { border-radius: 10px; border-color: var(--field); color: var(--slate); font-family: var(--font); }
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); outline: none !important; }
.form-control:focus-visible, select:focus-visible, input:focus-visible { outline: none !important; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--slate); border-color: var(--slate); }
.custom-switch .custom-control-input:checked ~ .custom-control-label::after { background-color: var(--gold); }
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 2px rgba(255,119,0,0.35); }
.spinner-border.text-primary, .spinner-grow.text-info { color: var(--gold) !important; }
.dropdown-menu { border: 1px solid var(--blue-line); border-top: 3px solid var(--orange); border-radius: 0 0 14px 14px; box-shadow: 0 24px 48px -24px rgba(0,0,0,0.35); }
.dropdown-item { color: var(--slate); font-weight: 600; border-radius: 8px; }
.dropdown-item:hover { background: var(--cream-2); color: var(--slate); }
.dropdown-item.active, .dropdown-item:active { background: var(--slate); color: var(--white); }

/* V4 site header (added above the plugin app) */
.v4h { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 1040; font-family: var(--font); }
.v4h-wrap { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.v4h-brand { flex: none; display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--slate) !important; }
.v4h-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--slate); display: flex; align-items: center; justify-content: center; }
.v4h-name { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.v4h-name span { color: var(--orange); }
.v4h-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.v4h-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.v4h-nav li { position: relative; }
.v4h-nav > ul > li > a { display: block; padding: 10px 12px; text-decoration: none; color: var(--slate); font-weight: 600; font-size: 16px; white-space: nowrap; border-radius: 10px; }
.v4h-nav > ul > li > a:hover, .v4h-nav > ul > li:focus-within > a { background: var(--blue); color: var(--slate); }
.v4h-nav > ul > li.current-menu-ancestor > a, .v4h-nav > ul > li.current-menu-item > a { box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; font-weight: 700; }
.v4h-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.v4h-nav .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 260px; max-height: 70vh; overflow-y: auto; background: var(--white); border: 1px solid var(--blue-line); border-top: 3px solid var(--orange); border-radius: 0 0 14px 14px; box-shadow: 0 24px 48px -24px rgba(0,0,0,0.35); display: none; }
.v4h-nav li:hover > .sub-menu, .v4h-nav li:focus-within > .sub-menu { display: block; }
.v4h-nav .sub-menu a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--slate); font-size: 15px; font-weight: 600; }
.v4h-nav .sub-menu a:hover { background: var(--cream-2); }
.v4h-nav .has-long-sub > .sub-menu { min-width: 560px; columns: 2; column-gap: 8px; }
.v4h-nav .has-long-sub > .sub-menu li { break-inside: avoid; }
.v4h-actions { flex: none; display: flex; align-items: center; gap: 10px; }
.v4h-donate { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--gold); color: var(--slate) !important; font-weight: 700; font-size: 14px; text-decoration: none !important; }
.v4h-donate:hover { background: #b6a75d; }
.v4h-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--field); border-radius: 12px; background: var(--white); align-items: center; justify-content: center; cursor: pointer; padding: 0; }

/* App bar (the plugin navbar), sticky under the site header */
#navbar.navbar { position: sticky !important; z-index: 1030; background: var(--blue) !important; border-bottom: 1px solid var(--blue-line) !important; padding: 8px max(24px, calc((100% - 1110px) / 2 + 24px)); font-family: var(--font); font-weight: 700; font-size: 15px; color: var(--slate); }
#navbar .navbar-brand { display: none; }
#navbar .navbar-btn { height: 40px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); color: var(--slate); font-weight: 700; font-size: 15px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
#navbar .navbar-btn:hover { background: var(--cream-2); }
#nav-surah-selector-button { border: 2px solid var(--orange) !important; margin-left: 0 !important; }
#nav-surah-selector > div:first-child { margin-bottom: 0 !important; margin-right: 8px !important; }
#nav-comments-number { background: var(--gold); color: var(--slate); }
#nav-surah-selector-list .nav-dropdown-surah-item-arabic { color: var(--gold-text); }
.navbar-card > div, .navbar-card .bg-light.border { border-radius: 14px !important; border: 1px solid var(--blue-line) !important; border-top: 3px solid var(--orange) !important; box-shadow: 0 24px 48px -24px rgba(0,0,0,0.35); font-family: var(--font); color: var(--slate); }
.navbar-card .btn, .navbar-card .btn * { color: var(--slate) !important; }
.navbar-card .btn { border: 1px solid var(--field); border-radius: 8px; background: var(--white); }
.navbar-card .btn:hover { background: var(--cream-2); border-color: var(--gold-line); }
.navbar-card .text-success, .navbar-card .text-danger, .navbar-card .text-primary { color: var(--gold-text) !important; }
#navbar .navbar-btn .text-danger, #navbar .navbar-btn .text-primary, #navbar .navbar-btn .text-success, #navbar .navbar-btn > span:not(.badge), #navbar .navbar-btn > i, #navbar .navbar-btn > svg { color: var(--gold-text) !important; }
#navbar #sidebarCollapse, #navbar #sidebarCollapse * { color: var(--slate) !important; }

/* Content */
#content { padding-top: 0 !important; margin-top: 0 !important; }
#content-container { max-width: 1110px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
#content-surah-info { padding-top: 20px !important; }
.surah-info { border: 1px solid var(--blue-line) !important; border-radius: 12px; background: var(--white); font-size: 16px; }
.surah-info-content { padding: 12px 16px !important; }
.surah-info-content > .text-primary { color: var(--gold-text) !important; font-weight: 800; }

.ayah.basmala { margin-top: 14px; background: var(--cream) !important; border: 1.5px solid var(--gold-line) !important; border-radius: 16px; padding: 10px 20px; }
.ayah.basmala .ayah-info-play, .ayah.basmala .ayah-info-pause { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--slate); color: var(--gold) !important; }

.ayah.ayah-not-basmala { padding: 18px 14px; border-bottom: 1px solid var(--line); border-radius: 0; transition: background 0.2s; }
.ayah.ayah-playing { background: var(--cream-2) !important; box-shadow: inset 3px 0 0 var(--orange); border-radius: 12px; }
.ayah-info .btn, .ayah-info .ayah-info-badge { width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; padding: 0; margin-bottom: 6px; }
.ayah-info .ayah-info-badge { color: var(--red) !important; font-weight: 800; font-size: 14px; }
.ayah-info .btn:hover { background: var(--cream-2); border-color: var(--gold-line); }
.ayah-playing .ayah-info-pause { background: var(--gold); border-color: var(--gold); }
.ayah-content p.arabic { color: var(--slate); }
.word-highlight { color: var(--red) !important; background: #EFE6BF; border-radius: 6px; }
.ayah-number { color: var(--red); }
.translations .blockquote { margin-bottom: 10px; font-size: 17px; line-height: 1.6; color: var(--slate); }
.translations .blockquote-footer { font-size: 13px; color: var(--muted); margin-top: 2px; }
.transliteration-word-highlight, .transliteration .word-highlight { font-weight: 700; background: transparent; }
.page-number { color: var(--gold-text) !important; font-weight: 700; font-size: 14px; letter-spacing: 0.05em; padding: 14px 0; }

/* Audio player – full-width slate bar as in the V4 design */
#ap { max-width: none !important; width: 100% !important; left: 0; right: 0; }
#ap-content { max-width: none !important; }
#ap-container { background: var(--slate) !important; border: 0 !important; border-radius: 0; color: var(--cream); box-shadow: 0 -12px 32px -16px rgba(0,0,0,0.4); }
#ap-container-controls { max-width: 1110px; margin: 0 auto !important; padding: 10px 24px; align-items: center; }
#ap-container-progress { background: #4A5F63; height: 6px; }
#ap-container-progress-bar { background: var(--gold) !important; height: 6px; }
#ap-container .btn, #ap-container .btn * { color: var(--cream) !important; }
#ap-container .btn svg, #ap-container .btn svg * { fill: currentColor; }
#ap-container .btn.rounded-circle { width: 44px; height: 44px; padding: 0; background: var(--slate-2); border: 0; align-items: center; justify-content: center; opacity: 1; }
#ap-container-controls-back, #ap-container-controls-next, #reciterMenuButton, #ap-container-controls-learn, #ap-container-controls-settings { display: inline-flex; }
#ap-container .v4-ap-pill { white-space: nowrap; }
#ap-container .btn.rounded-circle:hover { background: #435a5e; }
#ap-container .btn:disabled, #ap-container .btn.disabled { opacity: 0.55; }
#ap-container-controls-main-play, #ap-container-controls-main-pause { width: 52px !important; height: 52px !important; background: var(--gold) !important; }
#ap-container-controls-main-play, #ap-container-controls-main-play *, #ap-container-controls-main-pause, #ap-container-controls-main-pause * { color: var(--slate) !important; }
#ap-container-controls-back, #ap-container-controls-next { margin: 0 8px; }
#ap-container .v4-ap-pill { width: auto !important; border-radius: 999px !important; padding: 0 14px !important; gap: 8px; font-family: var(--font); font-weight: 700; font-size: 14px; background: transparent !important; }
#ap-container-controls-learn.v4-ap-pill { box-shadow: inset 0 0 0 2px var(--orange); }
#ap-container-controls-settings.v4-ap-pill, #reciterMenuButton.v4-ap-pill { box-shadow: inset 0 0 0 1px #5E7276; }
#ap-container .v4-ap-pill:hover { background: var(--slate-2) !important; }
#ap-container-controls-iteration-text { color: var(--gold-line) !important; font-weight: 700; margin: 0 6px; }
#ap-container-reciter-menu { border-radius: 14px; border: 1px solid var(--blue-line); border-bottom: 3px solid var(--orange); }
#ap-container-reciter-menu .dropdown-item, #ap-container-reciter-menu .dropdown-item * { color: var(--slate) !important; }
#ap-container-reciter-menu .dropdown-item.active, #ap-container-reciter-menu .dropdown-item.active * { color: var(--white) !important; }
.ap-panel { border-radius: 16px 16px 0 0; border: 1px solid var(--blue-line) !important; border-bottom: 0 !important; box-shadow: 0 -12px 32px -16px rgba(0,0,0,0.35); color: var(--slate); height: auto !important; max-height: 70vh; overflow-y: auto; }
.ap-panel > .bg-primary { background: var(--blue) !important; color: var(--slate) !important; border-bottom: 3px solid var(--orange); font-weight: 800; border-radius: 16px 16px 0 0; }
.ap-panel > .bg-primary .ap-panel-close, .ap-panel > .bg-primary .ap-panel-close * { color: var(--slate) !important; }
.ap-panel-body { padding-bottom: 14px !important; }
@media (max-width: 640px) {
  #ap-container-controls { padding: 8px 10px; }
  #ap-container .v4-ap-pill span.v4-ap-label { display: none; }
  #ap-container .v4-ap-pill { padding: 0 !important; width: 44px !important; }
}

/* Range sliders (text size) */
.custom-range::-webkit-slider-thumb { background: var(--slate); }
.custom-range::-moz-range-thumb { background: var(--slate); }
.custom-range::-webkit-slider-runnable-track { background: var(--line); }
.custom-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255,119,0,0.35); }

/* Settings sidebar */
#sidebar { font-family: var(--font); }
#sidebar .sidebar-header { background: var(--blue); border-bottom: 3px solid var(--orange) !important; padding: 6px 16px; }
#sidebar .sidebar-header-title { font-weight: 800; color: var(--slate); }
#sidebar #dismiss { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--field); }
#sidebar .settings-section-title-text { font-weight: 700; color: var(--slate); }
#sidebar .settings-section-title-icon { color: var(--gold-text) !important; }
#sidebar .settings-section { border-bottom: 1px solid var(--line); }

/* Modals */
.modal-content { border: 0; border-radius: 20px; overflow: hidden; font-family: var(--font); color: var(--slate); }
.modal-header { background: var(--blue); border-bottom: 3px solid var(--orange); padding: 10px 20px; align-items: center; }
.modal-header .modal-title, .modal-header h1, .modal-header h2, .modal-header h3, .modal-header h4, .modal-header h5 { font-weight: 800; font-size: 18px; color: var(--slate) !important; margin: 0; }
.modal-header .close { width: 32px; height: 32px; flex: none; padding: 0 !important; margin: 0 0 0 auto !important; border: 1px solid var(--field); border-radius: 999px; background: var(--white); opacity: 1; color: var(--slate); text-shadow: none; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 400; line-height: 1; }
.modal-header .close > span { display: block; line-height: 1; margin-top: -2px; }
.modal-header .close:hover { background: var(--cream-2); opacity: 1; }
.modal-footer { border-top: 1px solid var(--line); }

/* Footer of the app */
#footer { font-family: var(--font); color: var(--muted); font-size: 14px; }

@media (max-width: 1100px) {
  .v4h-nav > ul > li > a { padding: 10px 8px; font-size: 15px; }
}
@media (max-width: 960px) {
  .v4h-toggle { display: inline-flex; }
  .v4h-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 3px solid var(--orange); box-shadow: 0 24px 48px -24px rgba(0,0,0,0.35); display: none; max-height: calc(100vh - 72px); overflow-y: auto; }
  .v4h-nav.is-open { display: block; }
  .v4h-nav > ul { flex-direction: column; padding: 8px 16px 16px; }
  .v4h-nav > ul > li > a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .v4h-nav .sub-menu, .v4h-nav .has-long-sub > .sub-menu { position: static; display: none; box-shadow: none; border: 0; border-left: 3px solid var(--orange); border-radius: 0; min-width: 0; max-height: 50vh; columns: 1; margin: 4px 0 8px; }
  .v4h-nav li:hover > .sub-menu { display: none; }
  .v4h-nav li.is-open > .sub-menu, .v4h-nav li:focus-within > .sub-menu { display: block; }
}
@media (max-width: 640px) {
  .v4h-wrap { padding: 10px 16px; gap: 10px; }
  .v4h-name { font-size: 20px; }
  .v4h-mark { width: 36px; height: 36px; }
  .v4h-donate span { display: none; }
  .v4h-donate { padding: 10px 12px; }
  #navbar.navbar { padding: 6px 12px; }
  #content-container { padding-left: 12px; padding-right: 12px; }
  .ayah.ayah-not-basmala { padding: 14px 6px; }
}

/* "Je was hier gebleven" toast */
#notifications .toast { font-family: var(--font); color: var(--slate); border: 1px solid var(--blue-line); border-top: 3px solid var(--orange); border-radius: 14px; box-shadow: 0 24px 48px -24px rgba(0,0,0,0.35); overflow: hidden; }
#notifications .toast-header { background: var(--blue); color: var(--slate); border-bottom: 1px solid var(--blue-line); font-weight: 800; }
#notifications .toast-header .close { opacity: 1; color: var(--slate); text-shadow: none; }
#notifications .toast-body { background: var(--white); }
#notifications .last-ayah-go { border: 1px solid var(--field) !important; border-radius: 8px; background: var(--white); color: var(--slate) !important; margin-left: 6px; }
#notifications .last-ayah-go:hover { background: var(--cream-2); border-color: var(--gold-line) !important; }
.text-success-dark { color: var(--slate) !important; }
/* Bismillah play button */
.ayah.basmala .ayah-info .btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--slate) !important; }
.ayah.basmala .ayah-info .btn, .ayah.basmala .ayah-info .btn * { color: var(--gold) !important; }
.ayah.basmala.ayah-playing { box-shadow: none; }
/* Fixes after review */
.modal-header, .modal-header.bg-light { background: var(--blue) !important; }
.ap-panel { width: auto !important; max-width: 760px; left: 0 !important; right: 0 !important; margin: 0 auto 10px !important; }
#comments-modal .btn, .modal-body .btn-light.btn-sm { border-radius: 999px; font-weight: 700; }
#comments-modal .modal-body { font-size: 15px; line-height: 1.6; }
@media (max-width: 640px) {
  #navbar.navbar { padding: 6px 8px; }
  #navbar .navbar-btn { margin-left: 4px; padding: 0 9px; }
  #nav-surah-selector-button-text { max-width: 140px !important; overflow: hidden; text-overflow: ellipsis; }
}

.ap-panel .ap-panel-body { padding-bottom: 26px !important; }
/* Player info (surah · verse) */
.ap-container-left { align-items: center; gap: 12px; min-width: 0; }
.v4-ap-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; font-family: var(--font); color: var(--cream); }
.v4-ap-info strong { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v4-ap-info span { font-size: 13px; color: var(--gold-line); white-space: nowrap; }
@media (max-width: 900px) { .v4-ap-info { display: none; } }
/* Previous / next surah */
.v4-surah-nav { display: flex; justify-content: space-between; gap: 12px; padding: 24px 0 110px; font-family: var(--font); }
.v4-surah-nav a { padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--slate); font-weight: 700; background: var(--white); }
.v4-surah-nav a:hover { background: var(--cream-2); border-color: var(--gold-line); color: var(--slate); text-decoration: none; }
.v4-surah-next { margin-left: auto; }
@media (max-width: 640px) { .v4-surah-nav { flex-direction: column; } .v4-surah-nav a { text-align: center; } .v4-surah-next { margin-left: 0; } }
/* Comments in V4 */
#comments-modal .comment-author-icon { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; background: var(--blue) !important; color: var(--slate) !important; }
#comments-modal .comment-author-icon.v4-av-c { background: var(--cream) !important; color: var(--gold-text) !important; }
#comments-modal .comment-author-icon.v4-av-k { background: var(--slate) !important; color: var(--gold) !important; }
#comments-modal .comment-author { color: var(--slate); }
#comments-modal .comment-metadata, #comments-modal .comment-metadata a { font-size: 13px; color: var(--muted); }
#comments-modal .comment-reply-link { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--slate); text-decoration: none; border-bottom: 2px solid var(--orange); }
#comments-modal .comment-list .children { border-left: 2px solid var(--line); padding-left: 14px; }
#comments-modal #respond { background: var(--cream); border: 1px solid var(--gold-line); border-radius: 16px; padding: 16px 18px; margin-top: 16px; }
#comments-modal #reply-title { font-size: 16px; font-weight: 800; color: var(--slate); }
#comments-modal #commentform { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#comments-modal #commentform > * { grid-column: 1 / -1; }
#comments-modal #commentform > div.form-group:nth-of-type(2), #comments-modal #commentform > div.form-group:nth-of-type(3) { grid-column: auto; }
#comments-modal #commentform label { font-weight: 700; font-size: 14px; }
#comments-modal #commentform .form-control { background: var(--white); }
#comments-modal #comment-submit { border-radius: 999px; padding: 10px 22px; font-size: 15px; }
@media (max-width: 640px) { #comments-modal #commentform { grid-template-columns: 1fr; } }
#comments-modal .comment-reply-link { border: 0 !important; border-bottom: 2px solid var(--orange) !important; border-radius: 0 !important; background: none !important; padding: 0 0 1px !important; box-shadow: none !important; }
#comments-modal #comment { min-height: 0; height: 110px; }
.ap-panel.active { bottom: 100% !important; margin-bottom: 8px !important; }
.ap-panel { top: auto !important; overflow: visible !important; max-height: none !important; }
.ayah.basmala { margin-bottom: 10px; } .ayah.ayah-playing.ayah-not-basmala { margin-top: 6px; margin-bottom: 6px; }
/* Playing verse as a calm card */
.ayah.ayah-playing.ayah-not-basmala { background: var(--cream-2) !important; box-shadow: 0 6px 18px -12px rgba(46,63,66,.35) !important; border: 1px solid var(--gold-line) !important; border-left: 4px solid var(--orange) !important; border-radius: 14px !important; margin: 10px 0 !important; }
.word-highlight { background: #EFE6BF; border-radius: 6px; padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* Player panels as in the V4 design */
.ap-panel { border-radius: 18px 18px 0 0 !important; }
.ap-panel > .bg-primary { background: var(--slate) !important; color: var(--cream) !important; border-bottom: 3px solid var(--orange); border-radius: 18px 18px 0 0; }
.ap-panel > .bg-primary .ap-panel-close, .ap-panel > .bg-primary .ap-panel-close * { color: var(--cream) !important; }
.ap-panel .custom-control-input:disabled ~ .custom-control-label::before { background-color: #F3F5F5; border-color: var(--field); }
.ap-panel .custom-control-input:disabled:checked ~ .custom-control-label::before { background-color: var(--slate); border-color: var(--slate); opacity: .45; }
.ap-panel .custom-control-input:disabled ~ .custom-control-label { color: var(--muted); }
.ap-panel .ap-panel-input-number { background: var(--white) !important; border: 1px solid var(--field) !important; border-radius: 10px !important; color: var(--slate) !important; }
.ap-panel .ap-panel-input-number:disabled { background: #F3F5F5 !important; color: var(--muted) !important; }
/* Vers / Verzen / Soera as segmented buttons */
#ap-learn .custom-radio { padding-left: 0; margin-right: 6px !important; }
#ap-learn .custom-radio .custom-control-label { padding: 7px 14px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); font-weight: 700; color: var(--slate); cursor: pointer; }
#ap-learn .custom-radio .custom-control-label::before, #ap-learn .custom-radio .custom-control-label::after { display: none; }
#ap-learn .custom-radio .custom-control-input:checked ~ .custom-control-label { border: 2px solid var(--orange); background: var(--cream-2); padding: 6px 13px; }
#ap-learn .custom-radio .custom-control-input:disabled ~ .custom-control-label { opacity: .55; cursor: default; }
#ap-learn .custom-radio .custom-control-input:focus-visible ~ .custom-control-label { box-shadow: 0 0 0 3px rgba(255,119,0,.35); }
#ap-learn .custom-radio .info-tooltip { margin-left: 4px; }
/* Toepassen = gold pill */
#ap-learn-apply { background: var(--gold) !important; border-color: var(--gold) !important; color: var(--slate) !important; font-weight: 800; border-radius: 999px; padding: 8px 20px; }
#ap-learn-apply:hover { background: #b6a75d !important; border-color: #b6a75d !important; }
#ap-learn-apply-notice-applied { color: var(--gold-text) !important; font-weight: 700; }
#ap-learn-apply-notice-not-applied { font-weight: 700; font-size: 13px; }
/* App bar buttons: no Bootstrap grey/green active state */
#navbar .navbar-btn:focus, #navbar .navbar-btn:active, #navbar .navbar-btn.active, #navbar .navbar-btn[aria-expanded="true"], #navbar .show > .navbar-btn { background: var(--cream-2) !important; border-color: var(--gold-line) !important; box-shadow: none !important; color: var(--slate) !important; }
#navbar .navbar-btn:focus-visible { box-shadow: 0 0 0 3px rgba(255,119,0,.35) !important; }
/* "Ga naar" card as in the V4 design */
#nav-goto-card-content { padding: 0 !important; overflow: hidden; border-top: 1px solid var(--blue-line) !important; min-width: 340px; }
#nav-goto-card-content::before { content: "Ga naar"; display: block; background: var(--slate); color: var(--cream); padding: 10px 16px; border-bottom: 3px solid var(--orange); font-weight: 800; font-size: 15px; }
#nav-goto-card-content form { display: flex; align-items: center; gap: 8px; padding: 12px 16px; margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
#nav-goto-card-content form > span, #nav-goto-card-content form span[id$="part-2"] { display: inline-flex; align-items: center; gap: 8px; }
#nav-goto-card-content .nav-goto-card-separator { margin: 0 16px; border-color: var(--line); }
#nav-goto-card-content .form-control, #nav-goto-card-content .custom-select { height: 40px; border: 1px solid var(--field); border-radius: 10px; color: var(--slate); font-size: 15px; font-weight: 600; }
#nav-goto-card-content .btn-primary { margin-left: auto; min-width: 56px; height: 40px; border: 0 !important; border-radius: 10px !important; background: var(--gold) !important; color: var(--slate) !important; font-weight: 800; padding: 0 14px !important; }
#nav-goto-card-content .btn-primary:hover { background: #b6a75d !important; }
.custom-select:focus { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
#nav-goto-card-content form { gap: 0; }
#nav-goto-card-content form > span, #nav-goto-card-content form span[id$="part-2"] { gap: 0; }
#nav-goto-card-content form span[id$="part-2"] { flex: 1; }
#nav-goto-card-content .form-control, #nav-goto-card-content .custom-select { margin: 0 10px 0 6px; }
/* Less orange: only the surah selector keeps its orange outline */
.dropdown-menu { border-top: 1px solid var(--blue-line) !important; border-radius: 14px !important; }
.navbar-card::after { border-bottom-color: var(--blue-line) !important; }
#nav-goto-card::after { border-bottom-color: var(--slate) !important; }
.form-control:focus, .custom-select:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 2px rgba(196,182,108,.35) !important; }
:focus-visible { outline: 2px solid var(--gold) !important; outline-offset: 2px; }
.form-control:focus-visible, .custom-select:focus-visible { outline: none !important; }
/* Slimmer modal headers */
.modal-header, .modal-header.bg-light { padding: 6px 14px 6px 18px !important; min-height: 0; }
.modal-header .modal-title, .modal-header h5 { font-size: 16px !important; line-height: 1.3; }
.modal-header .close { width: 28px; height: 28px; font-size: 19px; }
/* Search: button inside the search bar */
#search-modal .input-group { display: flex; align-items: center; border: 1px solid var(--field); border-radius: 12px; padding: 4px 4px 4px 6px; background: var(--white); flex-wrap: nowrap; }
#search-modal .input-group:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(196,182,108,.35); }
#search-modal-search-text { border: 0 !important; box-shadow: none !important; background: transparent; height: 40px; font-size: 16px; padding-left: 8px; }
#search-modal-search-btn { border-radius: 9px !important; height: 40px; padding: 0 18px !important; font-weight: 800; flex: none; }
/* Settings sidebar as in the V4 design */
#sidebar .sidebar-header { background: var(--slate) !important; border-bottom: 3px solid var(--orange) !important; padding: 10px 16px 10px 20px !important; margin-bottom: 0 !important; display: flex; align-items: center; justify-content: space-between; }
#sidebar .sidebar-header-title { color: var(--cream) !important; font-weight: 800; font-size: 18px; margin: 0 !important; }
#sidebar #dismiss { width: 34px; height: 34px; padding: 0 !important; border-radius: 999px; border: 1px solid #5E7276 !important; background: transparent !important; display: inline-flex; align-items: center; justify-content: center; }
#sidebar #dismiss, #sidebar #dismiss * { color: var(--cream) !important; }
#sidebar .settings-section > .header { background: var(--white) !important; padding: 12px 18px; }
#sidebar .settings-section > .header:hover { background: var(--cream-2) !important; }
#sidebar .settings-section > .body { padding: 4px 18px 14px; }
#sidebar .settings-section > .body h6 { font-size: 12px; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line) !important; padding: 8px 0 6px; margin: 6px 0 8px !important; }
#sidebar .settings-section > .body .row { align-items: center; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--slate); }
#sidebar .range-value { font-weight: 700; }
#sidebar .settings-icon, #sidebar .settings-icon * { color: var(--slate) !important; }
.custom-range::-webkit-slider-thumb { background: var(--orange) !important; }
.custom-range::-moz-range-thumb { background: var(--orange) !important; }
.custom-range::-webkit-slider-runnable-track { background: var(--line) !important; }
.custom-range::-moz-range-track { background: var(--line) !important; }
/* Normaal / Vet as segmented buttons */
#collapseSettingsFont .custom-radio { padding-left: 0; margin-right: 6px; }
#collapseSettingsFont .custom-radio .custom-control-label { padding: 6px 14px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); font-weight: 700; color: var(--slate); cursor: pointer; }
#collapseSettingsFont .custom-radio .custom-control-label::before, #collapseSettingsFont .custom-radio .custom-control-label::after { display: none; }
#collapseSettingsFont .custom-radio .custom-control-input:checked ~ .custom-control-label { border: 2px solid var(--orange); background: var(--cream-2); padding: 5px 13px; }
#collapseSettingsFont .col-7 { display: flex; gap: 6px; flex-wrap: nowrap; }
#collapseSettingsFont .custom-radio { margin-right: 0; }
#notifications { z-index: 1035 !important; }
/* Night mode in V4 colours */
body.night-mode { --n-bg: #1B2628; --n-card: #24333A; --n-card-2: #2B3C40; --n-line: #3A4D51; --n-text: #EDEAE0; --n-muted: #A9B5B7; background: var(--n-bg) !important; color: var(--n-text); }
body.night-mode #content, body.night-mode #content-container { background: transparent !important; }
body.night-mode .v4h { background: #182224; border-bottom-color: var(--n-line); }
body.night-mode .v4h-name, body.night-mode .v4h-nav > ul > li > a { color: var(--n-text) !important; }
body.night-mode .v4h-nav > ul > li > a:hover { background: var(--n-card); }
body.night-mode .v4h-nav .sub-menu { background: var(--n-card); border-color: var(--n-line); }
body.night-mode .v4h-nav .sub-menu a { color: var(--n-text); }
body.night-mode .v4h-nav .sub-menu a:hover { background: var(--n-card-2); }
body.night-mode .v4h-mark { background: #0F1719; }
body.night-mode #navbar.navbar { background: #202D30 !important; border-bottom-color: var(--n-line) !important; color: var(--n-text); }
body.night-mode #navbar .navbar-btn, body.night-mode #navbar .navbar-btn:focus, body.night-mode #navbar .show > .navbar-btn { background: var(--n-card) !important; border-color: var(--n-line) !important; color: var(--n-text) !important; }
body.night-mode #nav-surah-selector-button { border-color: var(--orange) !important; }
body.night-mode #navbar .navbar-btn .text-danger, body.night-mode #navbar .navbar-btn > span:not(.badge), body.night-mode #navbar .navbar-btn > svg { color: var(--gold) !important; }
body.night-mode .surah-info { background: var(--n-card) !important; border-color: var(--n-line) !important; color: var(--n-text); }
body.night-mode .surah-info-content > .text-primary { color: var(--gold) !important; }
body.night-mode .ayah.basmala { background: var(--n-card) !important; border-color: #5A5530 !important; }
body.night-mode .ayah.basmala .ayah-info .btn { background: #0F1719 !important; }
body.night-mode .ayah.ayah-not-basmala { border-bottom-color: var(--n-line) !important; }
body.night-mode .ayah-content p.arabic { color: var(--n-text) !important; }
body.night-mode .translations .blockquote, body.night-mode .translations .blockquote p { color: var(--n-text) !important; }
body.night-mode .translations .blockquote-footer { color: var(--n-muted) !important; }
body.night-mode .ayah-info .btn, body.night-mode .ayah-info .ayah-info-badge { background: var(--n-card) !important; border-color: var(--n-line) !important; }
body.night-mode .ayah-info .btn, body.night-mode .ayah-info .btn * { color: var(--n-text) !important; }
body.night-mode .ayah-info .ayah-info-share, body.night-mode .ayah-info .ayah-info-share *, body.night-mode .ayah-info .ayah-info-badge { color: #F08A80 !important; }
body.night-mode .ayah-number { color: #F08A80 !important; }
body.night-mode .ayah.ayah-playing.ayah-not-basmala { background: var(--n-card-2) !important; border-color: #5A5530 !important; border-left-color: var(--orange) !important; }
body.night-mode .word-highlight { background: #5A5530 !important; color: #FFE7A8 !important; }
body.night-mode .page-number { color: var(--gold) !important; }
body.night-mode .v4-surah-nav a { background: var(--n-card); border-color: var(--n-line); color: var(--n-text); }
body.night-mode #footer { background: #182224 !important; border-top-color: var(--n-line) !important; color: var(--n-muted); }
body.night-mode #sidebar, body.night-mode #sidebar .settings-section > .header, body.night-mode #sidebar .settings-section > .body { background: var(--n-card) !important; color: var(--n-text); }
body.night-mode #sidebar .settings-section { border-bottom-color: var(--n-line); }
body.night-mode #sidebar .settings-section-title-text, body.night-mode #sidebar .settings-icon, body.night-mode #sidebar .settings-icon *, body.night-mode #sidebar .settings-section > .body .row, body.night-mode #sidebar label { color: var(--n-text) !important; }
body.night-mode #sidebar .settings-section > .header:hover { background: var(--n-card-2) !important; }
body.night-mode #sidebar .settings-section > .body h6 { color: var(--gold) !important; border-bottom-color: var(--n-line) !important; }
body.night-mode .modal-content, body.night-mode .modal-body, body.night-mode .toast, body.night-mode .toast-body, body.night-mode .ap-panel, body.night-mode .ap-panel-body, body.night-mode .dropdown-menu, body.night-mode .navbar-card > div { background: var(--n-card) !important; color: var(--n-text) !important; border-color: var(--n-line) !important; }
body.night-mode .modal-header, body.night-mode .toast-header { background: #202D30 !important; color: var(--n-text) !important; }
body.night-mode .modal-header .modal-title, body.night-mode .modal-header h5 { color: var(--n-text) !important; }
body.night-mode .modal-header .close, body.night-mode #notifications .last-ayah-go, body.night-mode .navbar-card .btn { background: var(--n-card-2) !important; border-color: var(--n-line) !important; color: var(--n-text) !important; }
body.night-mode .dropdown-item { color: var(--n-text); }
body.night-mode .dropdown-item:hover { background: var(--n-card-2); color: var(--n-text); }
body.night-mode .form-control, body.night-mode .custom-select, body.night-mode #search-modal .input-group, body.night-mode .ap-panel .ap-panel-input-number { background: #1B2628 !important; border-color: var(--n-line) !important; color: var(--n-text) !important; }
body.night-mode #nav-goto-card-content form { color: var(--n-muted); }
body.night-mode #comments-modal #respond { background: #202D30; border-color: var(--n-line); }
body.night-mode #comments-modal .comment-author, body.night-mode #comments-modal #reply-title, body.night-mode #comments-modal .comment-reply-link { color: var(--n-text) !important; }
body.night-mode #ap-learn .custom-radio .custom-control-label, body.night-mode #collapseSettingsFont .custom-radio .custom-control-label { background: #1B2628; border-color: var(--n-line); color: var(--n-text); }
body.night-mode #ap-learn .custom-radio .custom-control-input:checked ~ .custom-control-label, body.night-mode #collapseSettingsFont .custom-radio .custom-control-input:checked ~ .custom-control-label { background: var(--n-card-2); border-color: var(--orange); }
body.night-mode .custom-range::-webkit-slider-runnable-track { background: var(--n-line) !important; }
body.night-mode .text-primary, body.night-mode .text-primary-dark { color: var(--n-text) !important; }
body.night-mode #navbar #sidebarCollapse, body.night-mode #navbar #sidebarCollapse * { color: var(--n-text) !important; }
body.night-mode #sidebar .settings-section > .header { border: 0 !important; }
body.night-mode #sidebar { border-left-color: var(--n-line) !important; }
body.night-mode .custom-control-input:checked ~ .custom-control-label::before { background-color: #6B6334 !important; border-color: #6B6334 !important; }
body.night-mode .custom-control-label::before { background-color: #1B2628; border-color: var(--n-line); }
.surah-info.collapsed .surah-info-content { height: auto !important; max-height: none !important; padding: 9px 16px !important; line-height: 24px; text-overflow: ellipsis; }
/* Notifications: bottom right above the player, never cut off, same look for all */
#notifications { top: auto !important; bottom: 92px !important; right: 16px !important; left: auto !important; display: flex; flex-direction: column; gap: 10px; }
#notifications .toast { margin: 0 !important; min-width: 280px; background: var(--white) !important; }
#notifications .toast-header { padding: 8px 10px 8px 14px; }
#notifications .toast-header .close { width: 26px; height: 26px; margin: 0 0 0 auto !important; padding: 0 !important; border: 1px solid var(--field); border-radius: 999px; background: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; }
#notifications .toast-header .close > span { display: block; line-height: 1; margin-top: -2px; }
body.night-mode #notifications .toast { background: var(--n-card) !important; }
body.night-mode #notifications .toast-header .close { background: var(--n-card-2) !important; border-color: var(--n-line) !important; color: var(--n-text) !important; }
@media (max-width: 640px) { #notifications { right: 8px !important; left: 8px !important; bottom: 84px !important; } #notifications .toast { min-width: 0; max-width: none; } }

/* Basmala playing: same orange left line as playing verse */
.ayah.basmala.ayah-playing { border-left: 4px solid var(--orange) !important; box-shadow: 0 6px 18px rgba(46,63,66,.08); }
body.night-mode .ayah.basmala.ayah-playing { border-left-color: var(--orange) !important; }
/* Word highlight without layout shift: no padding/bold, fake padding via box-shadow */
.word-highlight, .transliteration-word-highlight, .transliteration .word-highlight { padding: 0 !important; margin: 0 !important; font-weight: inherit !important; letter-spacing: inherit !important; box-shadow: 0 0 0 3px #EFE6BF; }
.translations .word-highlight, p:not(.arabic) > .word-highlight { box-shadow: 0 0 0 2px #EFE6BF; }
body.night-mode .word-highlight { box-shadow: 0 0 0 3px #5A5530 !important; }
/* Tooltips in V4 light blue */
.tooltip { font-family: inherit; opacity: 1 !important; }
.tooltip .tooltip-inner { background: #EAF4FA; color: #2E3F42; border: 1px solid #C9DFEC; border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.45; max-width: 260px; text-align: left; box-shadow: 0 6px 18px rgba(46,63,66,.12); }
.bs-tooltip-top .arrow::before, .bs-tooltip-auto[x-placement^=top] .arrow::before { border-top-color: #C9DFEC; }
.bs-tooltip-bottom .arrow::before, .bs-tooltip-auto[x-placement^=bottom] .arrow::before { border-bottom-color: #C9DFEC; }
.bs-tooltip-left .arrow::before, .bs-tooltip-auto[x-placement^=left] .arrow::before { border-left-color: #C9DFEC; }
.bs-tooltip-right .arrow::before, .bs-tooltip-auto[x-placement^=right] .arrow::before { border-right-color: #C9DFEC; }
body.night-mode .tooltip .tooltip-inner { background: #2B3C40; color: #EDEAE0; border-color: #3A4D51; }
body.night-mode .bs-tooltip-top .arrow::before { border-top-color: #3A4D51; }
body.night-mode .bs-tooltip-bottom .arrow::before { border-bottom-color: #3A4D51; }
body.night-mode .bs-tooltip-left .arrow::before { border-left-color: #3A4D51; }
body.night-mode .bs-tooltip-right .arrow::before { border-right-color: #3A4D51; }
/* "Koran lezen" menu: compact grid (number + name) with a search field */
.v4h-nav .has-long-sub > .sub-menu { columns: auto !important; width: 680px; min-width: 0 !important; max-height: 460px; overflow-y: auto; padding: 0 !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 4px; align-content: start; }
.v4h-nav li.has-long-sub:hover > .sub-menu, .v4h-nav li.has-long-sub:focus-within > .sub-menu { display: grid; }
.v4h-nav .has-long-sub > .sub-menu > li { min-width: 0; }
.v4h-nav .has-long-sub > .sub-menu > li:not(.sm-search):not(.sm-all) { padding: 0 6px; }
.v4h-nav .has-long-sub > .sub-menu > li:nth-child(2), .v4h-nav .has-long-sub > .sub-menu > li:nth-child(3), .v4h-nav .has-long-sub > .sub-menu > li:nth-child(4), .v4h-nav .has-long-sub > .sub-menu > li:nth-child(5) { padding-top: 6px; }
.v4h-nav .has-long-sub > .sub-menu a { display: flex !important; align-items: center; gap: 8px; padding: 6px 8px !important; font-size: 14px !important; font-weight: 600; white-space: nowrap; }
.v4h-nav .sm-n { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; background: var(--cream); color: var(--gold-text); font-size: 12px; font-weight: 800; }
.v4h-nav .sm-t { overflow: hidden; text-overflow: ellipsis; }
.v4h-nav .has-long-sub > .sub-menu a:hover .sm-n { background: var(--gold); color: var(--slate); }
.v4h-nav .sm-search { grid-column: 1 / -1; position: sticky; top: 0; z-index: 2; background: var(--white); padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.v4h-nav .sm-search input { width: 100%; box-sizing: border-box; height: 40px; border: 2px solid var(--orange); border-radius: 999px; padding: 0 16px 0 38px; font: 600 15px var(--font); color: var(--slate); outline: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF7700' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }
.v4h-nav .sm-search input::placeholder { color: var(--muted); }
.v4h-nav .sm-all { grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 2; background: var(--white); border-top: 1px solid var(--line); padding: 6px 10px; margin-top: 6px; }
.v4h-nav .sm-all a { color: var(--slate) !important; font-weight: 800 !important; }
.v4h-nav .sm-empty { grid-column: 1 / -1; padding: 10px 16px; color: var(--muted); font-size: 14px; }
@media (max-width: 960px) {
  .v4h-nav .has-long-sub > .sub-menu { width: auto; max-height: 55vh; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4h-nav li.has-long-sub:hover > .sub-menu { display: none; }
  .v4h-nav li.has-long-sub.is-open > .sub-menu, .v4h-nav li.has-long-sub:focus-within > .sub-menu { display: grid; }
}

/* "Koran lezen" option 3: search + popular surahs (class sm-fav set by menu.js) */
.v4h-nav .has-long-sub > .sub-menu.sm-fav { width: 340px; grid-template-columns: 1fr; }
.v4h-nav .has-long-sub > .sub-menu.sm-fav > li:not(.sm-search):not(.sm-all) { padding-top: 0; }
.v4h-nav .sm-label { grid-column: 1 / -1; padding: 10px 16px 4px !important; font-size: 12px; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .08em; }
.v4h-nav .sm-fav.is-searching .sm-label { display: none; }
@media (max-width: 960px) {
  .v4h-nav .has-long-sub > .sub-menu.sm-fav { width: auto; grid-template-columns: 1fr; }
}
.v4h-nav .has-long-sub > .sub-menu.sm-fav { max-height: 520px; }

/* all other submenus: the same calm list as "Koran lezen" (icon circle + name, small heading) */
.v4h-nav .has-v4sub > .sub-menu { width: 300px; min-width: 0 !important; padding: 0 0 6px !important; }
.v4h-nav .has-v4sub > .sub-menu > li:not(.sm-label):not(.sm-all) { padding: 0 6px; }
.v4h-nav .has-v4sub > .sub-menu a { display: flex !important; align-items: center; gap: 10px; padding: 6px 8px !important; font-size: 14px !important; font-weight: 600; white-space: nowrap; }
.v4h-nav .sm-label { display: block; padding: 12px 16px 4px !important; font-size: 12px; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .08em; }
.v4h-nav .has-v4sub .sm-label + li { margin-top: 0; }
.v4h-nav .has-v4sub li + .sm-label { border-top: 1px solid var(--line); margin-top: 6px; }
.v4h-nav .has-v4sub .sm-i { min-width: 30px; height: 30px; font-size: 11px; letter-spacing: .02em; }
.v4h-nav .has-v4sub .sm-i svg { display: block; }
.v4h-nav .has-v4sub > .sub-menu a:hover .sm-n { background: var(--gold); color: var(--slate); }
.v4h-nav .has-v4sub .sm-all { border-top: 1px solid var(--line); padding: 6px 10px 0; margin-top: 6px; }
.v4h-nav .has-v4sub .sm-all a { color: var(--slate) !important; font-weight: 800 !important; }
/* Player bar: room for the 52px play button below the progress line (11 nov). */
#ap-container-controls { height: auto !important; padding-top: 6px !important; padding-bottom: 6px !important; }
#ap-container-controls > div { min-height: 52px; display: flex; align-items: center; }
/* Mobile pass (12 nov): mobile menu without inner scrollbars, iOS input zoom. */
@media (max-width: 960px) {
  .v4h-nav .has-v4sub > .sub-menu, .v4h-nav .has-long-sub > .sub-menu.sm-fav { width: auto !important; max-height: none !important; overflow: visible !important; }
}
@media (max-width: 960px) and (pointer: coarse) {
  .v4h input[type="search"], .v4h input[type="text"] { font-size: 16px !important; }
}

/* Mobile menu accordion (12 nov): one submenu open at a time; tap again to close. */
@media (max-width: 960px) {
  .v4h-nav li:not(.is-open) > .sub-menu { display: none !important; }
  .v4h-nav li.is-open:not(.has-long-sub) > .sub-menu { display: block !important; }
  .v4h-nav li.has-long-sub.is-open > .sub-menu { display: grid !important; }
  .v4h-nav .sm-all, .v4h-nav .sm-search { position: static !important; }
}

/* Surah pages: same header as the rest of the site, with account button (12 nov). */
.v4h-account { flex: none; width: 44px; height: 44px; border: 2px solid var(--orange); border-radius: 12px; background: var(--cream-2); display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important; }
@media (max-width: 640px) {
  .v4h-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
  .v4h-actions { display: contents; }
  .v4h-toggle { grid-column: 1; grid-row: 1; justify-self: start; }
  .v4h-brand { grid-column: 2; grid-row: 1; justify-self: center; }
  .v4h-mark { display: none; }
  .v4h-name { font-size: 24px; }
  .v4h-account { grid-column: 3; grid-row: 1; justify-self: end; margin-right: 52px; }
  .v4h-donate { grid-column: 3; grid-row: 1; justify-self: end; width: 44px; height: 44px; padding: 0 !important; justify-content: center; }
}

/* Account menu in the surah toolbar (#nav-user-card) in V4 (12 nov). */
#nav-user-card { min-width: 280px; padding: 0 !important; background: #fff !important; border: 1px solid var(--blue-line) !important; border-radius: 16px !important; overflow: hidden; box-shadow: 0 24px 48px -20px rgba(46,63,66,0.4) !important; font-family: var(--font); }
#nav-user-card-logged, #nav-user-card-loading { border: 0 !important; border-radius: 0 !important; padding: 0 !important; }
#nav-user-card-logged > .mb-2 { margin: 0 !important; padding: 18px 16px 14px; background: var(--slate); border-bottom: 3px solid var(--orange); text-align: center; }
#nav-user-card-logged-profile-img { width: 64px !important; height: 64px !important; object-fit: cover; border-radius: 999px !important; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); margin: 0 auto 8px !important; }
#nav-user-card-logged-profile-img[src*="default-profile"] { box-sizing: border-box; padding-left: 64px; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E3F42' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center / 34px 34px no-repeat; }
#nav-user-card-logged-name { color: var(--cream) !important; font-weight: 800; font-size: 16px; }
#nav-user-card-logged-email { color: #C9D3D4 !important; font-size: 13px; }
#nav-user-card .list-group { padding: 6px; }
#nav-user-card .list-group-item { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; color: var(--slate) !important; font-weight: 700; font-size: 15px; text-decoration: none !important; }
#nav-user-card .list-group-item + .list-group-item { margin-top: 2px; }
#nav-user-card .list-group-item > span { display: inline-flex; align-items: center; gap: 12px; }
#nav-user-card .list-group-item svg, #nav-user-card .list-group-item i { color: var(--gold-text) !important; fill: currentColor; width: 18px; height: 18px; flex: none; }
#nav-user-card .list-group-item > svg:last-child { width: 14px; height: 14px; opacity: .6; }
#nav-user-card .list-group-item:hover, #nav-user-card .list-group-item:focus { background: var(--cream-2) !important; }
#nav-user-card #nav-user-card-logged-donate { background: var(--cream) !important; }
#nav-user-card #nav-user-card-logged-donate:hover { background: #EFE9D2 !important; }
#nav-user-card #nav-user-card-logged-logout { margin-top: 6px; box-shadow: 0 -1px 0 var(--line); border-radius: 0 0 10px 10px !important; color: var(--muted, #5B6B6E) !important; }
#nav-user-card #nav-user-card-logged-logout svg, #nav-user-card #nav-user-card-logged-logout i { color: var(--orange) !important; }
#nav-user-card-arrow { border-bottom-color: var(--slate) !important; }
@media (max-width: 640px) { #nav-user-card { min-width: 0; width: min(300px, calc(100vw - 24px)); } }
#nav-user-card .list-group-item { justify-content: flex-start !important; gap: 12px; }
#nav-user-card .list-group-item > span + svg, #nav-user-card .list-group-item > span + i { margin-left: auto; }
#nav-user-card .list-group-item > svg:first-child { width: 18px; height: 18px; opacity: 1; }

/* Settings panel (#sidebar) in the style of the main menu dropdowns (12 nov):
   group labels, icons in round chips, rows without hard lines, open sections as a soft card. */
#sidebar .sidebar-body { padding: 4px 8px 16px; }
#sidebar .sidebar-body > .settings-section { border: 0 !important; margin: 0; }
#sidebar .sidebar-body > .settings-section:first-child::before,
#sidebar .sidebar-body > .settings-section:nth-child(5)::before { display: block; padding: 14px 12px 6px; font-size: 12px; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .08em; }
#sidebar .sidebar-body > .settings-section:first-child::before { content: "Weergave"; }
#sidebar .sidebar-body > .settings-section:nth-child(5)::before { content: "Tekst en vertaling"; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
#sidebar .settings-section > .header { display: flex !important; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px !important; border: 0 !important; border-radius: 12px !important; background: transparent !important; box-shadow: none !important; text-align: left; }
#sidebar .settings-section > .header:hover, #sidebar .settings-section > .header:focus-visible { background: var(--cream-2) !important; }
#sidebar .settings-section > .header > div:first-child { display: flex; align-items: center; gap: 12px; }
#sidebar .settings-section-title-icon { flex: none; width: 34px; height: 34px; border-radius: 999px; background: var(--cream); display: inline-flex !important; align-items: center; justify-content: center; margin: 0 !important; }
#sidebar .settings-section-title-icon svg { width: 16px !important; height: 16px !important; }
#sidebar .settings-section-title-text { font-size: 15px; font-weight: 700; color: var(--slate); }
#sidebar .settings-section > .header:hover .settings-section-title-icon { background: var(--gold); }
#sidebar .settings-section > .header:hover .settings-section-title-icon, #sidebar .settings-section > .header:hover .settings-section-title-icon * { color: var(--slate) !important; }
#sidebar .settings-section > .header .settings-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--gold-text); }
#sidebar .settings-section > .body { margin: 4px 4px 10px; padding: 6px 14px 10px !important; background: var(--cream-2); border: 1px solid var(--gold-line); border-radius: 14px; }
#sidebar .settings-section > .body h6 { border-bottom: 0 !important; padding: 8px 0 4px; margin: 4px 0 4px !important; }
#sidebar .custom-switch .custom-control-label::before { width: 2.4rem; height: 1.35rem; border-radius: 999px; border-color: var(--field); background: var(--line); top: .1rem; }
#sidebar .custom-switch .custom-control-label::after { width: calc(1.35rem - 6px); height: calc(1.35rem - 6px); border-radius: 999px; background: #fff; top: calc(.1rem + 3px); left: calc(-2.25rem + 3px); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
#sidebar .custom-switch .custom-control-input:checked ~ .custom-control-label::before { background: var(--slate); border-color: var(--slate); }
#sidebar .custom-switch .custom-control-input:checked ~ .custom-control-label::after { background: var(--gold); transform: translateX(1.05rem); }
body.night-mode #sidebar .settings-section-title-icon { background: var(--n-card-2); }
body.night-mode #sidebar .settings-section > .body { background: var(--n-card-2) !important; border-color: var(--n-line); }
body.night-mode #sidebar .sidebar-body > .settings-section:nth-child(5)::before { border-top-color: var(--n-line); }
#sidebar .settings-section > .body .row { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin: 0 0 10px !important; }
#sidebar .settings-section > .body .row > [class*="col-"] { padding: 0 !important; }
#sidebar .settings-section > .body .row > .col-5 { flex: 0 0 auto; max-width: 42%; white-space: nowrap; }
#sidebar .settings-section > .body .row > .col-7 { flex: 1 1 auto; max-width: none; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
#sidebar .settings-section > .body .custom-control-inline { margin: 0 !important; }
#sidebar .settings-section > .body .custom-radio .custom-control-label { padding: 4px 12px !important; font-size: 14px; }
#sidebar .settings-section > .body .custom-radio { padding-left: 0 !important; }
#sidebar .settings-section > .body .row > .col-5 { width: auto; }
/* "Ga naar" card on phones: smaller and centred on the screen, arrow still on the button (12 nov). */
@media (max-width: 640px) {
  #nav-goto-card { left: 50% !important; transform: translateX(-50%); width: min(320px, calc(100vw - 24px)); }
  #nav-goto-card::after { left: min(158px, calc(330px - 50vw)) !important; }
  #nav-goto-card-content { min-width: 0 !important; width: 100%; }
  #nav-goto-card-content::before { padding: 8px 14px; font-size: 14px; }
  #nav-goto-card-content form { padding: 8px 12px; font-size: 13px; }
  #nav-goto-card-content .nav-goto-card-separator { margin: 0 12px; }
  #nav-goto-card-content .form-control, #nav-goto-card-content .custom-select { height: 34px; font-size: 16px; margin: 0 6px 0 4px !important; padding: 2px 6px; }
  #nav-goto-card-content .custom-select { padding-right: 22px; }
  #nav-goto-card-content .btn-primary { height: 34px; min-width: 44px; padding: 0 10px !important; font-size: 13px; }
}
/* Primary buttons never turn green (plugin focus/active colours), 12 nov. */
.btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:disabled, .btn-primary.disabled, .show > .btn-primary.dropdown-toggle { background-color: var(--slate) !important; border-color: var(--slate) !important; color: #fff !important; }
.btn-primary:focus, .btn-primary.focus, .btn-primary:not(:disabled):not(.disabled):active:focus { box-shadow: 0 0 0 3px rgba(196,182,108,.45) !important; }

/* Search window in V4 (12 nov): dark header, search field as a pill, results as calm rows. */
#search-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(46,63,66,.45); }
#search-modal .modal-header { background: var(--slate) !important; border-bottom: 3px solid var(--orange) !important; padding: 12px 18px !important; align-items: center; }
#search-modal .modal-title { color: var(--cream); font-weight: 800; font-size: 18px; }
#search-modal .modal-header .close { margin: 0 !important; padding: 0 !important; width: 34px; height: 34px; border-radius: 999px; border: 1px solid #5E7276; color: var(--cream) !important; opacity: 1; text-shadow: none; font-size: 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
#search-modal .modal-header .close:hover { background: rgba(255,255,255,.1); }
#search-modal .modal-body { padding: 16px 18px 18px !important; font-family: var(--font); color: var(--slate); }
#search-modal .input-group { border: 2px solid var(--orange); border-radius: 999px; padding: 4px; background: var(--white); }
#search-modal .input-group:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,119,0,.18); }
#search-modal-search-text { padding-left: 14px !important; font-weight: 600; color: var(--slate); }
#search-modal-search-btn { border-radius: 999px !important; height: 40px; padding: 0 20px !important; background: var(--slate) !important; border-color: var(--slate) !important; color: #fff !important; }
#search-modal-search-btn:hover { background: #24343A !important; }
#search-modal .modal-body > .row { margin: 12px 0 6px !important; padding: 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
#search-modal .modal-body > .row > [class*="col"] { flex: 0 0 auto; width: auto; max-width: none; padding: 0 !important; }
#search-modal .modal-body > .row > [class*="col"]:first-child { flex-basis: 100%; font-size: 12px; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .08em; }
#search-modal .modal-body > .row .custom-control { display: inline-flex; align-items: center; gap: 8px; padding-left: 0; margin: 0; }
#search-modal .modal-body > .row .custom-control-input { position: absolute; opacity: 0; }
#search-modal .modal-body > .row .custom-control-label { padding: 6px 14px; border: 1px solid var(--field); border-radius: 999px; background: var(--white); color: var(--slate); font-weight: 700; cursor: pointer; }
#search-modal .modal-body > .row .custom-control-label::before, #search-modal .modal-body > .row .custom-control-label::after { display: none !important; }
#search-modal .modal-body > .row .custom-control-input:checked ~ .custom-control-label { background: var(--slate); border-color: var(--slate); color: #fff; }
#search-modal .modal-body > .row .custom-control-input:focus-visible ~ .custom-control-label { box-shadow: 0 0 0 3px rgba(255,119,0,.3); }
#search-modal-translation-select { height: 36px; border: 1px solid var(--field); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--slate); padding: 0 30px 0 12px; max-width: 220px; }
#search-modal-result { margin-top: 10px; }
#search-modal-result > div:first-child { font-size: 14px; color: var(--muted); }
#search-modal-result > div:first-child b { color: var(--slate); }
#search-modal-result > .text-center { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 6px !important; font-size: 14px; font-weight: 700; }
#search-modal-result .search-result-prev, #search-modal-result .search-result-next { width: 34px; height: 34px; padding: 0 !important; border-radius: 999px !important; border: 1px solid var(--field) !important; background: var(--white) !important; color: var(--slate) !important; display: inline-flex; align-items: center; justify-content: center; }
#search-modal-result .search-result-prev:not(:disabled):hover, #search-modal-result .search-result-next:not(:disabled):hover { background: var(--gold) !important; border-color: var(--gold) !important; }
#search-modal-result .search-result-prev:disabled, #search-modal-result .search-result-next:disabled { opacity: .4; }
#search-modal .search-ayah { border-bottom: 1px solid var(--line) !important; padding: 14px 0 !important; }
#search-modal .search-ayah:last-child { border-bottom: 0 !important; }
#search-modal .search-ayah-open-btn { display: inline-flex; align-items: center; gap: 6px; flex-direction: row-reverse; padding: 4px 12px !important; border: 0 !important; border-radius: 999px !important; background: var(--cream) !important; color: var(--gold-text) !important; font-weight: 800; font-size: 13px; }
#search-modal .search-ayah-open-btn span { margin: 0 !important; display: inline-flex !important; }
#search-modal .search-ayah-open-btn:hover { background: var(--gold) !important; color: var(--slate) !important; }
#search-modal .search-ayah-content-arabic { font-size: 26px; line-height: 1.9; text-align: right; color: var(--slate); margin: 4px 0 6px; }
#search-modal .search-ayah-content-translation .blockquote { margin: 0; font-size: 16px; line-height: 1.6; color: var(--slate); }
#search-modal .search-ayah-content-translation .blockquote-footer { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
#search-modal .search-ayah-highlight { background: #F6E7A6; color: inherit; border-radius: 4px; padding: 0 2px; box-shadow: inset 0 -2px 0 var(--gold); }
@media (max-width: 640px) {
  #search-modal .modal-dialog { margin: 8px; }
  #search-modal .modal-body { padding: 14px !important; }
  #search-modal-search-btn { padding: 0 16px !important; }
  #search-modal .search-ayah-content-arabic { font-size: 23px; }
  #search-modal .search-ayah-content-translation .blockquote { font-size: 15px; }
}
body.night-mode #search-modal .modal-body, body.night-mode #search-modal .modal-content { background: var(--n-card) !important; color: var(--n-text); }
body.night-mode #search-modal .search-ayah-content-arabic, body.night-mode #search-modal .search-ayah-content-translation .blockquote { color: var(--n-text); }
body.night-mode #search-modal .search-ayah { border-bottom-color: var(--n-line) !important; }
body.night-mode #search-modal .search-ayah-open-btn { background: var(--n-card-2) !important; color: var(--gold) !important; }
body.night-mode #search-modal .modal-body > .row .custom-control-label, body.night-mode #search-modal-result .search-result-prev, body.night-mode #search-modal-result .search-result-next { background: var(--n-card-2) !important; color: var(--n-text) !important; border-color: var(--n-line) !important; }
body.night-mode #search-modal .search-ayah-highlight { background: rgba(196,182,108,.35); }
#search-modal .modal-header .modal-title { color: var(--cream) !important; font-size: 18px !important; font-weight: 800 !important; margin: 0; }
#search-modal .modal-header .close { background: transparent !important; }
#search-modal .modal-body > .row > [class*="col"]:last-child { flex: 1 1 auto; min-width: 0; }
#search-modal .modal-body > .row .custom-control-inline { flex-wrap: wrap; width: 100%; }
#search-modal-translation-select { flex: 1 1 160px; min-width: 0; max-width: 260px; }
#search-modal .modal-body > .row > [class*="col"]:last-child, #search-modal .modal-body > .row > [class*="col"]:last-child > .custom-control-inline { display: contents; }
#search-modal-translation-select { flex: 1 1 100%; max-width: none; }
@media (min-width: 641px) { #search-modal-translation-select { flex: 0 1 240px; } }
/* Player panels (Leren & herhalen, Opties): more breathing room, also on phones (12 nov). */
.ap-panel > .bg-primary { padding: 10px 12px 10px 16px !important; align-items: center; gap: 10px; }
.ap-panel .ap-panel-title-text { font-size: 16px; font-weight: 800; }
.ap-panel .ap-panel-close { width: 32px; height: 32px; border-radius: 999px !important; border: 1px solid #5E7276 !important; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ap-panel .ap-panel-close:hover { background: rgba(255,255,255,.1) !important; }
.ap-panel .ap-panel-body { padding: 14px 18px 20px !important; font-size: 15px; }
.ap-panel .ap-panel-body > * + * { margin-top: 10px; }
.ap-panel .ap-panel-body hr { margin: 14px 0 !important; border-color: var(--line); }
@media (max-width: 640px) {
  #ap-content > .ap-panel { left: 8px !important; right: 8px !important; margin: 0 0 8px !important; border-radius: 18px !important; border-bottom: 1px solid var(--blue-line) !important; overflow: hidden !important; }
  .ap-panel > .bg-primary { border-radius: 0 !important; }
  .ap-panel .ap-panel-body { padding: 12px 14px 16px !important; font-size: 14.5px; }
}

/* Playback speed in the Opties panel (12 nov). */
.v4-rate { margin-top: 14px; }
.v4-rate-label { font-size: 12px; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.v4-rate-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.v4-rate-btns button { min-width: 52px; height: 34px; padding: 0 10px; border: 1px solid var(--field); border-radius: 999px; background: var(--white); color: var(--slate); font: 700 14px var(--font); cursor: pointer; }
.v4-rate-btns button:hover { border-color: var(--gold); background: var(--cream-2); }
.v4-rate-btns button.is-on { background: var(--slate); border-color: var(--slate); color: #fff; }
body.night-mode .v4-rate-btns button { background: var(--n-card-2); color: var(--n-text); border-color: var(--n-line); }
body.night-mode .v4-rate-btns button.is-on { background: var(--gold); border-color: var(--gold); color: var(--slate); }

/* Mini "naar boven" button (12 nov). */
.v4-top { position: fixed; right: 16px; bottom: 16px; z-index: 1030; width: 38px; height: 38px; padding: 0; border-radius: 999px; border: 1px solid #E6EAEB; background: rgba(255,255,255,.92); color: #2E3F42; box-shadow: 0 6px 18px -8px rgba(46,63,66,.45); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s, background-color .15s; }
.v4-top.is-on { opacity: .85; visibility: visible; transform: none; }
.v4-top:hover, .v4-top:focus-visible { opacity: 1; background: #C4B66C; border-color: #C4B66C; }
@media (max-width: 640px) { .v4-top { right: 12px; width: 34px; height: 34px; } }
@media print { .v4-top { display: none !important; } }
body.night-mode .v4-top { background: rgba(24,34,36,.92); color: #E8EEEF; border-color: #33474B; }

/* Settings panel slides in from the left with rounded corners, like the Adhan Klok menu (12 nov). */
#sidebar { right: auto !important; left: -320px; width: 300px; max-width: calc(100vw - 48px); border-left: 0 !important; border-radius: 0 20px 20px 0; box-shadow: 0 0 50px -10px rgba(46,63,66,.45) !important; overflow-x: hidden; transition: left .3s ease !important; }
#sidebar.active { left: 0 !important; }
#sidebar .sidebar-header { border-radius: 0 20px 0 0; }
#sidebar #dismiss { width: 36px !important; height: 36px !important; background: var(--white) !important; border: 0 !important; box-shadow: 0 6px 18px -6px rgba(0,0,0,.5); }
#sidebar #dismiss svg { display: none; }
#sidebar #dismiss::before { content: "\00D7"; color: var(--slate); font-size: 22px; line-height: 1; font-weight: 600; margin-top: -2px; }
.overlay.active { background: rgba(46,63,66,.35) !important; }
body.night-mode #sidebar { border-radius: 0 20px 20px 0; }
#sidebar { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; height: 100vh; height: 100dvh; }

#sidebar .sidebar-header-title { display: grid !important; grid-template-columns: 38px auto; column-gap: 10px; align-items: center; line-height: 1.1 !important; font-size: 18px !important; }
#sidebar .sidebar-header-title::after { content: "Koran App"; font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: 0; margin-top: 2px; }
#sidebar .sidebar-header { padding-top: 12px !important; padding-bottom: 12px !important; }
#search-modal .modal-body > .row > [class*="col"]:first-child { flex: 0 0 auto !important; margin-right: 4px; }
#search-modal .modal-header { padding: 7px 12px 7px 18px !important; min-height: 0; }
#search-modal .modal-header .modal-title { font-size: 17px !important; line-height: 1.2; }
#search-modal .modal-header .close { width: 30px; height: 30px; font-size: 20px; }
#search-modal-translation-select { margin-top: 8px !important; }
@media (min-width: 641px) { #search-modal-translation-select { margin-top: 0 !important; } }
#search-modal-translation-select { margin-left: 0 !important; margin-right: 0 !important; }

/* Koran App help window (12 nov): button at the bottom of the settings panel, window in the V4 style. */
.v4-ah-btn { display: flex; align-items: center; gap: 12px; width: calc(100% - 8px); margin: 14px 4px 8px; padding: 9px 10px; border: 1px solid var(--gold-line); border-radius: 12px; background: var(--cream-2); color: var(--slate); font: 700 15px var(--font); text-align: left; cursor: pointer; }
.v4-ah-btn:hover { background: var(--cream); }
.v4-ah-q { flex: none; width: 34px; height: 34px; border-radius: 999px; background: var(--slate); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
html.ah-lock, html.ah-lock body { overflow: hidden !important; }
.ah { position: fixed; inset: 0; z-index: 2000; background: rgba(46,63,66,.45); display: none; align-items: center; justify-content: center; padding: 16px; font-family: var(--font); }
.ah.is-open { display: flex; }
.ah-box { width: 100%; max-width: 640px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.ah-head { flex: none; display: grid; grid-template-columns: 38px 1fr 34px; column-gap: 10px; align-items: center; padding: 12px 14px 12px 16px; background: var(--slate); border-bottom: 3px solid var(--orange); }
.ah-mark { width: 38px; height: 38px; border-radius: 11px; background: #24343A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='15 18 470 206'%3E%3Cpath d='M68 36 C88 25 101 25 119 31 L219 86 C233 94 240 116 250 124 C260 116 267 94 281 86 L381 31 C399 25 412 25 432 36 L250 139 Z' fill='%23C4B66C'/%3E%3Cpath d='M37 43 L250 157 L463 43 L477 55 L270 169 L354 217 L312 217 L250 182 L188 217 L146 217 L230 169 L23 55 Z' fill='%23FF7700'/%3E%3C/svg%3E") center / 28px auto no-repeat; }
.ah-title { color: var(--cream); font-weight: 800; font-size: 18px; line-height: 1.1; }
.ah-sub { color: var(--gold); font-weight: 700; font-size: 12px; margin-top: 2px; }
.ah-close { width: 34px; height: 34px; border: 0; border-radius: 999px; background: #fff; color: var(--slate); font-size: 22px; line-height: 1; font-weight: 600; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0,0,0,.5); padding: 0 0 2px; }
.ah-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 16px 18px 20px; color: var(--slate); font-size: 15px; line-height: 1.6; }
.ah-body a { color: var(--slate); font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.ah-lead { margin: 0 0 14px; }
.ah-faq { display: grid; gap: 8px; margin-bottom: 16px; }
.ah-faq details { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.ah-faq details[open] { border-color: var(--gold-line); }
.ah-faq summary { list-style: none; cursor: pointer; padding: 13px 46px 13px 16px; font-weight: 800; font-size: 15.5px; position: relative; color: var(--slate); }
.ah-faq summary::-webkit-details-marker { display: none; }
.ah-faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--gold-text); border-bottom: 2px solid var(--gold-text); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.ah-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ah-faq summary:hover, .ah-faq details[open] summary { background: var(--cream-2); }
.ah-faq details[open] summary { border-bottom: 1px solid var(--gold-line); }
.ah-a { padding: 12px 16px 4px; }
.ah-a p { margin: 0 0 10px; }
.ah-a ul { margin: 0 0 10px; padding-left: 20px; }
.ah-a li { margin-bottom: 6px; }
.ah-contact { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
@media (max-width: 575px) {
  .ah { padding: 10px; }
  .ah-box { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .ah-body { padding: 14px 14px 18px; font-size: 14.5px; }
  .ah-faq summary { padding: 12px 42px 12px 14px; font-size: 15px; }
  .ah-a { padding: 10px 14px 2px; }
}
body.night-mode .ah-box, body.night-mode .ah-faq details { background: var(--n-card); }
body.night-mode .ah-body, body.night-mode .ah-faq summary, body.night-mode .ah-body a { color: var(--n-text); }
body.night-mode .ah-faq summary:hover, body.night-mode .ah-faq details[open] summary { background: var(--n-card-2); }
body.night-mode .ah-faq details, body.night-mode .ah-contact { border-color: var(--n-line); }
body.night-mode .v4-ah-btn { background: var(--n-card-2); border-color: var(--n-line); color: var(--n-text); }

/* No layout shift (CLS) on the surah pages (13 nov): previous/next surah links only once the verses are there. */
body:has(#content-surah:empty) .v4-surah-nav { display: none; }

/* Header: only the word "Koran.nl", no mark next to it (15 nov). */
.brand-mark, .v4h-mark, .v4k-mark, .v4a-mark, .v4a-brand-mark, .ah-mark { display: none !important; }
/* Kop zonder blokje (21 nov): "Koran App" netjes onder "Instellingen" i.p.v. erover heen. */
#sidebar .sidebar-header-title { grid-template-columns: auto !important; row-gap: 2px; }
/* Mushaf Modus: ons logo (boek + standaard) in de kleur van de andere iconen (21 nov). */
#sidebar svg.koran-logo-ic { width: 28px !important; height: 13px !important; max-width: none !important; }
/* "Koran.nl" op dezelfde grondlijn als de menuteksten (15 nov). */
@media (min-width: 961px) { .brand-name, .v4h-name { position: relative; top: -3px; } }

/* Phone header lower (15 nov): less padding, 40px buttons. */
@media (max-width: 640px) {
  .v4h-wrap { padding-top: 6px; padding-bottom: 6px; }
  .v4h-toggle, .v4h-account, .v4h-donate { width: 40px; height: 40px; }
  .v4h-account { margin-right: 48px; }
}

/* 21 nov: Bismillah-balk wit (alleen het gouden kader), lichtere afspeelknop. */
.ayah.basmala, .ayah.basmala.ayah-playing { background: #FFFFFF !important; }
.ayah.basmala .ayah-info .btn, .ayah.basmala .ayah-info-play, .ayah.basmala .ayah-info-pause { background: var(--cream) !important; border: 1px solid var(--gold-line) !important; box-shadow: none !important; }
.ayah.basmala .ayah-info .btn, .ayah.basmala .ayah-info .btn * { color: var(--gold-t) !important; }
.ayah.basmala .ayah-info .btn:hover { background: #F3EDD6 !important; }
body.night-mode .ayah.basmala, body.night-mode .ayah.basmala.ayah-playing { background: var(--n-card) !important; }
body.night-mode .ayah.basmala .ayah-info .btn { background: #0F1719 !important; border-color: #5A5530 !important; }
body.night-mode .ayah.basmala .ayah-info .btn, body.night-mode .ayah.basmala .ayah-info .btn * { color: var(--gold) !important; }
#content .ayah.basmala .ayah-info .btn svg, #content .ayah.basmala .ayah-info .btn svg path { color: #7A6B2A !important; fill: #7A6B2A !important; }
body.night-mode #content .ayah.basmala .ayah-info .btn svg, body.night-mode #content .ayah.basmala .ayah-info .btn svg path { color: var(--gold) !important; fill: var(--gold) !important; }
