/**
 * Activity Share design tokens.
 *
 * Every token chains through the active theme's own tokens
 * (BuddyX 5.1+ -> BuddyX legacy -> Reign -> popular page builders -> WP presets -> hex),
 * so the menu adopts the theme's colours AND its dark mode with no per-component dark CSS.
 * Only one theme is active, so the others' variables are undefined and fall through.
 */
:root {
	--bpas-accent: var(--bx-color-accent, var(--color-theme-primary, var(--reign-colors-theme, var(--wp--preset--color--primary, var(--ast-global-color-0, var(--global-palette1, var(--theme-palette-color-1, var(--wp--preset--color--accent, #2563eb))))))));
	--bpas-text: var(--bx-color-fg, var(--global-font-color, var(--reign-site-body-text-color, var(--wp--preset--color--contrast, #1e293b))));
	--bpas-text-muted: var(--bx-color-fg-muted, var(--reign-site-alternate-text-color, #64748b));
	--bpas-surface: var(--bx-color-bg-elevated, var(--color-theme-white-box, var(--reign-site-sections-bg-color, var(--wp--preset--color--base, #ffffff))));
	--bpas-surface-hover: var(--bx-color-bg-muted, var(--global-body-lightcolor, var(--reign-site-secondary-bg-color, #f1f5f9)));
	--bpas-border: var(--bx-color-border, var(--global-border-color, var(--reign-site-border-color, #e2e8f0)));
	--bpas-on-accent: var(--bx-color-fg-inverse, var(--reign-site-button-text-color, #ffffff));
	--bpas-danger: var(--bx-color-error, var(--reign-color-error, #dc2626));
	--bpas-success: var(--bx-color-success, #16a34a);
	--bpas-backdrop: rgb(15 23 42 / 45%);
	--bpas-shadow: 0 10px 30px rgb(15 23 42 / 16%);
	--bpas-radius: var(--bx-radius-card, var(--reign-global-border-radius, 12px));
	--bpas-radius-button: var(--bx-radius-button, var(--reign-global-button-radius, 6px));
	--bpas-space-1: 4px;
	--bpas-space-2: 8px;
	--bpas-space-3: 12px;
	--bpas-space-4: 16px;
	--bpas-tap: 44px;
	--bpas-icon: 20px;
	--bpas-font-size: 0.9375rem;
	--bpas-font-size-sm: 0.8125rem;
	--bpas-focus: 2px solid var(--bpas-accent);
	--bpas-z: 1000;
}

/*
 * Dark mode: the same theme chain as :root (Reign redefines its --reign-site-* tokens under
 * :root[data-bx-mode=dark], so they must stay in the chain), with dark literals for themes
 * that have no dark tokens of their own.
 */
[data-theme="dark"],
html.dark,
body.dark-mode,
html[data-bx-mode="dark"],
body.buddyx-dark-theme {
	--bpas-text: var(--bx-color-fg, var(--global-font-color, var(--reign-site-body-text-color, #e2e8f0)));
	--bpas-text-muted: var(--bx-color-fg-muted, var(--reign-site-alternate-text-color, #94a3b8));
	--bpas-surface: var(--bx-color-bg-elevated, var(--color-theme-white-box, var(--reign-site-sections-bg-color, #1e293b)));
	--bpas-surface-hover: var(--bx-color-bg-muted, var(--reign-site-secondary-bg-color, #273449));
	--bpas-border: var(--bx-color-border, var(--global-border-color, var(--reign-site-border-color, #334155)));
	--bpas-success: var(--bx-color-success, #4ade80); /* AA on the dark surface */
	--bpas-shadow: 0 10px 30px rgb(0 0 0 / 45%);
}
