/* Masjid Ibrahim v10: full-theme welcome dialog and overlay contrast fixes.
   Popup is mounted directly beneath <body>, outside the themed app shell.
   Use the same theme tokens for its entire surface and all nested content. */
:root[data-theme="light"]{
  --welcome-bg:#fffaf0;
  --welcome-ink:#17392b;
  --welcome-sub:#415d4b;
  --welcome-arabic:#1b4d37;
  --welcome-eyebrow:#78521c;
  --welcome-link:#175f43;
  --welcome-border:#d6c6a5;
  --welcome-close-bg:#f2ead9;
  --welcome-close-ink:#224735;
  --welcome-button-bg:#19533b;
  --welcome-button-ink:#ffffff;
  --welcome-button-hover:#246448;
  --welcome-overlay:rgba(5,26,20,.78);
}
:root[data-theme="dark"]{
  --welcome-bg:#1b3028;
  --welcome-ink:#f1f6ec;
  --welcome-sub:#dae8dc;
  --welcome-arabic:#f4dcaa;
  --welcome-eyebrow:#f0cd8b;
  --welcome-link:#c5f2d2;
  --welcome-border:#6e815f;
  --welcome-close-bg:#2c4839;
  --welcome-close-ink:#f1f6ec;
  --welcome-button-bg:#bce7c7;
  --welcome-button-ink:#103222;
  --welcome-button-hover:#d0f5d8;
  --welcome-overlay:rgba(1,9,8,.85);
}
:root[data-theme] #daily-dua-popup.dua-overlay {
  background:var(--welcome-overlay)!important;
  color:var(--welcome-ink)!important;
  overscroll-behavior:contain;
  padding:max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom));
}
:root[data-theme] #daily-dua-popup .dua-modal {
  background:var(--welcome-bg)!important;
  background-image:none!important;
  color:var(--welcome-ink)!important;
  border:1px solid var(--welcome-border)!important;
  box-shadow:0 26px 88px rgba(0,0,0,.32)!important;
  border-radius:19px;
  width:min(100%,570px);
  max-height:min(89dvh,800px);
  overflow-y:auto;
  padding:clamp(23px,4vw,38px);
  scrollbar-color:var(--welcome-border) transparent;
}
:root[data-theme] #daily-dua-popup .dua-modal h2,
:root[data-theme] #daily-dua-popup .dua-modal strong{
  color:var(--welcome-ink)!important;
}
:root[data-theme] #daily-dua-popup .dua-modal .eyebrow{
  color:var(--welcome-eyebrow)!important;
  padding-right:46px;
}
:root[data-theme] #daily-dua-popup .dua-modal .dua-arabic {
  color:var(--welcome-arabic)!important;
  font-family:'Amiri','Times New Roman',serif;
  font-size:clamp(27px,4vw,34px);
  line-height:2.05;
  text-align:right;
  overflow-wrap:anywhere;
}
:root[data-theme] #daily-dua-popup .dua-modal .dua-english,
:root[data-theme] #daily-dua-popup .dua-modal p {
  color:var(--welcome-sub)!important;
  line-height:1.85;
}
:root[data-theme] #daily-dua-popup .dua-modal .text-link {
  color:var(--welcome-link)!important;
  font-weight:750;
  text-underline-offset:3px;
  text-decoration:underline;
}
:root[data-theme] #daily-dua-popup .dua-modal .modal-close {
  background:var(--welcome-close-bg)!important;
  color:var(--welcome-close-ink)!important;
  border:1px solid var(--welcome-border)!important;
  display:grid;
  place-items:center;
  font-family:Arial,sans-serif;
  font-size:22px;
  width:38px;
  height:38px;
  line-height:1;
  right:15px;
  top:15px;
}
:root[data-theme] #daily-dua-popup .dua-modal .modal-close:hover {
  filter:brightness(1.08);
}
:root[data-theme] #daily-dua-popup .dua-modal .btn:not(.ghost) {
  background:var(--welcome-button-bg)!important;
  color:var(--welcome-button-ink)!important;
  border:1px solid var(--welcome-button-bg)!important;
  min-height:44px;
}
:root[data-theme] #daily-dua-popup .dua-modal .btn:not(.ghost):hover {
  background:var(--welcome-button-hover)!important;
  border-color:var(--welcome-button-hover)!important;
}
:root[data-theme] #daily-dua-popup .dua-modal :is(button,a):focus-visible {
  outline:3px solid var(--welcome-eyebrow);
  outline-offset:3px;
}
body.dua-dialog-open { overflow:hidden; }
/* Ensure prayer reminder focus cards use theme-consistent gold labels and CTA. */
:root[data-theme] .v6-prayer-focus-card .v6-focus-time{color:var(--ui-link)!important}
:root[data-theme] .v6-prayer-focus-card .v6-focus-dismiss{color:var(--ui-link)!important}
:root[data-theme] .v6-prayer-focus-card .eyebrow{color:var(--ui-eyebrow)!important}
:root[data-theme] .v6-prayer-focus-card .btn.ghost{background:var(--ui-soft)!important;color:var(--ink)!important;border-color:var(--border)!important}
@media(max-width:590px){
  :root[data-theme] #daily-dua-popup .dua-modal {padding:24px 19px;max-height:calc(100dvh - 28px)}
  :root[data-theme] #daily-dua-popup .dua-modal .dua-arabic{font-size:27px;line-height:1.95}
  :root[data-theme] #daily-dua-popup .dua-modal .btn{width:100%}
}
@media(prefers-reduced-motion:reduce){
  :root[data-theme] #daily-dua-popup{backdrop-filter:none}
}
