/*
 * WindoorERP design tokens — SINGLE SOURCE OF TRUTH.
 *
 * Plain CSS on purpose. Three consumers need these tokens and only one of them
 * goes through Odoo's SCSS asset pipeline:
 *
 *   1. the Odoo backend and frontend bundles, via `assets` in the manifest;
 *   2. the WebCC Vue shell, <link>ed by windoor_ui_webcc's controller;
 *   3. the help-center docs layout, <link>ed by windoor_ui_portal.
 *
 * Consumers 2 and 3 render outside `web.assets_*`, so a .scss source could not
 * reach them. Previously each kept its own copy of this table and they drifted
 * (raised surface was #15213b here and #17243d there). Do not reintroduce a
 * second copy: add tokens to this file and link it.
 *
 * Product-specific bridge variables (--bs-*, --o-*, --mk-*) do NOT belong here.
 * They live in tokens.scss, which is backend-only.
 */

:root[data-wd-enabled="1"] {
  /* Brand primitives */
  --wd-ink-1: #0f1a35;
  --wd-ink-2: #334359;
  --wd-ink-3: #5b7191;
  --wd-ink-4: #8fa3bf;
  --wd-rule: rgba(15, 26, 53, 0.1);
  --wd-rule-soft: rgba(15, 26, 53, 0.06);
  --wd-card-bg: #f5f8fc;
  --wd-card-bg-alt: #fafbfd;
  --wd-blue: #3b9eff;
  --wd-blue-deep: #1b72d9;
  --wd-blue-darker: #155cb0;
  --wd-cyan: #06b6d4;
  --wd-green: #16a34a;
  --wd-warning: #d97706;
  --wd-danger: #dc2626;
  --wd-tint-blue: #eaf3ff;
  --wd-tint-blue-strong: #d6e8ff;
  --wd-row-selected: #d6e8ff;
  --wd-row-selected-hover: #c3ddff;
  --wd-header-dark: #060b17;
  --wd-brand-gradient: linear-gradient(90deg, #155cb0, #3b9eff, #06b6d4);

  /* Semantic surfaces and ink */
  --wd-bg-canvas: #f5f8fc;
  --wd-bg-surface: #ffffff;
  --wd-bg-raised: #fafbfd;
  --wd-text-strong: #0f1a35;
  --wd-text: #334359;
  --wd-text-muted: #5b7191;
  --wd-text-faint: #8fa3bf;
  --wd-border: rgba(15, 26, 53, 0.1);
  --wd-border-soft: rgba(15, 26, 53, 0.06);
  --wd-primary: #1b72d9;
  --wd-primary-hover: #155cb0;
  --wd-link: #155cb0;
  --wd-focus: #3b9eff;
  --wd-success: #16a34a;

  /* Focus indicator. Must be a solid, opaque colour: a low-alpha tint
     composites to roughly 1.3:1 against a light surface and is effectively
     invisible. This value clears WCAG 2.4.13's 3:1 against every light
     surface in the system (4.42:1 worst case, on the canvas). */
  --wd-focus-ring: #1b72d9;

  /* Text-safe status inks. The block colors above are calibrated as fills
     carrying a light foreground; used as text they fall to 2.79-3.30:1. These
     derived values clear AA against every light row surface (#ffffff, #fafbfd,
     #eaf3ff, #d6e8ff). Never use --wd-danger/--wd-warning/--wd-success/--wd-blue
     as a text color. */
  --wd-danger-text: #b91c1c;
  --wd-warning-text: #92400e;
  --wd-success-text: #166534;
  --wd-info-text: #155cb0;
  --wd-muted-text: #475569;

  /* Elevation, shape, motion */
  --wd-shadow-sm: 0 1px 2px rgba(15, 26, 53, 0.05);
  --wd-shadow-md: 0 10px 28px rgba(15, 26, 53, 0.09);
  --wd-radius-control: 8px;
  --wd-radius-surface: 10px;
  --wd-control-size: 40px;
  --wd-motion-fast: 160ms cubic-bezier(0.2, 0, 0, 1);
  --wd-motion-panel: 220ms cubic-bezier(0.2, 0, 0, 1);

  color-scheme: light;
}

:root[data-wd-enabled="1"][data-wd-theme="dark"] {
  --wd-bg-canvas: #060b17;
  --wd-bg-surface: #0f1a35;
  --wd-bg-raised: #15213b;
  --wd-card-bg: #131e39;
  --wd-card-bg-alt: #15213b;
  --wd-text-strong: #fafbfd;
  --wd-text: #ebeff4;
  --wd-text-muted: #8fa3bf;
  --wd-text-faint: #8397b4;
  --wd-border: rgba(214, 232, 255, 0.14);
  --wd-border-soft: rgba(214, 232, 255, 0.08);
  --wd-primary: #155cb0;
  --wd-primary-hover: #1b72d9;
  --wd-link: #3b9eff;
  /* 5.73:1 worst case against the dark surfaces. */
  --wd-focus-ring: #3b9eff;
  --wd-danger-text: #f87171;
  --wd-warning-text: #fbbf24;
  --wd-success-text: #4ade80;
  --wd-info-text: #3b9eff;
  --wd-muted-text: #8fa3bf;
  --wd-row-selected: #1d3357;
  --wd-row-selected-hover: #24406b;
  --wd-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --wd-shadow-md: 0 14px 36px rgba(0, 0, 0, 0.32);

  color-scheme: dark;
}

:root[data-wd-enabled="1"][data-wd-context="field"] {
  --wd-control-size: 48px;
}

:root[data-wd-enabled="1"][data-wd-context="shopfloor"] {
  --wd-control-size: 56px;
}

:root[data-wd-enabled="1"][data-wd-context="wallboard"] {
  --wd-control-size: 56px;
}
