/*
 * Round 10 (2026-11-20): extra shades removed (dividers now edge #515348, large headings ink #e3e0d5)
 * and the gold/gradient call-to-action and kicker colors replaced by the v74 accent in the dark skin (DS12).
 *
 * Dark skin palette from Marketplace mockup v74 (James, Telegram 119254444: "so much easier on my eyes").
 * Staging, 2026-11-20 (round 9). DARK SKIN ONLY: every rule is scoped to html[data-bx-mode="dark"]
 * (or BuddyX's body.buddyx-dark-theme). The light skin is untouched.
 *
 * v74 tokens: bg #1b1b18 · surface #22231f · raised #272923 · edge #515348 · text #e3e0d5 ·
 *             muted #b7b7a9 · accent #e1cca6 · accent-ink #2a251a · paper #e7ddc9 · paper-ink #302a21
 */

/* 1. BuddyX theme tokens (override the theme's inline dark block). */
html[data-bx-mode="dark"]:root,
html:root body.buddyx-dark-theme {
  --bx-color-bg: #1b1b18;
  --bx-color-bg-page: #1b1b18;
  --color-theme-body: #1b1b18;
  --color-layout-boxed: #1b1b18;
  --color-theme-white: #1b1b18;
  --wp--preset--color--base: #1b1b18;

  --bx-color-bg-elevated: #22231f;
  --color-theme-white-box: #22231f;
  --bx-color-panel-bg: #22231f;
  --color-panel-bg: #22231f;
  --bx-color-loader-bg: #22231f;
  --color-theme-loader: #22231f;
  --bx-color-subheader-bg: #22231f;
  --color-subheader-background: #22231f;
  --wp--preset--color--base-3: #22231f;
  --wp--preset--color--tertiary: #22231f;

  --bx-color-bg-muted: #272923;
  --global-body-lightcolor: #272923;
  --bx-color-panel-bg-hover: #272923;
  --bx-color-panel-bg-active: #272923;
  --color-panel-bg-hover: #272923;
  --color-panel-bg-active: #272923;
  --wp--preset--color--base-2: #272923;

  --bx-color-border: #515348;
  --global-border-color: #515348;
  --bx-color-divider: #515348;
  --color-hr: #515348;

  --bx-color-fg: #e3e0d5;
  --global-font-color: #e3e0d5;
  --bx-color-heading: #e3e0d5;
  --global-title-color: #e3e0d5;
  --global-heading-color: #e3e0d5;
  --color-h1: #e3e0d5;
  --color-h2: #e3e0d5;
  --color-h3: #e3e0d5;
  --color-h4: #e3e0d5;
  --color-h5: #e3e0d5;
  --color-h6: #e3e0d5;
  --bx-color-site-title: #e3e0d5;
  --color-site-title: #e3e0d5;
  --bx-color-subheader-fg: #e3e0d5;
  --color-subheader-title: #e3e0d5;
  --bx-color-footer-title: #e3e0d5;
  --color-footer-title: #e3e0d5;
  --wp--preset--color--contrast: #e3e0d5;

  --bx-color-fg-muted: #b7b7a9;
  --bx-color-topbar-fg: #b7b7a9;
  --color-topbar-content: #b7b7a9;
  --bx-color-footer-fg: #b7b7a9;
  --color-footer-content: #b7b7a9;
  --bx-color-copyright-fg: #b7b7a9;
  --color-copyright-content: #b7b7a9;
  --wp--preset--color--contrast-3: #b7b7a9;

  --bx-color-link: #e3e0d5;
  --color-link: #e3e0d5;
  --bx-color-menu-fg: #e3e0d5;
  --color-menu: #e3e0d5;
  --bx-color-panel-menu: #e3e0d5;
  --color-panel-menu: #e3e0d5;
  --bx-color-panel-toggle: #e3e0d5;
  --color-panel-toggle: #e3e0d5;
  --bx-color-topbar-link: #e3e0d5;
  --color-topbar-link: #e3e0d5;
  --bx-color-footer-link: #e3e0d5;
  --color-footer-link: #e3e0d5;
  --bx-color-copyright-link: #e3e0d5;
  --color-copyright-link: #e3e0d5;

  --bx-color-accent: #e1cca6;
  --color-theme-primary: #e1cca6;
  --wp--preset--color--accent: #e1cca6;
  --wp--preset--color--primary: #e1cca6;
  --bx-color-link-hover: #e1cca6;
  --color-link-hover: #e1cca6;
  --bx-color-menu-hover: #e1cca6;
  --bx-color-menu-active: #e1cca6;
  --color-menu-hover: #e1cca6;
  --color-menu-active: #e1cca6;
  --bx-color-panel-menu-hover: #e1cca6;
  --bx-color-panel-menu-active: #e1cca6;
  --color-panel-menu-hover: #e1cca6;
  --color-panel-menu-active: #e1cca6;
  --bx-color-site-title-hover: #e1cca6;
  --color-site-title-hover: #e1cca6;
  --bx-color-topbar-link-hover: #e1cca6;
  --color-topbar-link-hover: #e1cca6;
  --bx-color-footer-link-hover: #e1cca6;
  --color-footer-link-hover: #e1cca6;
  --bx-color-copyright-link-hover: #e1cca6;
  --color-copyright-link-hover: #e1cca6;

  --bx-color-button-bg: #e1cca6;
  --button-background-color: #e1cca6;
  --bx-color-button-border: #e1cca6;
  --button-border-color: #e1cca6;
  --bx-color-button-fg: #2a251a;
  --button-text-color: #2a251a;
  --bx-color-button-bg-hover: #e7ddc9;
  --button-background-hover-color: #e7ddc9;
  --bx-color-button-border-hover: #e7ddc9;
  --button-border-hover-color: #e7ddc9;
  --bx-color-button-fg-hover: #2a251a;
  --button-text-hover-color: #2a251a;

  --bx-color-header-bg: #1b1b18;
  --color-header-bg: #1b1b18;
  --bx-color-topbar-bg: #1b1b18;
  --color-topbar-bg: #1b1b18;
  --bx-color-footer-bg: #1b1b18;
  --color-footer-bg: #1b1b18;
  --bx-color-copyright-bg: #1b1b18;
  --color-copyright-bg: #1b1b18;

  /* WordPress "Additional CSS" identity layer tokens */
  --pv-ink: #e3e0d5;
  --pv-muted: #b7b7a9;
  --pv-paper: #1b1b18;
}

/* 2. Public-shell tokens (header, footer and shell pages). Beats the shell's html.light-mode block. */
html[data-bx-mode="dark"]:root body.pv-public-shell {
  --pv-ink: #e3e0d5;
  --pv-ink-muted: #b7b7a9;
  --pv-ground: #1b1b18;
  --pv-surface: #22231f;
  --pv-surface-raised: #272923;
  --pv-line: rgba(227, 224, 213, 0.15);
  --pv-line-strong: rgba(227, 224, 213, 0.3);
  --pv-paper: #e7ddc9;
  --pv-on-paper: #302a21;
  --pv-focus: #e1cca6;
}

/* 3. Every page in the dark skin: page ground and body text follow the tokens
 *    (the Additional CSS layer pins body.page to cream paper and .entry-content to dark ink). */
html[data-bx-mode="dark"]:root body,
html[data-bx-mode="dark"]:root body.page {
  background-color: #1b1b18;
}
html[data-bx-mode="dark"]:root body .site-content,
html[data-bx-mode="dark"]:root body .entry-content {
  color: #e3e0d5;
}
html[data-bx-mode="dark"]:root body .entry-content a:not(.button):not(.wc-block-components-button):not(.pv-button):not(.pv-location-button),
html[data-bx-mode="dark"]:root body.woocommerce-page .entry-content a:not(.button):not(.wc-block-components-button),
html[data-bx-mode="dark"]:root body.woocommerce .entry-content a:not(.button):not(.wc-block-components-button) {
  color: #e1cca6;
}
html[data-bx-mode="dark"]:root body .site-content ::placeholder {
  color: #b7b7a9;
  opacity: 1;
}

/* 4. Homepage and location pages: their style.css colors are hard-coded (#0a0a0a, #111, #141414 ...). */
html[data-bx-mode="dark"]:root body.home,
html[data-bx-mode="dark"]:root body.single-location,
html[data-bx-mode="dark"]:root body.single-location #page,
html[data-bx-mode="dark"]:root .pv-home,
html[data-bx-mode="dark"]:root .pv-location-template,
html[data-bx-mode="dark"]:root .pv-location-hero {
  background: #1b1b18;
  color: #e3e0d5;
}
html[data-bx-mode="dark"]:root body.home #masthead,
html[data-bx-mode="dark"]:root body.home #colophon,
html[data-bx-mode="dark"]:root body.single-location #masthead,
html[data-bx-mode="dark"]:root body.single-location #colophon {
  background: #1b1b18;
  color: #e3e0d5;
}
html[data-bx-mode="dark"]:root body.home .site-footer,
html[data-bx-mode="dark"]:root body.home .site-info,
html[data-bx-mode="dark"]:root body.home .footer-bottom {
  background: #1b1b18 !important;
  color: #b7b7a9 !important;
}
html[data-bx-mode="dark"]:root body.home #masthead a,
html[data-bx-mode="dark"]:root body.home #colophon a,
html[data-bx-mode="dark"]:root body.home .site-title a,
html[data-bx-mode="dark"]:root body.home .site-footer a,
html[data-bx-mode="dark"]:root body.single-location #masthead a,
html[data-bx-mode="dark"]:root body.single-location #colophon a {
  color: #e3e0d5 !important;
}
html[data-bx-mode="dark"]:root .pv-home-question,
html[data-bx-mode="dark"]:root .pv-provider {
  background: #22231f;
}
html[data-bx-mode="dark"]:root .pv-signal,
html[data-bx-mode="dark"]:root .pv-signal p,
html[data-bx-mode="dark"]:root .pv-placeholder,
html[data-bx-mode="dark"]:root .pv-card-grid article,
html[data-bx-mode="dark"]:root .pv-paths article,
html[data-bx-mode="dark"]:root .pv-location-hero-card,
html[data-bx-mode="dark"]:root .pv-location-card,
html[data-bx-mode="dark"]:root .pv-location-note,
html[data-bx-mode="dark"]:root .pv-location-quote,
html[data-bx-mode="dark"]:root .pv-location-metric,
html[data-bx-mode="dark"]:root .pv-location-ifso {
  background: #272923;
  border-color: #515348;
  color: #e3e0d5;
}
html[data-bx-mode="dark"]:root .pv-email input {
  background: #272923;
  border-color: #515348;
  color: #e3e0d5;
}
html[data-bx-mode="dark"]:root body.home.pv-public-shell .pv-home :is(h1, h2, h3, h4, h5, h6),
html[data-bx-mode="dark"]:root .pv-home h1,
html[data-bx-mode="dark"]:root .pv-home h2,
html[data-bx-mode="dark"]:root .pv-card-grid b,
html[data-bx-mode="dark"]:root .pv-paths b,
html[data-bx-mode="dark"]:root .pv-placeholder b,
html[data-bx-mode="dark"]:root .pv-location-template :is(h1, h2, h3),
html[data-bx-mode="dark"]:root .pv-location-card b,
html[data-bx-mode="dark"]:root .pv-location-note b,
html[data-bx-mode="dark"]:root .pv-location-metric strong {
  color: #e3e0d5 !important;
}
html[data-bx-mode="dark"]:root .pv-button:not(.pv-button-primary),
html[data-bx-mode="dark"]:root .pv-location-button:not(.pv-location-button-primary) {
  border-color: rgba(227, 224, 213, 0.45);
  color: #e3e0d5 !important;
}

/* Placeholder text everywhere in the dark skin (header search, homepage email box, checkout phone):
 * the theme's #757575 reaches only about 3.2-3.4:1 on the v74 surfaces. */
html[data-bx-mode="dark"]:root ::placeholder {
  color: #b7b7a9 !important;
  opacity: 1;
}

/* 5. Round 10: gold and gradient roles -> v74 accent in the dark skin (DS12). Light skin unchanged.
 *    The approved rainbow dash under the header and above the footer (D01) is kept. */
html[data-bx-mode="dark"]:root .pv-button-primary,
html[data-bx-mode="dark"]:root .pv-email button,
html[data-bx-mode="dark"]:root .pv-location-button-primary {
  background: #e1cca6 !important;
  color: #2a251a !important;
  border: 0;
}
html[data-bx-mode="dark"]:root .pv-button-primary:hover,
html[data-bx-mode="dark"]:root .pv-email button:hover,
html[data-bx-mode="dark"]:root .pv-location-button-primary:hover {
  background: #e7ddc9 !important;
}
html[data-bx-mode="dark"]:root body.home.pv-public-shell .pv-home a:not(.pv-button),
html[data-bx-mode="dark"]:root .pv-home a:not(.pv-button),
html[data-bx-mode="dark"]:root .pv-location-template a:not(.pv-location-button),
html[data-bx-mode="dark"]:root .pv-home .pv-kicker,
html[data-bx-mode="dark"]:root .pv-home .pv-eyebrow,
html[data-bx-mode="dark"]:root .pv-location-template .pv-kicker {
  color: #e1cca6 !important;
}
/* Round 11: the homepage hero card keeps its rainbow stripes in the dark skin (style.css .pv-signal span). */
html[data-bx-mode="dark"]:root .pv-location-metric {
  border-top-color: #e1cca6;
}

/* 6. Round 10: filled editor buttons and the Reflection form button in the dark skin.
 *    The v74 accent fill needs the accent ink (#2a251a), not link or white text (was 1.0-1.44:1 / 3.87:1). */
html[data-bx-mode="dark"]:root .entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: #e1cca6 !important;
  color: #2a251a !important;
}
html[data-bx-mode="dark"]:root .fluentform .ff-btn-submit,
html[data-bx-mode="dark"]:root .fluentform .ff-btn-submit:hover {
  background-color: #e1cca6 !important;
  border-color: #e1cca6 !important;
  color: #2a251a !important;
}
/* Outline editor buttons in the dark skin: the theme paints their background with the button color,
 * which put accent text on an accent fill (1.0:1). Keep them as true outlines. */
html[data-bx-mode="dark"]:root .entry-content .wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  border: 2px solid #e1cca6 !important;
  color: #e3e0d5 !important;
}
