/**
 * Roark — shared theme-aware button color tokens.
 *
 * Single source of truth for the primary-CTA color chain used across the
 * plugin: listing shell (filter/search submit, view-switcher active tab),
 * property cards ("Details" / roark-property-button), the "Exposé
 * anfordern" CTA + inquiry modal, the inquiry form submit button, the
 * exposé mobile sticky "Anfrage" button, the AI assistant launcher/panel
 * accent, and the Suchprofil wizard submit. Registered as a style
 * dependency of every stylesheet that renders one of these buttons, so the
 * chain is available on every page a primary CTA can appear — including the
 * exposé, which does not load listing.css.
 *
 * Fallback chain ("first defined source wins"):
 *   1. The widget's own Elementor Style-tab color control, when one exists.
 *      Elementor prints that as `{{WRAPPER}} .some-class {…}` *after* this
 *      stylesheet (declared as its dependency), so it naturally overrides
 *      the vars below without this file needing to know about it. Custom
 *      properties inherit down the DOM tree, so a `{{WRAPPER}}` re-declaring
 *      one of these vars always wins for everything inside it, regardless of
 *      where the chain below is declared (`body`, an ancestor of every
 *      `{{WRAPPER}}`) — this step needs no cooperation from this file.
 *   2. The active WordPress theme's own button colors — checked *before* the
 *      Elementor kit so a site that has actually configured its theme's
 *      button color doesn't get outvoted by Elementor's global kit, which
 *      ships non-empty accent/primary colors (a saturated green/blue pair on
 *      a stock kit) even when nobody has touched them:
 *        a. Kadence's own vars, declared on `:root` by the theme itself:
 *           --global-palette-btn-bg / --global-palette-btn-bg-hover /
 *           --global-palette-btn (text). Kadence's theme.json color palette
 *           only registers generic `theme-palette1..15` slugs (each
 *           `var(--global-paletteN)`), never a `primary` slug, so it can
 *           never collide with step 2b below.
 *        b. A block theme's theme.json `elements.button` preset color
 *           (--wp--preset--color--primary). No standard block-theme preset
 *           carries a "hover" variant, so the hover chain re-uses the same
 *           non-hover Kadence/preset value here before moving on.
 *   3. Elementor's own Site Settings global kit colors — Accent (its
 *      dedicated CTA/button colour slot) before Primary. Only reached once
 *      neither theme source above defined a button color. For this lookup
 *      to succeed at all, the chain must be declared somewhere that can see
 *      the kit's custom properties: Elementor prints `--e-global-color-*` on
 *      `.elementor-kit-{id}`, a class added to `<body>` (not on `:root`,
 *      i.e. `<html>`, which is `<body>`'s ancestor and so can never see a
 *      property declared on `<body>` — inherited custom properties only
 *      flow from ancestor to descendant). That's why this whole block is
 *      declared on `body` rather than `:root`: `body` carries the kit class
 *      itself, so `var(--e-global-color-accent, …)` computed here resolves
 *      against the kit's own values.
 *   4. Roark's own default blue.
 *
 * Only COLORS (background/text/hover) come from this chain — size,
 * padding, radius, and font-size are each stylesheet's own.
 *
 * Every alias below (`--roark-global-color-primary`, `--roark-btn-primary-*`,
 * `--roark-btn-secondary-*`) is declared in this same `body` rule, alongside
 * the vars it derives from — not on `:root` — so it resolves against the
 * exact same computed values (custom properties referencing other custom
 * properties are resolved using the values visible *at the declaring
 * element*, then inherited as already-resolved values; splitting the base
 * chain and its aliases across `:root` and `body` would silently re-break
 * step 3 for every alias even though `--roark-btn-bg` itself works).
 * `listing.css`'s `--roark-filter-accent` reads `--roark-global-color-primary`
 * the same way and is declared on `body` for the same reason — see the
 * comment there.
 */
body {
	--roark-btn-bg: var(--global-palette-btn-bg, var(--wp--preset--color--primary, var(--e-global-color-accent, var(--e-global-color-primary, #2563eb))));
	--roark-btn-bg-hover: var(--global-palette-btn-bg-hover, var(--global-palette-btn-bg, var(--wp--preset--color--primary, var(--e-global-color-accent, var(--e-global-color-primary, #1d4ed8)))));
	--roark-btn-fg: var(--global-palette-btn, #fff);

	/* ── Backwards-compatible aliases ────────────────────────────────────
	   Kept so existing selectors across roark-card.css / inquiry-form.css /
	   inquiry-modal.css / expose-mobile.css / listing.css keep working
	   unchanged. A widget-level Elementor control that targets
	   --roark-global-color-primary directly on {{WRAPPER}} (e.g.
	   ListingWidget's "Accent Color") still overrides these within its own
	   subtree via normal cascade/inheritance, since {{WRAPPER}} is always a
	   descendant of body. */
	--roark-global-color-primary: var(--roark-btn-bg);
	--roark-btn-primary-bg: var(--roark-btn-bg);
	--roark-btn-primary-bg-hover: var(--roark-btn-bg-hover);
	--roark-btn-primary-fg: var(--roark-btn-fg);
	--roark-btn-secondary-bg: transparent;
	--roark-btn-secondary-bg-hover: rgba(37, 99, 235, 0.06);
	--roark-btn-secondary-fg: var(--roark-btn-bg);
	--roark-btn-secondary-border: var(--roark-btn-bg);
}
