/* === bridge theme bundle === generated by vite-plugin-theme-bundle === */

/* ───── mode: dark.css ───── */

/* Dark Mode — Surface, text, gray, and glass tokens
   ===================================================
   Overrides base :root light defaults for dark appearance.
   Brand-specific dark adjustments go in brands/{id}/brand-dark.css. */

[data-mode="dark"] {
  /* Surfaces */
  --color-background: #0f172a;
  --color-surface: #1e293b;
  --color-surface-rgb: 30, 41, 59;
  --color-text: #f1f5f9;
  --color-text-rgb: 148, 163, 184;
  --color-text-subtle: #94a3b8;
  --color-foreground: #f1f5f9;
  --color-foreground-rgb: 241, 245, 249;

  /* Neutral Scale (inverted luminance) */
  --gray-50: #1e293b;
  --gray-50-rgb: 30, 41, 59;
  --gray-100: #334155;
  --gray-100-rgb: 51, 65, 85;
  --gray-200: #475569;
  --gray-200-rgb: 71, 85, 105;
  --gray-300: #64748b;
  --gray-300-rgb: 100, 116, 139;
  --gray-400: #94a3b8;
  --gray-400-rgb: 148, 163, 184;
  --gray-500: #94a3b8;
  --gray-500-rgb: 148, 163, 184;
  --gray-600: #cbd5e1;
  --gray-600-rgb: 203, 213, 225;
  --gray-700: #e2e8f0;
  --gray-700-rgb: 226, 232, 240;
  --gray-800: #e2e8f0;
  --gray-800-rgb: 226, 232, 240;
  --gray-900: #f1f5f9;
  --gray-900-rgb: 241, 245, 249;

  /* Glassmorphism — dark variant */
  --glass-transparent: rgba(15, 23, 42, 0.3);
  --glass-subtle: rgba(15, 23, 42, 0.6);
  --glass-light: rgba(15, 23, 42, 0.7);
  --glass-medium: rgba(15, 23, 42, 0.8);
  --glass-heavy: rgba(15, 23, 42, 0.85);
  --glass-solid: rgba(15, 23, 42, 0.92);
  --glass-white: rgba(30, 41, 59, 0.95);
  --glass-border: rgba(148, 163, 184, 0.2);
  --glass-dark: rgba(241, 245, 249, 0.95);

  /* Glass border tiers */
  --glass-border-subtle: rgba(148, 163, 184, 0.08);
  --glass-border-light: rgba(148, 163, 184, 0.12);
  --glass-border-medium: rgba(148, 163, 184, 0.18);
  --glass-border-strong: rgba(148, 163, 184, 0.25);
  --glass-border-heavy: rgba(148, 163, 184, 0.5);

  /* Dark glass variants */
  --glass-dark-subtle: rgba(241, 245, 249, 0.6);
  --glass-dark-medium: rgba(241, 245, 249, 0.8);
  --glass-dark-heavy: rgba(241, 245, 249, 0.9);

  /* Shadows (stronger in dark) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.5);

  /* Spotlight — dark variant */
  --spotlight-bg: #1e293b;
  --spotlight-text: #f1f5f9;
  --spotlight-text-subtle: #94a3b8;
  --spotlight-text-muted: #64748b;
  --spotlight-border: #334155;
  --spotlight-hover: #334155;

  /* Header overlays */
  --header-overlay: rgba(255, 255, 255, 0.1);
  --header-overlay-hover: rgba(255, 255, 255, 0.15);

  /* Semantic colors (same across brands unless overridden in brand-dark.css) */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
}


/* ───── mode: light.css ───── */

/* Light Mode — Minimal overrides
   ================================
   :root in variables.css already defines light defaults.
   Only override values that genuinely DIFFER here. */

[data-mode="light"] {
  --glass-white: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.20);
  --glass-dark: rgba(var(--color-text-rgb), 0.95);
}


/* ───── brand: quiksync ───── */

/* QuikBot Green — Brand Identity (light surfaces)
   =================================================
   Brand tokens + light-mode tinted surfaces/grays.
   Dark surfaces go in brand-dark.css. */

[data-brand="quiksync"] {
  /* Brand Identity */
  --brand-primary: #578e76; /* Mercury-tier: ~50% saturation drop from #3BA878 (was: 59, 168, 120) */
  --brand-secondary: #2F8CA3;
  /* Gradient partner — points at the teal secondary so
     `text-brand-gradient` and friends render a visible teal → green
     ramp instead of collapsing into a flat green (the previous
     `#2D8A5E` was too close to `--brand-primary`). */
  --brand-gradient-end: #2F8CA3;
  --brand-accent: #5DB88E;
  --brand-font: 'Plus Jakarta Sans', sans-serif;
  --brand-primary-rgb: 87, 142, 118;
  --brand-secondary-rgb: 47, 140, 163;

  /* Semantic overrides.
     `--color-success` is intentionally NOT overridden — left to fall
     through to the design-system default (`#10b981`) so the WS-status
     pip + Sonner success toasts stay in the same hue family as the
     `IDLE` / `SUCCESS` status dots sourced from
     `assignTypeColor()` in `src/utils/colorUtils.ts`. The brand-primary
     green and the status-palette green are intentionally different
     hues; conflating them disconnects the "live-updates healthy"
     signal from the unit-status dot family. */
  --color-warning: #EABB2C;
  --color-error: #E44E43;
  --color-accent: var(--brand-accent);

  /* Status palette — copied verbatim from the design-system default so the
     unit-status surfaces (fleet donut, blueprint-drawer chips, status pills,
     command rows, inspector minimap) keep the vivid `assignTypeColor` hues and
     all agree on a colour. Intentionally NOT green-harmonised like --color-
     warning/error above: status colour is a recognisability signal (busy =
     orange, charging = blue, offline = slate) and is kept stable across themes.
     Retune here if the brand ever wants green-tinted status hues. */
  --status-idle-rgb: 16, 185, 129;
  --status-active-rgb: 245, 158, 11;
  --status-busy-rgb: 234, 88, 12;
  --status-charging-rgb: 59, 130, 246;
  --status-inactive-rgb: 148, 163, 184;
  --status-error-rgb: 239, 68, 68;
  --status-waiting-rgb: 139, 92, 246;
  --status-default-rgb: 100, 116, 139;

  /* Light-mode tinted surfaces */
  --color-background: #fafbfa;
  --color-surface: #f8faf9;
  --color-surface-rgb: 248, 250, 249;
  --color-text: #244933;
  --color-text-rgb: 36, 73, 51;
  --color-text-subtle: #5f9271;

  /* Green-tinted neutral scale (light) */
  --gray-50: #f5faf6;
  --gray-50-rgb: 245, 250, 246;
  --gray-100: #e9f3ec;
  --gray-100-rgb: 233, 243, 236;
  --gray-200: #d5e5da;
  --gray-200-rgb: 213, 229, 218;
  --gray-300: #b3ccb9;
  --gray-300-rgb: 179, 204, 185;
  --gray-400: #89ad94;
  --gray-400-rgb: 137, 173, 148;
  --gray-500: #5f9271;
  --gray-500-rgb: 95, 146, 113;
  --gray-600: #477558;
  --gray-600-rgb: 71, 117, 88;
  --gray-700: #355e44;
  --gray-700-rgb: 53, 94, 68;
  --gray-800: #244933;
  --gray-800-rgb: 36, 73, 51;
  --gray-900: #183524;
  --gray-900-rgb: 24, 53, 36;

  /* Glass overrides */
  --glass-white: rgba(255, 255, 255, 0.93);
  --glass-border: rgba(47, 163, 107, 0.25);

  /* Header text */
  --header-text-muted: var(--gray-200);
}


/* ───── brand-dark: quiksync ───── */

/* QuikBot Green — Dark Mode Overrides
   ====================================
   Green-tinted dark surfaces and grays.
   Compound selector wins over both [data-mode="dark"]
   and [data-brand="quiksync"] individually. */

[data-brand="quiksync"][data-mode="dark"] {
  /* Dark surfaces with green undertone */
  --color-background: #0d1f15;
  --color-surface: #142b1d;
  --color-surface-rgb: 20, 43, 29;
  --color-text: #e9f3ec;
  --color-text-rgb: 233, 243, 236;
  --color-text-subtle: #89ad94;

  /* Dark neutral scale with green undertone */
  --gray-50: #142b1d;
  --gray-50-rgb: 20, 43, 29;
  --gray-100: #1d3d28;
  --gray-100-rgb: 29, 61, 40;
  --gray-200: #2a5436;
  --gray-200-rgb: 42, 84, 54;
  --gray-300: #3d7a50;
  --gray-300-rgb: 61, 122, 80;
  --gray-400: #5f9271;
  --gray-400-rgb: 95, 146, 113;
  --gray-500: #89ad94;
  --gray-500-rgb: 137, 173, 148;
  --gray-600: #b3ccb9;
  --gray-600-rgb: 179, 204, 185;
  --gray-700: #d5e5da;
  --gray-700-rgb: 213, 229, 218;
  --gray-800: #e9f3ec;
  --gray-800-rgb: 233, 243, 236;
  --gray-900: #f5faf6;
  --gray-900-rgb: 245, 250, 246;

  /* Glass with dark green tint */
  --glass-transparent: rgba(13, 31, 21, 0.3);
  --glass-subtle: rgba(13, 31, 21, 0.6);
  --glass-light: rgba(13, 31, 21, 0.7);
  --glass-medium: rgba(13, 31, 21, 0.8);
  --glass-heavy: rgba(13, 31, 21, 0.85);
  --glass-solid: rgba(13, 31, 21, 0.92);
  --glass-white: rgba(20, 43, 29, 0.95);
  --glass-border: rgba(59, 168, 120, 0.2);

  /* Glass border tiers */
  --glass-border-subtle: rgba(89, 173, 120, 0.08);
  --glass-border-light: rgba(89, 173, 120, 0.12);
  --glass-border-medium: rgba(89, 173, 120, 0.18);
  --glass-border-strong: rgba(89, 173, 120, 0.25);
  --glass-border-heavy: rgba(89, 173, 120, 0.5);

  /* Semantic — `--color-success` left at the design-system default so
     the WS-status pip / success toasts stay in the same hue family as
     the IDLE status dots (see comment in `brand.css`). */
  --color-warning: #EABB2C;
  --color-error: #E44E43;

  /* Spotlight — green-dark */
  --spotlight-bg: #142b1d;
  --spotlight-text: #e9f3ec;
  --spotlight-text-subtle: #89ad94;
  --spotlight-text-muted: #5f9271;
  --spotlight-border: #1d3d28;
  --spotlight-hover: #1d3d28;
}
