/**
 * WindMade.ca — shared design tokens (Phase 1 brand contract).
 *
 * Palette (locked):
 *   primary       #C8102E  Canada Red — CTAs, links, active states
 *   primary_dark  #A50D25  hover / pressed
 *   primary_soft  #FFF0F2  soft fills / focus rings
 *   secondary     #0F1720  ink — secondary chrome
 *   ok / warn / danger stay semantic (green / amber / red)
 *
 * Source of truth also mirrored in:
 *   config/windmade.php → brand.colors
 *   BuyerApp|ManufactureApp|LogisticsApp → lib/theme/windmade_brand.dart
 *
 * Forbidden as brand primary: #1455AC (legacy blue), #F58300 (legacy orange).
 */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --wm-ink: #0f1720;
  --wm-muted: #6b7785;
  --wm-line: #e6e9ed;
  --wm-surface: #ffffff;
  --wm-page: #f5f6f8;
  --wm-brand: #c8102e;
  --wm-brand-dark: #a50d25;
  --wm-brand-soft: #fff0f2;
  --wm-brand-ring: rgba(200, 16, 46, 0.18);
  --wm-trust: #c8102e;
  --wm-trust-soft: #fff0f2;
  --wm-action: #c8102e;
  --wm-action-dark: #a50d25;
  --wm-ok: #0a7a3e;
  --wm-ok-soft: #e8f6ee;
  --wm-warn: #b45309;
  --wm-danger: #b91c1c;
  --wm-promo: #c8102e;
  --wm-star: #f5a623;
  --wm-radius: 10px;
  --wm-radius-sm: 6px;
  --wm-radius-lg: 14px;
  --wm-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wm-shadow: 0 8px 28px rgba(15, 23, 32, 0.06);

  /* Back-compat aliases used by older module CSS */
  --wm-mfr-ink: var(--wm-ink);
  --wm-mfr-muted: var(--wm-muted);
  --wm-mfr-line: var(--wm-line);
  --wm-mfr-page: var(--wm-page);
  --wm-mfr-surface: var(--wm-surface);
  --wm-mfr-trust: var(--wm-trust);
  --wm-mfr-trust-soft: var(--wm-trust-soft);
  --wm-mfr-action: var(--wm-action);
  --wm-mfr-ok: var(--wm-ok);
  --wm-mfr-radius: 12px;
  --wm-mfr-font: var(--wm-font);

  --wm-b2b-ink: var(--wm-ink);
  --wm-b2b-muted: var(--wm-muted);
  --wm-b2b-line: var(--wm-line);
  --wm-b2b-surface: var(--wm-surface);
  --wm-b2b-page: var(--wm-page);
  --wm-b2b-trust: var(--wm-trust);
  --wm-b2b-trust-soft: var(--wm-trust-soft);
  --wm-b2b-action: var(--wm-action);
  --wm-b2b-action-dark: var(--wm-action-dark);
  --wm-b2b-promo: var(--wm-promo);
  --wm-b2b-featured: var(--wm-action);
  --wm-b2b-deal: var(--wm-brand);
  --wm-b2b-capability: #0f766e;
  --wm-b2b-discount: var(--wm-brand-dark);
  --wm-b2b-ok: var(--wm-ok);
  --wm-b2b-ok-soft: var(--wm-ok-soft);
  --wm-b2b-star: var(--wm-star);
  --wm-b2b-radius: var(--wm-radius);
  --wm-b2b-radius-sm: var(--wm-radius-sm);
  --wm-b2b-font: var(--wm-font);

  --wm-cal-ink: var(--wm-ink);
  --wm-cal-muted: var(--wm-muted);
  --wm-cal-line: var(--wm-line);
  --wm-cal-soft: var(--wm-page);
  --wm-cal-trust: var(--wm-trust);
  --wm-cal-trust-soft: var(--wm-trust-soft);
  --wm-cal-action: var(--wm-action);
  --wm-cal-ok: var(--wm-ok);
  --wm-cal-radius: 12px;

  --wm-chat-ink: var(--wm-ink);
  --wm-chat-muted: var(--wm-muted);
  --wm-chat-line: var(--wm-line);
  --wm-chat-page: var(--wm-page);
  --wm-chat-surface: var(--wm-surface);
  --wm-chat-trust: var(--wm-trust);
  --wm-chat-trust-soft: var(--wm-trust-soft);
  --wm-chat-action: var(--wm-action);
  --wm-chat-action-soft: var(--wm-brand-soft);
  --wm-chat-in: #f1f3f5;
  --wm-chat-radius: var(--wm-radius-lg);
  --wm-chat-font: var(--wm-font);
}

/* Platform chrome: prefer WindMade type on B2B surfaces */
.wm-header,
.wm-sourcing,
.wm-mfr,
.wm-buyer,
.wm-pdp,
.wm-chat,
.wm-mfg-card,
.wm-know-supplier,
.wm-specs {
  font-family: var(--wm-font);
}

/* Shared primary / outline button language */
.wm-btn,
.wm-cta {
  font-family: var(--wm-font);
  font-weight: 700;
  border-radius: var(--wm-radius-sm);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wm-btn--action,
.wm-cta--primary {
  background: var(--wm-action);
  border: 1px solid var(--wm-action);
  color: #fff !important;
}

.wm-btn--action:hover,
.wm-cta--primary:hover {
  background: var(--wm-action-dark);
  border-color: var(--wm-action-dark);
  color: #fff !important;
}

.wm-btn--outline-dark,
.wm-cta--secondary {
  background: var(--wm-surface);
  border: 1px solid var(--wm-line);
  color: var(--wm-ink) !important;
}

.wm-btn--outline-dark:hover,
.wm-cta--secondary:hover {
  border-color: var(--wm-trust);
  color: var(--wm-trust) !important;
}

/* ---- Phase 12: shared responsive tokens ---- */
:root {
  --wm-touch: 44px;
  --wm-gutter: clamp(0.85rem, 2.5vw, 1.25rem);
  --wm-content-max: 1200px;
}

@media (max-width: 991.98px) {
  :root {
    --wm-gutter: max(0.85rem, env(safe-area-inset-left, 0px));
  }
}
