/* MAMO .com — site-wide dark mode for inner templates (posts, pages, properties, archives)
   Based on Vera's draft (2026-10-17), selectors verified on live HTML 2026-10-17 18:10 Cairo.
   Scope: html[data-theme="dark"] body.design_ultra = RealHomes templates only.
   #mamohome templates (homepage, area pages) print <body> without classes and keep their own dark theme.
   Exceptions outside that scope: (1) the header wordmark on .mamohome-header (all templates);
   (2) the breadcrumb list fix (both modes, RealHomes breadcrumbs only).
   Revert: delete wp-content/mu-plugins/007-mamo-darkmode-sitewide.php (this file is then unused). */

html[data-theme="dark"]{--mdm-bg:#0f1a24;--mdm-surface:#16232f;--mdm-surface-2:#1d2e3c;--mdm-border:rgba(243,226,182,.16);--mdm-text:#e8edf2;--mdm-muted:#b3bec8;--mdm-link:#e2b763;--mdm-link-hover:#f3e2b6}
html[data-theme="dark"]:has(body.design_ultra){color-scheme:dark;background:#0f1a24}

/* ---- page canvas ---- */
html[data-theme="dark"] body.design_ultra,
html[data-theme="dark"] body.design_ultra .rh_wrap,
html[data-theme="dark"] body.design_ultra .rh-page-container,
html[data-theme="dark"] body.design_ultra .rh-ultra-property-wrapper,
html[data-theme="dark"] body.design_ultra .rh-ultra-content-container{background-color:var(--mdm-bg)!important;color:var(--mdm-text)!important}

/* ---- text (not inside the Maria chat widget, which keeps its own light UI) ---- */
html[data-theme="dark"] body.design_ultra :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,td,th,label,blockquote,figcaption,address,strong,b,em,small,time,#mdm-x#mdm-y):not(:where(#maria-chat *,#maria-fab *,.mamo-tp-badge-footer-wrap *,.mamo-tp-text *,.site-footer-contacts *,.tour-field *,.btn,.button)){color:var(--mdm-text)!important}
html[data-theme="dark"] body.design_ultra :is(.rh-page-description,.entry-meta,.post-meta,.entry-date,.rh-ultra-property-address,.post-author-title,figcaption,.rh-page-breadcrumbs,.rh-page-breadcrumbs li){color:var(--mdm-muted)!important}
html[data-theme="dark"] body.design_ultra .rh-page-breadcrumbs a{color:var(--mdm-link)!important}

/* ---- links in content, sidebar, cards ---- */
html[data-theme="dark"] body.design_ultra :is(.entry-content,.rh_content,.rh-content-wrapper,.rh-sidebar,.mamo-related-section,.rh-ultra-property-content-box,.rh-page-head) a:not(.btn):not(.button):not(.rh-btn):not([class*="rh-btn"]):not([class*="mamo-wa"]):not(.mamo-related-card):not([style*="background"]){color:var(--mdm-link)!important}
html[data-theme="dark"] body.design_ultra :is(.entry-content,.rh_content,.rh-sidebar) a:not(.btn):not(.button):hover{color:var(--mdm-link-hover)!important}

/* ---- surfaces: cards, widgets, forms, property blocks ---- */
html[data-theme="dark"] body.design_ultra :is(.mamo-related-card,.rh-ultra-property-card-two,.rh_ultra_prop_card__meta,.rh-ultra-thumb-count,.widget,.ere-contact-form-container,.rh-ultra-form,.rh_property__sat,.ere-ultra-side-properties,.rh-ultra-property-slider-container,.mamo-calc){background-color:var(--mdm-surface)!important;border-color:var(--mdm-border)!important;color:var(--mdm-text)!important}
html[data-theme="dark"] body.design_ultra .rh_content [style*="background"]:not(img):not(.btn):not(a){background-color:var(--mdm-surface)!important;border-color:var(--mdm-border)!important}
html[data-theme="dark"] body.design_ultra .mamo-related-card *:not(img){color:var(--mdm-text)!important}

/* ---- tables ---- */
html[data-theme="dark"] body.design_ultra table{background:var(--mdm-surface)!important;border-color:var(--mdm-border)!important}
html[data-theme="dark"] body.design_ultra :is(th,thead tr,thead){background:var(--mdm-surface-2)!important;border-color:var(--mdm-border)!important}
html[data-theme="dark"] body.design_ultra td{background:transparent!important;border-color:var(--mdm-border)!important}
html[data-theme="dark"] body.design_ultra tbody tr:nth-child(even) td{background:rgba(255,255,255,.03)!important}

/* ---- quotes / code ---- */
html[data-theme="dark"] body.design_ultra :is(blockquote,.wp-block-quote){background:var(--mdm-surface-2)!important;border-left-color:#e2b763!important}
html[data-theme="dark"] body.design_ultra :is(code,pre){background:#0b141c!important;color:var(--mdm-text)!important}

/* ---- form fields ---- */
html[data-theme="dark"] body.design_ultra :is(input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]),select,textarea,.rh-ultra-form-field-wrapper,.bootstrap-select>.dropdown-toggle):not(:where(#maria-chat *)){background-color:#0b141c!important;color:var(--mdm-text)!important;border-color:rgba(243,226,182,.28)!important}
html[data-theme="dark"] body.design_ultra :is(input,textarea)::placeholder{color:#8f9ba6!important;opacity:1}

/* ---- site footer: links were navy on navy ---- */
html[data-theme="dark"] body.design_ultra .site-footer a:not(.rh-ultra-footer-number){color:#e2b763!important}
html[data-theme="dark"] body.design_ultra .site-footer .site-footer-contacts{background:var(--mdm-surface)!important}
html[data-theme="dark"] body.design_ultra .site-footer .site-footer-contacts :is(span,p,h3,h4){color:var(--mdm-text)!important}
html[data-theme="dark"] body.design_ultra .site-footer .rh-ultra-footer-number{background:var(--mdm-surface-2)!important;color:var(--mdm-text)!important}
html[data-theme="dark"] body.design_ultra .site-footer .rh-ultra-footer-number svg{fill:#e2b763!important}

/* ---- trust footer + Trustpilot strip ---- */
html[data-theme="dark"] body.design_ultra #mamo-trust-footer,
html[data-theme="dark"] body.design_ultra .mamo-tp-badge-footer-wrap{background:#0b141c!important;border-color:var(--mdm-border)!important}
html[data-theme="dark"] body.design_ultra #mamo-trust-footer :is(p,li,span,div,b,strong,h2,h3,h4){color:var(--mdm-text)!important}
html[data-theme="dark"] body.design_ultra #mamo-trust-footer a{color:#e2b763!important}

/* ---- property components (spans/links with hard-coded navy/#1a1a1a) ---- */
html[data-theme="dark"] body.design_ultra :is(.rh-ultra-meta-box,.rh_ultra_meta_box,.rh_prop_card__price_ultra,.added-date,.rh-ultra-property-tags,.rh-ultra-status-box,.rh-ultra-property-tag-wrapper,.rh-ultra-thumb-count,.rh-ultra-property-card-two-content,.rh-ultra-property-card-two-title,.mamo-calc-row,.entry-categories) :is(span,a,div,p):not(.btn):not(.rh-ultra-property-card-two-link){color:var(--mdm-text)!important}
html[data-theme="dark"] body.design_ultra :is(.rh-ultra-property-card-two-title a,.rh-ultra-property-card-two-title,.entry-categories a){color:var(--mdm-text)!important}
html[data-theme="dark"] body.design_ultra :is(.rh-ultra-property-tags,.rh-ultra-status-box) :is(a,span){border-color:rgba(243,226,182,.4)!important}
html[data-theme="dark"] body.design_ultra :is(.mamo-calc-label,.rh-ultra-property-card-two-address,.added-title){color:var(--mdm-muted)!important}
html[data-theme="dark"] body.design_ultra .mamo-calc-monthly-big{color:#3ddc97!important}
html[data-theme="dark"] body.design_ultra .site-footer .widget{background:transparent!important;border:0!important}
html[data-theme="dark"] body.design_ultra .tour-field label:not(#mdm-x):not(#mdm-y):not(#mdm-z){color:#fff!important}
html[data-theme="dark"] body.design_ultra :is(.mamo-map-link,.similar-properties-filters-wrapper .rh-btn-primary){color:var(--mdm-link)!important}
html[data-theme="dark"] body.design_ultra .similar-properties-filters-wrapper .rh-btn-primary{border-color:rgba(243,226,182,.4)!important}
/* widgets that keep a white UI in dark mode: give their text back its light-mode colour */
html[data-theme="dark"] body.design_ultra :is(#maria-chat,.mamo-tp-text){color:#0b132b!important}
html[data-theme="dark"] body.design_ultra .mamo-tp-text :is(strong,span,b):not(#mdm-x):not(#mdm-y):not(#mdm-z){color:#0b132b!important}

/* ---- header (posts/properties): ghost button text was navy on the dark bar ---- */
html[data-theme="dark"] body.design_ultra .mamohome-header .navcta .btn-ghost{color:#eef4f4!important;border-color:rgba(243,226,182,.55)!important}

/* ---- wordmark: "MAMO" <b> rendered #1a1a1a on the dark header (posts, properties, area pages).
   Same colour the homepage already computes (#eef4f4), so the homepage is unchanged. ---- */
html[data-theme="dark"] :is(.mamohome-header,header.nav,.fgrid) .logo b{color:#eef4f4!important}

/* ---- breadcrumbs rendered as a numbered list (#53) — both modes ---- */
.rh-page-breadcrumbs ol.breadcrumbs{list-style:none!important;padding:0!important;margin:0 0 8px!important;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.rh-page-breadcrumbs ol.breadcrumbs>li.breadcrumb-item{list-style:none!important;margin:0!important;padding:0!important;display:inline-flex;align-items:center}
.rh-page-breadcrumbs ol.breadcrumbs>li.breadcrumb-item+li.breadcrumb-item::before{content:"›";margin-inline-end:6px;opacity:.6}
.rh-page-breadcrumbs ol.breadcrumbs>li.breadcrumb-item::marker{content:none}
