/* ==========================================================================
   HowJamaica sitewide contrast fix — 2026-11-05
   Theme: html[data-theme="light"|"dark"] + localStorage hj_theme
   Problem: blanket light-theme rules force dark h1–h4/p colors with
   !important onto dark-background cards (sidebar ads, services dropdown,
   FAQ/author cards, strip promos, modals), making text unreadable.
   This sheet re-asserts light text on dark surfaces and dark text on light
   surfaces in both themes. Load AFTER hj-style.css.
   ========================================================================== */

/* ---------- Dark surfaces: always light text (both themes) ---------- */
.hj-services-dropdown,
.hj-services-dropdown .hj-svc-item,
.hj-services-dropdown .hj-svc-item strong,
.hj-services-dropdown .hj-svc-item span,
.hj-services-dropdown .hj-svc-item small,
.stealth-promo-alpha,
.stealth-promo-alpha h1,
.stealth-promo-alpha h2,
.stealth-promo-alpha h3,
.stealth-promo-alpha h4,
.stealth-promo-alpha p,
.stealth-promo-alpha span,
.stealth-promo-alpha strong,
.stealth-promo-blink,
.stealth-promo-blink h1,
.stealth-promo-blink h2,
.stealth-promo-blink h3,
.stealth-promo-blink h4,
.stealth-promo-blink p,
.stealth-promo-blink span,
.stealth-promo-blink strong,
.stealth-promo-cashapp,
.stealth-promo-cashapp h1,
.stealth-promo-cashapp h2,
.stealth-promo-cashapp h3,
.stealth-promo-cashapp h4,
.stealth-promo-cashapp p,
.stealth-promo-cashapp span:not([style*="background"]),
.stealth-promo-cashapp strong,
.stealth-promo-cashapp div,
.hj-html-banner,
.hj-html-banner h1,
.hj-html-banner h2,
.hj-html-banner h3,
.hj-html-banner h4,
.hj-html-banner p,
.hj-html-banner span,
.hj-html-banner strong,
.hj-html-banner .hj-hb-title,
.hj-html-banner .hj-hb-desc,
.service-contact-callout,
.service-contact-callout h1,
.service-contact-callout h2,
.service-contact-callout h3,
.service-contact-callout h4,
.service-contact-callout p,
.service-contact-callout .scc-title,
.service-contact-callout .scc-desc,
.service-contact-callout .scc-footer,
.toolkit-cta-card,
.toolkit-cta-card h1,
.toolkit-cta-card h2,
.toolkit-cta-card h3,
.toolkit-cta-card h4,
.toolkit-cta-card p,
.art-faq-section,
.art-faq-section h1,
.art-faq-section h2,
.art-faq-section h3,
.art-faq-section h4,
.art-faq-section p,
.art-faq-card,
.art-faq-card h3,
.art-faq-card p,
.art-author-card,
.art-author-card h1,
.art-author-card h2,
.art-author-card h3,
.art-author-card h4,
.art-author-card p,
.art-author-card a,
.art-author-card div,
.hjp-strip .hjp,
.hjp-strip .hjp .hjp-title,
.hjp-strip .hjp .hjp-copy,
.hjp-strip .hjp .hjp-kicker,
.hjp-strip .hjp .hjp-price,
.hjp-strip .hjp .hjp-price strong,
.hjp-strip .hjp .hjp-price span,
.hjp-strip .hjp .hjp-trust,
.hjp-strip .hjp p,
#jos-promo-modal .jos-modal-card,
#jos-promo-modal .jos-modal-card h1,
#jos-promo-modal .jos-modal-card h2,
#jos-promo-modal .jos-modal-card h3,
#jos-promo-modal .jos-modal-card h4,
#jos-promo-modal .jos-modal-card p,
#jos-promo-modal .jos-modal-card span,
#jos-promo-modal .jos-modal-card strong,
#jos-promo-modal .jos-modal-card .jos-modal-title,
#jos-promo-modal .jos-modal-card .jos-modal-sub,
#jos-promo-modal .jos-modal-card .jos-perk-item,
#jos-promo-modal .jos-modal-card .jos-modal-guarantee {
  color: #F1F5F9 !important;
}

/* Body copy on dark surfaces — bright slate for WCAG AA+ on black/purple */
.hj-services-dropdown .hj-svc-item small {
  color: #CBD5E1 !important;
}
.stealth-promo-alpha p,
.stealth-promo-blink p,
.stealth-promo-cashapp p,
.sidebar-widget-wrapper a[style*="background:#121212"] p,
.sidebar-widget-wrapper a[style*="background: #121212"] p,
.sidebar-widget-wrapper a[style*="#1e1b4b"] p,
.sidebar-widget-wrapper a[style*="#4c1d95"] p {
  color: #F1F5F9 !important;
  font-weight: 500 !important;
}
.service-contact-callout .scc-desc,
.service-contact-callout .scc-footer,
.art-faq-card p,
.art-author-card p,
.hjp-strip .hjp .hjp-copy,
.hjp-strip .hjp .hjp-trust,
.hjp-strip .hjp .hjp-price span,
#jos-promo-modal .jos-modal-card .jos-modal-sub,
#jos-promo-modal .jos-modal-card .jos-modal-guarantee {
  color: #E2E8F0 !important;
}

/* Brand accents that must stay colored on dark ads */
.stealth-promo-alpha h3 {
  color: #FF6B73 !important; /* Deriv red, readable on #121212 */
}
.stealth-promo-blink h3 {
  color: #FFFFFF !important;
}
.stealth-promo-cashapp h4,
.stealth-promo-cashapp h3 {
  color: #FFFFFF !important;
}

/* Preserve green accents inside Cash App / SCC badges */
.stealth-promo-cashapp [style*="#00D632"],
.service-contact-callout .scc-badge,
.service-contact-callout .scc-phone-link {
  color: #34D399 !important;
}

/* CTA buttons on dark ads keep their designed contrast */
.stealth-promo-alpha span[style*="background:#ff444f"],
.stealth-promo-blink span[style*="background:#a855f7"],
.stealth-promo-cashapp a[href*="cash.app"] {
  color: #FFFFFF !important;
}
.stealth-promo-cashapp a[href*="cash.app"] {
  color: #000000 !important;
}

/* Dark-mode base ad cards (when not flipped to white) */
html[data-theme="dark"] .hj-ad-card,
html[data-theme="dark"] .hj-ad-card .hj-ad-title,
html[data-theme="dark"] .hj-ad-card .hj-ad-desc,
html[data-theme="dark"] .hj-ad-card .hj-ad-checklist li,
html[data-theme="dark"] .hj-tool-card,
html[data-theme="dark"] .hj-tool-card h4,
html[data-theme="dark"] .hj-concierge-card {
  color: #F8FAFC !important;
}
html[data-theme="dark"] .hj-ad-card .hj-ad-desc,
html[data-theme="dark"] .hj-ad-card .hj-ad-desc.slate {
  color: #CBD5E1 !important;
}

/* Light theme: white-flipped ad/tool cards keep dark text */
html[data-theme="light"] .hj-ad-card,
html[data-theme="light"] .hj-ad-card .hj-ad-title,
html[data-theme="light"] .hj-ad-card h1,
html[data-theme="light"] .hj-ad-card h2,
html[data-theme="light"] .hj-ad-card h3,
html[data-theme="light"] .hj-ad-card h4,
html[data-theme="light"] .hj-ad-card p,
html[data-theme="light"] .hj-tool-card,
html[data-theme="light"] .hj-tool-card h4,
html[data-theme="light"] .hj-tool-card p,
html[data-theme="light"] .hjp,
html[data-theme="light"] .hjp .hjp-title,
html[data-theme="light"] .hjp .hjp-copy,
html[data-theme="light"] .hjp p,
html[data-theme="light"] .info-panel,
html[data-theme="light"] .info-panel h3,
html[data-theme="light"] .art-summary-card,
html[data-theme="light"] .art-summary-card p,
html[data-theme="light"] .art-summary-text,
html[data-theme="light"] .article-cta,
html[data-theme="light"] .article-cta h3,
html[data-theme="light"] .article-cta p,
html[data-theme="light"] .hj-bottom-callout,
html[data-theme="light"] .hj-bottom-callout h3,
html[data-theme="light"] .hj-bottom-callout p,
html[data-theme="light"] .card,
html[data-theme="light"] .card-title,
html[data-theme="light"] .card-title a,
html[data-theme="light"] .card-excerpt {
  color: #0F172A !important;
}
html[data-theme="light"] .hj-ad-card .hj-ad-desc,
html[data-theme="light"] .hjp .hjp-copy,
html[data-theme="light"] .art-summary-text,
html[data-theme="light"] .article-cta p,
html[data-theme="light"] .hj-bottom-callout p,
html[data-theme="light"] .card-excerpt {
  color: #334155 !important;
}

/* Strip promos keep dark glass look — force light text even in light theme */
html[data-theme="light"] .hjp-strip .hjp,
html[data-theme="light"] .hjp-strip .hjp .hjp-title,
html[data-theme="light"] .hjp-strip .hjp .hjp-price strong,
html[data-theme="light"] .hjp-strip .hjp p.hjp-title {
  color: #FFFFFF !important;
}
html[data-theme="light"] .hjp-strip .hjp .hjp-copy,
html[data-theme="light"] .hjp-strip .hjp .hjp-trust,
html[data-theme="light"] .hjp-strip .hjp .hjp-price span,
html[data-theme="light"] .hjp-strip .hjp p.hjp-copy {
  color: #CBD5E1 !important;
}

/* Override blanket light-theme h1–h4/p inside known dark containers */
html[data-theme="light"] .hj-services-dropdown h1,
html[data-theme="light"] .hj-services-dropdown h2,
html[data-theme="light"] .hj-services-dropdown h3,
html[data-theme="light"] .hj-services-dropdown h4,
html[data-theme="light"] .hj-services-dropdown p,
html[data-theme="light"] .hj-services-dropdown strong,
html[data-theme="light"] .hj-services-dropdown small,
html[data-theme="light"] .stealth-promo-alpha h1,
html[data-theme="light"] .stealth-promo-alpha h2,
html[data-theme="light"] .stealth-promo-alpha h3,
html[data-theme="light"] .stealth-promo-alpha h4,
html[data-theme="light"] .stealth-promo-alpha p,
html[data-theme="light"] .stealth-promo-blink h1,
html[data-theme="light"] .stealth-promo-blink h2,
html[data-theme="light"] .stealth-promo-blink h3,
html[data-theme="light"] .stealth-promo-blink h4,
html[data-theme="light"] .stealth-promo-blink p,
html[data-theme="light"] .stealth-promo-cashapp h1,
html[data-theme="light"] .stealth-promo-cashapp h2,
html[data-theme="light"] .stealth-promo-cashapp h3,
html[data-theme="light"] .stealth-promo-cashapp h4,
html[data-theme="light"] .stealth-promo-cashapp p,
html[data-theme="light"] .art-faq-section h1,
html[data-theme="light"] .art-faq-section h2,
html[data-theme="light"] .art-faq-section h3,
html[data-theme="light"] .art-faq-section h4,
html[data-theme="light"] .art-faq-section p,
html[data-theme="light"] .art-author-card h1,
html[data-theme="light"] .art-author-card h2,
html[data-theme="light"] .art-author-card h3,
html[data-theme="light"] .art-author-card h4,
html[data-theme="light"] .art-author-card p,
html[data-theme="light"] .service-contact-callout h1,
html[data-theme="light"] .service-contact-callout h2,
html[data-theme="light"] .service-contact-callout h3,
html[data-theme="light"] .service-contact-callout h4,
html[data-theme="light"] .service-contact-callout p,
html[data-theme="light"] .toolkit-cta-card h1,
html[data-theme="light"] .toolkit-cta-card h2,
html[data-theme="light"] .toolkit-cta-card h3,
html[data-theme="light"] .toolkit-cta-card h4,
html[data-theme="light"] .toolkit-cta-card p,
html[data-theme="light"] .hj-html-banner h1,
html[data-theme="light"] .hj-html-banner h2,
html[data-theme="light"] .hj-html-banner h3,
html[data-theme="light"] .hj-html-banner h4,
html[data-theme="light"] .hj-html-banner p,
html[data-theme="light"] #jos-promo-modal h1,
html[data-theme="light"] #jos-promo-modal h2,
html[data-theme="light"] #jos-promo-modal h3,
html[data-theme="light"] #jos-promo-modal h4,
html[data-theme="light"] #jos-promo-modal p,
html[data-theme="light"] .hjp-strip .hjp h1,
html[data-theme="light"] .hjp-strip .hjp h2,
html[data-theme="light"] .hjp-strip .hjp h3,
html[data-theme="light"] .hjp-strip .hjp h4,
html[data-theme="light"] .hjp-strip .hjp p {
  color: #F1F5F9 !important;
}
html[data-theme="light"] .stealth-promo-alpha h3 { color: #FF6B73 !important; }
html[data-theme="light"] .stealth-promo-alpha p,
html[data-theme="light"] .stealth-promo-blink p {
  color: #F1F5F9 !important;
}
html[data-theme="light"] .art-faq-card p,
html[data-theme="light"] .art-author-card p,
html[data-theme="light"] .service-contact-callout .scc-desc,
html[data-theme="light"] #jos-promo-modal .jos-modal-sub,
html[data-theme="light"] .hjp-strip .hjp p.hjp-copy {
  color: #E2E8F0 !important;
}
html[data-theme="light"] .stealth-promo-blink h3 { color: #FFFFFF !important; }
html[data-theme="light"] .hj-services-dropdown .hj-svc-item { color: #E2E8F0 !important; }
html[data-theme="light"] .hj-services-dropdown .hj-svc-item strong { color: #F8FAFC !important; }
html[data-theme="light"] .hj-services-dropdown .hj-svc-item small { color: #94A3B8 !important; }

/* Dark theme: keep prose/cards readable (light text on dark page) */
html[data-theme="dark"] .prose,
html[data-theme="dark"] .prose p,
html[data-theme="dark"] .prose li {
  color: #CBD5E1 !important;
}
html[data-theme="dark"] .prose h2,
html[data-theme="dark"] .prose h3,
html[data-theme="dark"] .art-title,
html[data-theme="dark"] .art-title-v2 {
  color: #F8FAFC !important;
}

/* Inline dark FAQ / author blocks (style attrs) — belt & suspenders */
.art-faq-section h2 { color: #FFFFFF !important; }
.art-faq-card h3,
html[data-theme="light"] .art-faq-section .art-faq-card h3,
html[data-theme="dark"] .art-faq-section .art-faq-card h3 { color: #38BDF8 !important; }
.art-faq-card p { color: #CBD5E1 !important; }
.art-author-card h3,
.art-author-card h3 a { color: #F8FAFC !important; }
.art-author-card p { color: #CBD5E1 !important; }

/* Community newsletter / diaspora modal if present with dark card */
.hj-newsletter-card[style*="0f172a"] h1,
.hj-newsletter-card[style*="0f172a"] h2,
.hj-newsletter-card[style*="0f172a"] h3,
.hj-newsletter-card[style*="0f172a"] p,
.diaspora-modal-card h1,
.diaspora-modal-card h2,
.diaspora-modal-card h3,
.diaspora-modal-card p {
  color: #F1F5F9 !important;
}

/* Search page / overlays that share site chrome */
html[data-theme="light"] .search-result-card,
html[data-theme="light"] .search-result-card h2,
html[data-theme="light"] .search-result-card h3,
html[data-theme="light"] .search-result-card p {
  color: #0F172A !important;
}
html[data-theme="dark"] .search-result-card h2,
html[data-theme="dark"] .search-result-card h3 {
  color: #F8FAFC !important;
}
html[data-theme="dark"] .search-result-card p {
  color: #CBD5E1 !important;
}

/* Footer stays dark in both themes — light muted text */
.site-footer,
.footer,
footer.site-footer,
.foot-desc,
.foot-links a,
.footer-bottom {
  color: var(--foot-muted, #94A3B8);
}
.foot-logo { color: var(--foot-text, #F8FAFC); }

/* Catch-all: any sidebar widget link/card with near-black / purple inline bg */
.sidebar-widget-wrapper a[style*="background:#121212"] h3,
.sidebar-widget-wrapper a[style*="background:#121212"] p,
.sidebar-widget-wrapper a[style*="background: #121212"] h3,
.sidebar-widget-wrapper a[style*="background: #121212"] p,
.sidebar-widget-wrapper a[style*="#1e1b4b"] h3,
.sidebar-widget-wrapper a[style*="#1e1b4b"] p,
.sidebar-widget-wrapper a[style*="#4c1d95"] h3,
.sidebar-widget-wrapper a[style*="#4c1d95"] p {
  color: #F1F5F9 !important;
}
.sidebar-widget-wrapper a[style*="background:#121212"] h3,
.sidebar-widget-wrapper a[style*="background: #121212"] h3 {
  color: #FF6B73 !important;
}
.sidebar-widget-wrapper a[style*="background:#121212"] p,
.sidebar-widget-wrapper a[style*="background: #121212"] p,
.sidebar-widget-wrapper a[style*="#1e1b4b"] p,
.sidebar-widget-wrapper a[style*="#4c1d95"] p {
  color: #F1F5F9 !important;
  font-weight: 500 !important;
}
