/**
 * Real Estate Pro — Design Tokens
 *
 * Canonical CSS custom properties for the whole plugin suite. Every product
 * plugin's stylesheets and Real Estate Pro Core's component library resolve
 * colors/spacing/radius/shadow/typography/motion through these tokens —
 * never a hard-coded literal. A theme (or a site owner) may override any
 * token by redeclaring it at :root with higher specificity/later load order.
 *
 * Visual direction ("Signal"): an instrument-panel register built for a
 * data-dense product used by real estate agents and their clients alike —
 * cool-neutral paper, one confident signal-blue accent, tabular numerals
 * for every figure, and a single reusable dial/meter grammar (see the
 * "Gauge / meter / KPI / HUD" section of components.css) that recurs at
 * every scale across the suite rather than a bespoke look per screen. See
 * docs/REAL-ESTATE-PRO-DESIGN-SYSTEM.md for the full rationale. No external
 * font load, no build step — plain CSS custom properties, same as before.
 *
 * Every token name below is unchanged from the suite's previous design
 * pass — only values (and a set of clearly-marked new tokens) changed —
 * so nothing that already reads `var(--rep-*)` anywhere in Core or a
 * product plugin needs to change to pick up this redesign.
 */

:root {
	/* Brand */
	--rep-primary: #3452ff;
	--rep-primary-dark: #2540e0;
	--rep-primary-light: #90a4ff;
	--rep-primary-wash: #eef1ff;
	--rep-on-primary: #ffffff;
	--rep-secondary: #12151c;
	--rep-accent: #ff6b4a;
	--rep-on-accent: #ffffff;

	/* Neutrals — cool-neutral paper, never the generic warm cream default */
	--rep-background: #f7f8fa;
	--rep-surface: #ffffff;
	--rep-surface-alt: #eef0f4;
	--rep-text: #12151c;
	--rep-muted: #5b6472;
	--rep-border: rgba(18, 21, 28, 0.1);

	/* Semantic / state */
	--rep-success: #16a34a;
	--rep-success-wash: #e8f9ee;
	--rep-warning: #b45309;
	--rep-warning-wash: #fdf3e0;
	--rep-danger: #dc2626;
	--rep-danger-wash: #fdeaea;
	--rep-info: var(--rep-primary);
	--rep-info-wash: var(--rep-primary-wash);

	/* Trend semantics — every up/down metric in the suite (appreciation,
	   inventory, days-on-market) reads through these two names rather than
	   success/danger directly, so a chart or gauge never has to reason
	   about whether "up" is good (price) or bad (days on market) — the
	   caller picks rise or fall based on what the number means. */
	--rep-rise: var(--rep-success);
	--rep-rise-wash: var(--rep-success-wash);
	--rep-fall: var(--rep-danger);
	--rep-fall-wash: var(--rep-danger-wash);

	/* Chart palette — anchored on the brand primary; Design\Resolver
	   overwrites these at runtime with a palette actually derived from the
	   configured brand color (see Support\Color::brand_palette()), and
	   Settings\Design's custom.chart_colors lets an admin pin any of the
	   eight explicitly. These are the static/standalone fallback. */
	--rep-chart-1: #3452ff;
	--rep-chart-2: #ff6b4a;
	--rep-chart-3: #16a34a;
	--rep-chart-4: #8b5cf6;
	--rep-chart-5: #f59e0b;
	--rep-chart-6: #06b6d4;
	--rep-chart-7: #dc2626;
	--rep-chart-8: #64748b;

	/* ---------- New: highlight / glow / outline (Front End Design) ---------- */
	--rep-highlight: var(--rep-accent);
	--rep-glow: none;
	--rep-glow-color: var(--rep-accent);
	--rep-outline-color: transparent;
	--rep-outline-width: 0px;
	--rep-card-opacity: 1;
	--rep-bg-animated: none;

	/* Typography */
	--rep-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rep-font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
	--rep-font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "JetBrains Mono", "Fira Code", Consolas, "Liberation Mono", monospace;
	--rep-font: var(--rep-font-sans);

	--rep-text-xs: 0.75rem;
	--rep-text-sm: 0.85rem;
	--rep-text-base: 1rem;
	--rep-text-md: 1.15rem;
	--rep-text-lg: 1.3rem;
	--rep-text-xl: 1.6rem;
	--rep-text-2xl: 2rem;
	--rep-text-hero: clamp(1.4rem, 3.2vw, 2.1rem);

	--rep-weight-normal: 400;
	--rep-weight-semibold: 600;
	--rep-weight-bold: 700;
	--rep-weight-black: 800;

	--rep-leading-tight: 1.2;
	--rep-leading-snug: 1.35;
	--rep-leading-normal: 1.5;
	--rep-leading-relaxed: 1.7;

	--rep-tracking-tight: -0.01em;
	--rep-tracking-normal: 0;
	--rep-tracking-wide: 0.02em;

	/* Spacing (4px base scale) */
	--rep-space-xs: 4px;
	--rep-space-sm: 8px;
	--rep-space-md: 16px;
	--rep-space-lg: 24px;
	--rep-space-xl: 32px;
	--rep-space-2xl: 48px;

	/* Radius — small, confident, not bubbly */
	--rep-radius-sm: 4px;
	--rep-radius-md: 12px;
	--rep-radius-lg: 18px;
	--rep-radius-pill: 999px;

	/* Shadow (one elevation scale) — softened, still neutral; the dynamic
	   --rep-card-shadow (Design\Resolver) tints from the brand color and
	   optionally an explicit custom.shadow_color instead. */
	--rep-shadow-sm: 0 1px 2px rgba(18, 21, 28, 0.05);
	--rep-shadow-md: 0 1px 2px rgba(18, 21, 28, 0.05), 0 4px 14px rgba(18, 21, 28, 0.06);
	--rep-shadow-lg: 0 10px 30px rgba(18, 21, 28, 0.14);

	/* Motion — "arrives and settles," no bounce by default. */
	--rep-anim-easing: cubic-bezier(0.16, 1, 0.3, 1);
	--rep-transition-fast: 130ms var(--rep-anim-easing);
	--rep-transition-normal: 220ms var(--rep-anim-easing);
	--rep-transition-slow: 420ms var(--rep-anim-easing);

	/* Control sizing (shared by inputs/buttons across products) */
	--rep-control-size: 0.85rem;
	--rep-control-height: 2.3rem;
	--rep-meta-size: 0.72rem;

	/* Breakpoints — consumed by JS (matchMedia) and documented for authors;
	   CSS media/container queries cannot reference custom properties in the
	   query condition itself, so these are the canonical values to hand-copy
	   into @media/@container rules. Keep in sync with docs/REAL-ESTATE-PRO-DESIGN-SYSTEM.md. */
	--rep-bp-sm: 560px;
	--rep-bp-md: 782px;
	--rep-bp-lg: 960px;
	--rep-bp-xl: 1200px;
}

/* Backward-compatible aliases so existing Real Estate Data Pro CSS
   (which reads --redp-*) keeps working unmodified while it still ships
   its own token declarations, and continues working after those
   declarations are removed in favor of Core's tokens.css.
   Remove once Data Pro's migration to Core tokens is complete —
   see docs/MIGRATION-ROADMAP.md Phase 4. */
:root {
	--redp-brand: var(--rep-primary);
	--redp-brand-dark: var(--rep-primary-dark);
	--redp-brand-light: var(--rep-primary-light);
	--redp-brand-wash: var(--rep-primary-wash);
	--redp-on-brand: var(--rep-on-primary);
	--redp-accent: var(--rep-accent);
	--redp-on-accent: var(--rep-on-accent);
	--redp-text: var(--rep-text);
	--redp-muted: var(--rep-muted);
	--redp-surface: var(--rep-surface);
	--redp-panel-bg: var(--rep-surface-alt);
	--redp-border: var(--rep-border);
	--redp-radius: var(--rep-radius-md);
	--redp-shadow: var(--rep-shadow-md);
	--redp-font: var(--rep-font);
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--rep-transition-fast: 0ms;
		--rep-transition-normal: 0ms;
		--rep-transition-slow: 0ms;
		--rep-bg-animated: none;
	}
}

/* Browser surfaces a design system usually forgets to theme. Safe at this
   scope because tokens.css itself is only ever enqueued on pages that
   already render our own admin screens or shortcode output — never a
   theme's arbitrary front-end pages — so this can't bleed onto content we
   don't own. */
::selection {
	background: var(--rep-primary);
	color: var(--rep-on-primary);
}
