/**
 * Theme Bridge — assets/theme-bridge.css
 *
 * Structural rules only. The actual VALUES (background + text/link/
 * border/accent colors) come from the `--tb-*` custom properties written
 * into the inline <style id="tb-background-style"> block that
 * TB_Frontend::print_head_output() prints into wp_head (see
 * includes/class-tb-frontend.php + includes/class-tb-palette.php) — that
 * has to be inline and server-rendered so the very first paint already
 * has the right values (no flash). This file just consumes those
 * variables and gives other themes/plugins a stable selector to hook
 * into.
 *
 * `color` is intentionally NOT set on `a` alone with `!important` — a
 * theme's own more specific link styles (nav menus, buttons that happen
 * to be <a> tags, etc.) should still be able to win the cascade. This
 * rule sets a sane site-wide default, not a forced override.
 */

body {
	background: var( --tb-bg );
	color: var( --tb-text );
	transition: background 0.2s ease, color 0.2s ease;
}

a {
	color: var( --tb-link );
}

a:hover,
a:focus {
	color: var( --tb-link-hover );
}

/* Available for any Theme Bridge-aware markup (this plugin's own
 * shortcode output, or a CC/WGS/GNP element that opts in) to pick up the
 * rest of the palette without each needing its own inline <style>. */
.tb-themed-muted   { color: var( --tb-text-muted ); }
.tb-themed-border  { border-color: var( --tb-border ); }
.tb-themed-accent  { color: var( --tb-accent ); }

.tb-switcher {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

/* Stable hooks for child themes / other plugins that want to react to the
 * resolved theme without listening for wp-theme-sync:change themselves. */
html[data-tb-theme="light"] {
	color-scheme: light;
}

html[data-tb-theme="dark"] {
	color-scheme: dark;
}

/* data-tb-user-theme holds the active user theme's slug, or "" when none
 * is active — e.g. html[data-tb-user-theme="high-contrast"] { ... } */
