/*
 * Glow Studio DIY — dark mode remap
 * ---------------------------------------------------------------------------
 * The inherited dark stylesheet is a complete, well-structured surface map,
 * but it was built for a navy/coral brand. This file changes only the hues:
 * navy blacks become warm charcoal, coral becomes light violet, and the
 * highlight becomes champagne gold. No component rules are rewritten.
 *
 * Selectors mirror the scopes the inherited file uses, with one extra step of
 * specificity so the values win without !important.
 */

html[data-mb-theme="dark"],
html[data-mb-theme="dark"] body,
html[data-mb-theme="dark"] body * {
	/* Glow Studio warm-charcoal dark surfaces */
	--mb-dark-bg: #171615;
	--mb-dark-bg-2: #1c1b19;
	--mb-dark-surface: #232220;
	--mb-dark-surface-2: #2b2926;
	--mb-dark-surface-3: #333029;
	--mb-dark-green-surface: #1d2a28;
	--mb-dark-warm-surface: #2a2420;
	--mb-dark-text: #ece7de;
	--mb-dark-muted: #b6b0a5;
	--mb-dark-subtle: #98928a;
	--mb-dark-border: rgba(240, 235, 225, .14);
	--mb-dark-border-strong: rgba(240, 235, 225, .22);

	/* Header / global aliases */
	--mb-header-navy: #f2eee6;
	--mb-header-coral: #b18cff;
	--mb-header-mint: #2a2340;
	--mb-header-green: #23d7d0;
	--mb-header-yellow: #d9b978;

	/* Card + recipe-card token family */
	--tlcl-navy: #f2eee6;
	--tlcl-navy-deep: #ffffff;
	--tlcl-ink: #ece7de;
	--tlcl-text: #ece7de;
	--tlcl-muted: #b6b0a5;
	--tlcl-fog: #232220;
	--tlcl-border: #3a3733;
	--tlcl-white: #232220;
	--tlcl-mint: #2a2340;
	--tlcl-mint-soft: #221f2e;
	--tlcl-coral: #b18cff;
	--tlcl-coral-soft: #b18cff;
	--tlcl-green: #23d7d0;
	--tlcl-green-btn: #23d7d0;
	--tlcl-yellow: #d9b978;
	--tlcl-gold: #d9b978;

	/* Homepage reference palette */
	--mb-white: #232220;
	--mb-black: #ece7de;
	--mb-fog: #232220;
	--mb-mint: #2a2340;
	--mb-mint-soft: #221f2e;
	--mb-navy: #f2eee6;
	--mb-coral: #b18cff;
	--mb-green: #23d7d0;
	--mb-yellow: #d9b978;

	/* ADABrothers component tokens */
	--ada-ink: #ece7de;
	--ada-muted: #b6b0a5;
	--ada-fog: #232220;
	--ada-warm: #2a2420;
	--ada-white: #232220;
	--ada-border: #3a3733;
	--ada-navy: #f2eee6;
	--ada-coral: #b18cff;
	--ada-gold: #d9b978;

	--comment-rating-star-color: #d9b978;
}

/* Editorial About page ------------------------------------------------- */

html[data-mb-theme="dark"] body .ger-about-page,
html[data-mb-theme="dark"] body .ger-about-page * {
	--ger-ink: #ece7de;
	--ger-deep: #f7f3ec;
	--ger-sage: #b6b0a5;
	--ger-sage-soft: #2a2340;
	--ger-cream: #1c1b19;
	--ger-warm: #2a2420;
	--ger-gold: #d9b978;
	--ger-rust: #b18cff;
	--ger-white: #232220;
	--ger-muted: #b6b0a5;
	--ger-border: rgba(240, 235, 225, .14);
}

/* Editorial Contact page ------------------------------------------------ */

html[data-mb-theme="dark"] body .ger-contact-page,
html[data-mb-theme="dark"] body .ger-contact-page * {
	--gerc-ink: #ece7de;
	--gerc-deep: #f7f3ec;
	--gerc-sage: #b6b0a5;
	--gerc-sage-soft: #2a2340;
	--gerc-cream: #1c1b19;
	--gerc-warm: #2a2420;
	--gerc-gold: #d9b978;
	--gerc-rust: #b18cff;
	--gerc-white: #232220;
	--gerc-muted: #b6b0a5;
	--gerc-border: rgba(240, 235, 225, .14);
}

/* Projects hub, project index, search, 404, author archives ------------- */

html[data-mb-theme="dark"] body .mb-recipes-hub,
html[data-mb-theme="dark"] body [class*="mb-recipes-hub"],
html[data-mb-theme="dark"] body [class*="mb-recipes-hub"] * {
	--rh-ink: #ece7de;
	--rh-muted: #b6b0a5;
	--rh-cream: #1c1b19;
	--rh-mint: #2a2340;
	--rh-white: #232220;
	--rh-border: rgba(240, 235, 225, .14);
	--rp-ink: #ece7de;
	--rp-muted: #b6b0a5;
	--rp-cream: #1c1b19;
	--rp-white: #232220;
	--rp-navy: #f2eee6;
	--rp-coral: #b18cff;
}

html[data-mb-theme="dark"] body .mb-recipe-index-page,
html[data-mb-theme="dark"] body .mb-recipe-index-page * {
	--ri-navy: #f4f0e8;
	--ri-navy-2: #ffffff;
	--ri-ink: #ece7de;
	--ri-muted: #b6b0a5;
	--ri-cream: #1c1b19;
	--ri-white: #232220;
	--ri-coral: #b18cff;
	--ri-mint: #2a2340;
	--ri-green: #23d7d0;
	--ri-yellow: #d9b978;
	--ri-border: rgba(240, 235, 225, .14);
}

html[data-mb-theme="dark"] body .mb-search-page,
html[data-mb-theme="dark"] body .mb-search-page * {
	--sr-navy: #f4f0e8;
	--sr-deep: #171615;
	--sr-ink: #ece7de;
	--sr-muted: #b6b0a5;
	--sr-cream: #1c1b19;
	--sr-coral: #b18cff;
	--sr-mint: #2a2340;
	--sr-green: #23d7d0;
	--sr-yellow: #d9b978;
	--sr-border: #3a3733;
}

html[data-mb-theme="dark"] body .mb-404-page,
html[data-mb-theme="dark"] body .mb-404-page * {
	--nf-navy: #f4f0e8;
	--nf-deep: #171615;
	--nf-cream: #232220;
	--nf-ink: #ece7de;
	--nf-muted: #b6b0a5;
	--nf-border: #3a3733;
	--nf-coral: #b18cff;
	--nf-mint: #2a2340;
	--nf-green: #23d7d0;
	--nf-yellow: #d9b978;
}

html[data-mb-theme="dark"] body .mb-author-page,
html[data-mb-theme="dark"] body .mb-author-page * {
	--ap-navy: #f4f0e8;
	--ap-ink: #ece7de;
	--ap-muted: #b6b0a5;
	--ap-cream: #1c1b19;
	--ap-mint: #2a2340;
	--ap-green: #23d7d0;
	--ap-coral: #b18cff;
	--ap-yellow: #d9b978;
	--ap-border: rgba(240, 235, 225, .14);
}

/* Glow Studio page system in dark ---------------------------------------- */

html[data-mb-theme="dark"] .gs-home,
html[data-mb-theme="dark"] .gs-page {
	background: #171615;
}

html[data-mb-theme="dark"] .gs-hero,
html[data-mb-theme="dark"] .gs-feature-light,
html[data-mb-theme="dark"] .gs-legal-head {
	background: #1c1b19;
}

html[data-mb-theme="dark"] .gs-promise,
html[data-mb-theme="dark"] .gs-victoria {
	background: #232220;
}

html[data-mb-theme="dark"] .gs-newsletter {
	background: #2b2926;
}

html[data-mb-theme="dark"] .gs-cat-card {
	background: #232220;
	border-color: #3a3733;
}

html[data-mb-theme="dark"] .gs-empty {
	background: #232220;
	border-color: #3a3733;
	color: #b6b0a5;
}

html[data-mb-theme="dark"] .gs-legal-note {
	background: #232220;
}

html[data-mb-theme="dark"] .gs-hero-title,
html[data-mb-theme="dark"] .gs-section-title,
html[data-mb-theme="dark"] .gs-legal-title,
html[data-mb-theme="dark"] .gs-cat-title a,
html[data-mb-theme="dark"] .gs-latest-title a,
html[data-mb-theme="dark"] .gs-promise-copy,
html[data-mb-theme="dark"] .gs-legal-body h2 {
	color: #f4f0e8;
}

html[data-mb-theme="dark"] .gs-hero-lead,
html[data-mb-theme="dark"] .gs-feature-lead,
html[data-mb-theme="dark"] .gs-victoria-lead,
html[data-mb-theme="dark"] .gs-legal-body p,
html[data-mb-theme="dark"] .gs-legal-body li {
	color: #ddd7cc;
}

html[data-mb-theme="dark"] .gs-cat-copy,
html[data-mb-theme="dark"] .gs-legal-meta {
	color: #b6b0a5;
}

html[data-mb-theme="dark"] .gs-eyebrow,
html[data-mb-theme="dark"] .gs-footer-col-title,
html[data-mb-theme="dark"] .mb-404-kicker,
html[data-mb-theme="dark"] .mb-author-eyebrow,
html[data-mb-theme="dark"] .ger-about-eyebrow,
html[data-mb-theme="dark"] .ger-about-kicker,
html[data-mb-theme="dark"] .ger-contact-kicker,
html[data-mb-theme="dark"] .ger-contact-form-eyebrow,
html[data-mb-theme="dark"] .ger-about-team-role,
html[data-mb-theme="dark"] .ger-about-trust-item span,
html[data-mb-theme="dark"] .ger-contact-reasons span,
html[data-mb-theme="dark"] .ger-about-step,
html[data-mb-theme="dark"] .ger-contact-card-number {
	color: #d9b978;
}

html[data-mb-theme="dark"] .gs-latest-term a {
	color: #b18cff;
}

html[data-mb-theme="dark"] .gs-page .gs-btn-ghost .wp-block-button__link,
html[data-mb-theme="dark"] .gs-home .gs-btn-ghost .wp-block-button__link {
	color: #f4f0e8;
	border-color: #f4f0e8;
}

html[data-mb-theme="dark"] .gs-page .gs-btn-ghost .wp-block-button__link:hover,
html[data-mb-theme="dark"] .gs-home .gs-btn-ghost .wp-block-button__link:hover {
	background: #f4f0e8;
	color: #171615;
}

html[data-mb-theme="dark"] .gs-page .gs-btn-dark .wp-block-button__link,
html[data-mb-theme="dark"] .gs-home .gs-btn-dark .wp-block-button__link {
	background: #b18cff;
	border-color: #b18cff;
	color: #171615;
}

html[data-mb-theme="dark"] .gs-pagination a,
html[data-mb-theme="dark"] .gs-pagination .page-numbers {
	color: #f4f0e8;
	border-color: #3a3733;
}

html[data-mb-theme="dark"] .gs-pagination .current {
	background: #b18cff;
	border-color: #b18cff;
	color: #171615;
}

html[data-mb-theme="dark"] .gs-legal-body a,
html[data-mb-theme="dark"] .ger-about-topic:hover strong {
	color: #c3a7ff;
}

/* ==========================================================================
   Site-controller dark scopes
   The controller emits component palettes scoped to .ada-controller-colors
   .mb-site-header / .ger-about-page / etc, but only a few of those blocks have
   a dark counterpart. These mirror the same scopes one step more specific so
   the dark values win without touching the plugin.
   ========================================================================== */

html[data-mb-theme="dark"] body.ada-controller-colors,
html[data-mb-theme="dark"] body.ada-controller-colors .tlcl-page,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-html-home,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-site-header,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-site-footer,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-global-footer,
html[data-mb-theme="dark"] body.ada-controller-colors .gs-home,
html[data-mb-theme="dark"] body.ada-controller-colors .gs-page {
	--tlcl-navy: var(--ada-dark-heading);
	--tlcl-navy-deep: #ffffff;
	--tlcl-coral: var(--ada-dark-accent);
	--tlcl-coral-soft: var(--ada-dark-accent);
	--tlcl-green: var(--ada-dark-success);
	--tlcl-green-btn: var(--ada-dark-success);
	--tlcl-mint: #2a2340;
	--tlcl-mint-soft: var(--ada-dark-surface-2);
	--tlcl-yellow: var(--ada-dark-highlight);
	--tlcl-text: var(--ada-dark-text);
	--tlcl-ink: var(--ada-dark-heading);
	--tlcl-muted: var(--ada-dark-muted);
	--tlcl-fog: var(--ada-dark-surface);
	--tlcl-border: var(--ada-dark-border);
	--tlcl-white: var(--ada-dark-surface);
	--mb-navy: var(--ada-dark-heading);
	--mb-coral: var(--ada-dark-accent);
	--mb-green: var(--ada-dark-success);
	--mb-mint: #2a2340;
	--mb-mint-soft: var(--ada-dark-surface-2);
	--mb-yellow: var(--ada-dark-highlight);
	--mb-white: var(--ada-dark-surface);
	--mb-fog: var(--ada-dark-surface);
	--mb-black: var(--ada-dark-heading);
	--mb-header-navy: var(--ada-dark-heading);
	--mb-header-coral: var(--ada-dark-accent);
	--mb-header-mint: #2a2340;
	--mb-header-green: var(--ada-dark-success);
	--mb-header-yellow: var(--ada-dark-highlight);
	--color__blue: var(--ada-dark-heading);
	--color__orange: var(--ada-dark-accent);
	--color__green: var(--ada-dark-success);
	--color__green-btn: var(--ada-dark-success);
	--color__mediumgreen: var(--ada-dark-success);
	--color__yellow: var(--ada-dark-highlight);
	--color__lightgrey: var(--ada-dark-surface);
	--color__black: var(--ada-dark-heading);
	--color__white: var(--ada-dark-surface);
	--color__links: var(--ada-dark-heading);
}

html[data-mb-theme="dark"] body.ada-controller-colors .ger-about-page,
html[data-mb-theme="dark"] body.ada-controller-colors .ger-contact-page {
	--ger-ink: var(--ada-dark-heading);
	--ger-deep: var(--ada-dark-heading);
	--ger-sage: var(--ada-dark-muted);
	--ger-sage-soft: #2a2340;
	--ger-cream: var(--ada-dark-background-2);
	--ger-warm: var(--ada-dark-surface);
	--ger-gold: var(--ada-dark-highlight);
	--ger-rust: var(--ada-dark-accent);
	--ger-white: var(--ada-dark-surface);
	--ger-muted: var(--ada-dark-muted);
	--ger-border: var(--ada-dark-border);
	--gerc-ink: var(--ada-dark-heading);
	--gerc-deep: var(--ada-dark-heading);
	--gerc-sage: var(--ada-dark-muted);
	--gerc-sage-soft: #2a2340;
	--gerc-cream: var(--ada-dark-background-2);
	--gerc-warm: var(--ada-dark-surface);
	--gerc-gold: var(--ada-dark-highlight);
	--gerc-rust: var(--ada-dark-accent);
	--gerc-white: var(--ada-dark-surface);
	--gerc-muted: var(--ada-dark-muted);
	--gerc-border: var(--ada-dark-border);
}

/* Header surfaces still carried the inherited navy. */
html[data-mb-theme="dark"] body.ada-controller-colors .mb-site-header,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-desktop-header,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-header-main,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-desktop-subbar,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-mobile-row,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-mobile-panel {
	background: var(--ada-dark-background-2) !important;
	color: var(--ada-dark-text) !important;
	border-color: var(--ada-dark-border) !important;
}

html[data-mb-theme="dark"] body.ada-controller-colors .mb-primary-menu > li > a,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-secondary-menu > li > a,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-brand-text,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-mobile-action {
	color: var(--ada-dark-heading) !important;
}

html[data-mb-theme="dark"] body.ada-controller-colors .mb-primary-menu > li > a:hover,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-secondary-menu > li > a:hover {
	color: var(--ada-dark-accent) !important;
}

html[data-mb-theme="dark"] body.ada-controller-colors .mb-secondary-menu > li:not(:last-child):after {
	background: var(--ada-dark-highlight);
}

html[data-mb-theme="dark"] body.ada-controller-colors .mb-footer-heading span {
	color: var(--ada-dark-accent) !important;
}

/* Newsletter submit uses the success token; keep it violet in both modes. */
body.ada-controller-colors .mb-email-submit,
body.ada-controller-colors .mb-newsletter-popup__submit {
	background: var(--gs-violet) !important;
	color: #fff !important;
}

html[data-mb-theme="dark"] body.ada-controller-colors .mb-email-submit,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-newsletter-popup__submit {
	background: #b18cff !important;
	color: #171615 !important;
}

/* Primary buttons flip to dark ink on the lighter violet. */
html[data-mb-theme="dark"] .gs-home .gs-btn-primary .wp-block-button__link,
html[data-mb-theme="dark"] .gs-page .gs-btn-primary .wp-block-button__link {
	background: #b18cff;
	border-color: #b18cff;
	color: #171615;
}

html[data-mb-theme="dark"] .gs-home .gs-btn-primary .wp-block-button__link:hover,
html[data-mb-theme="dark"] .gs-page .gs-btn-primary .wp-block-button__link:hover,
html[data-mb-theme="dark"] .gs-home .gs-btn-primary .wp-block-button__link:focus-visible,
html[data-mb-theme="dark"] .gs-page .gs-btn-primary .wp-block-button__link:focus-visible {
	background: #c9b0ff;
	border-color: #c9b0ff;
	color: #171615;
}

/* The author band and its button use --ap-navy as a BACKGROUND, so in dark
   mode it has to stay a dark surface rather than flipping to the heading
   colour (which the inherited dark map did, leaving white on cream). */
html[data-mb-theme="dark"] body.ada-controller-colors .mb-author-page,
html[data-mb-theme="dark"] body.ada-controller-colors .mb-author-page * {
	--ap-navy: #2c2a27;
}

html[data-mb-theme="dark"] .mb-author-page h1,
html[data-mb-theme="dark"] .mb-author-page h2,
html[data-mb-theme="dark"] .mb-author-page h3 {
	color: #f4f0e8;
}

html[data-mb-theme="dark"] .mb-author-primary {
	background: #b18cff !important;
	color: #171615 !important;
}

/* 404 badge: dark ink on the lighter violet. */
html[data-mb-theme="dark"] .mb-404-page .mb-404-badge,
html[data-mb-theme="dark"] .mb-404-page .mb-404-code,
html[data-mb-theme="dark"] .mb-404-page [class*="mb-404"][style*="background"] {
	color: #171615;
}

/* The 404, search and author templates paint their primary pill buttons and
   accent badges with the *-navy tokens, which the dark map flips to a light
   heading colour. Force those pills to the dark-mode violet with dark ink. */
html[data-mb-theme="dark"] .mb-404-primary,
html[data-mb-theme="dark"] .mb-search-primary,
html[data-mb-theme="dark"] .mb-author-primary,
html[data-mb-theme="dark"] .mb-404-page .mb-404-badge,
html[data-mb-theme="dark"] .mb-404-code,
html[data-mb-theme="dark"] .mb-404-digit {
	background: #b18cff !important;
	color: #171615 !important;
	border-color: #b18cff !important;
}

html[data-mb-theme="dark"] .mb-404-primary:hover,
html[data-mb-theme="dark"] .mb-search-primary:hover,
html[data-mb-theme="dark"] .mb-author-primary:hover {
	background: #c9b0ff !important;
	color: #171615 !important;
}

/* Small accent chips inside kickers (404 code, search count) sit on the
   violet and need dark ink in dark mode. */
html[data-mb-theme="dark"] .mb-404-kicker span,
html[data-mb-theme="dark"] .mb-search-kicker span,
html[data-mb-theme="dark"] .mb-author-eyebrow span {
	color: #171615;
}

html[data-mb-theme="dark"] .mb-search-page a[class*="primary"],
html[data-mb-theme="dark"] .mb-search-page .mb-search-cta a,
html[data-mb-theme="dark"] .mb-search-empty a:first-of-type {
	background: #b18cff !important;
	color: #171615 !important;
	border-color: #b18cff !important;
}

html[data-mb-theme="dark"] .mb-search-empty-actions > a:first-child,
html[data-mb-theme="dark"] .mb-search-empty-actions > a:first-of-type {
	background: #b18cff !important;
	color: #171615 !important;
	border-color: #b18cff !important;
}
