/*
 * Shared design tokens (ADR 0010). Load this AFTER sneat/assets/vendor/css/core.css.
 * The back office and the POS consume these; never hard-code colours or sizes in pages.
 * Values mirror Sneat 3.x core.css. The brand primary is pending the owner's choice
 * (QUESTIONS.md P5); change --app-primary* only here.
 */
:root {
  /* Brand */
  --app-primary: #696cff;
  --app-primary-rgb: 105, 108, 255;
  --app-primary-subtle: #e7e7ff;
  --bs-primary: var(--app-primary);
  --bs-primary-rgb: var(--app-primary-rgb);

  /* Semantic */
  --app-success: #71dd37;
  --app-info: #03c3ec;
  --app-warning: #ffab00;
  --app-danger: #ff3e1d;
  --app-muted: #8592a3;

  /* Module colours that Bootstrap has no token for (UI-STANDARD §3, page header) */
  --app-violet: #8f5cff;
  --app-violet-rgb: 143, 92, 255;
  --app-cyan: #00b8c4;
  --app-cyan-rgb: 0, 184, 196;
  --app-pink: #ff4d94;
  --app-pink-rgb: 255, 77, 148;

  /* Product brand (ADR 0023) */
  --app-brand-lime: #a3e635;
  --app-brand-lime-rgb: 163, 230, 53;

  /* Surfaces and text */
  --app-bg: #f5f5f9;
  --app-paper: #fff;
  --app-text: #646e78;
  --app-heading: #384551;
  --app-border: #e4e6e8;

  /* Type */
  --app-font: "Open Sans", -apple-system, "Segoe UI", sans-serif;
  --bs-font-sans-serif: var(--app-font);
  --app-font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --app-fs-body: 0.9375rem;
  --app-fs-total: 2rem;          /* POS grand total, 32 px */
  --app-fs-pos-line: 1.0625rem;

  /* Shape */
  --app-radius: 0.375rem;
  --app-radius-lg: 0.5rem;
  --app-shadow: 0 0.1875rem 0.5rem 0 rgba(34, 48, 62, 0.1);

  /* Spacing (Bootstrap scale) */
  --app-space-1: 0.25rem;
  --app-space-2: 0.5rem;
  --app-space-3: 1rem;
  --app-space-4: 1.5rem;

  /* Targets (ui-research §3; WCAG 2.2) */
  --app-target-min: 44px;        /* never smaller on the POS */
  --app-target-pos: 64px;        /* default POS button */
  --app-target-dense: 24px;      /* back-office dense mode minimum */
  --app-gap-pos: 8px;

  /* Status */
  --app-online: var(--app-success);
  --app-syncing: var(--app-warning);
  --app-offline: var(--app-danger);

  /* Focus */
  --app-focus-ring: 0 0 0 0.25rem rgba(var(--app-primary-rgb), 0.35);
}

/* Alternative brand palette for the owner to compare (DECISIONS.md P5).
   Enable with <html data-app-palette="lime">. Lime-700 is used as the primary
   because lighter limes fail WCAG AA contrast with white text. */
:root { --app-on-primary: #fff; }
[data-app-palette="lime"] {
  --app-primary: #4d7c0f;
  --app-primary-rgb: 77, 124, 15;
  --app-primary-subtle: #ecfccb;
  --app-on-primary: #fff;
  --app-success: #16a34a;
}

[data-bs-theme="dark"] {
  --app-bg: #232333;
  --app-paper: #2b2c40;
  --app-text: #b2b2c4;
  --app-heading: #d5d5e2;
  --app-border: #4e4f6c;
}

:focus-visible {
  outline: none;
  box-shadow: var(--app-focus-ring);
}
