/* Nelo design tokens (from the Nelo design system), light and dark,
   mapped onto the shadcn-style variables Blazor Blueprint reads.
   Load this before blazorblueprint.css. Dark mode follows the `dark` class on <html>. */

:root {
  --nelo-bg: #f2f2f7;
  --nelo-surface: #ffffff;
  --nelo-surface-raised: #ffffff;
  --nelo-fill: rgba(118, 118, 128, 0.12);
  --nelo-bar: rgba(249, 249, 251, 0.82);
  --nelo-ink: #111318;
  --nelo-ink-muted: #5f6470;
  --nelo-separator: rgba(60, 60, 67, 0.29);
  --nelo-accent: #2350d8;
  --nelo-accent-soft: #e3e9fc;
  --nelo-on-accent: #ffffff;
  --nelo-tone-positive: #1a7f52;
  --nelo-tone-neutral: #636877; /* 4.98:1 on the page background (WCAG AA) */
  --nelo-tone-negative: #b3372f;
  --nelo-danger: #c2413b;
  --nelo-on-danger: #ffffff;
  --nelo-overlay: rgba(0, 0, 0, 0.35);
  --nelo-image-scrim: rgba(0, 0, 0, 0.62);
  --nelo-on-image: #ffffff;
  --nelo-shadow-card: 0 4px 14px rgba(0, 0, 0, 0.12);
  --nelo-shadow-sheet: 0 -2px 20px rgba(0, 0, 0, 0.15);
  --nelo-toast-action: #7d9bff;
  --nelo-thumb-l: 74%;
  --nelo-thumb-s: 42%;

  --nelo-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, sans-serif;
  --nelo-font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;

  --nelo-space-1: 4px;
  --nelo-space-2: 8px;
  --nelo-space-3: 12px;
  --nelo-space-4: 16px;
  --nelo-space-5: 20px;
  --nelo-space-6: 24px;
  --nelo-space-8: 32px;
  --nelo-radius-sm: 8px;
  --nelo-radius-md: 12px;
  --nelo-radius-lg: 16px;
  --nelo-radius-pill: 999px;
  --nelo-tap-target: 44px;
  --nelo-tab-bar-height: 49px;
  --nelo-nav-bar-height: 44px;
  --nelo-thumb: 64px;
  --nelo-content-max: 720px;
  /* iPad (regular and wide windows; see the end of nelo.css) */
  --nelo-sidebar-w: 260px;
  --nelo-pane-w: clamp(380px, 40vw, 500px);
  --nelo-grid-max: 1180px;
  /* Desktop (1280px and up): the whole frame, sidebar to reading pane, stops growing here and sits centred. */
  --nelo-frame-max: 1680px;
  --nelo-frame-gutter: 0px;
  --nelo-shadow-tile: 0 1px 3px rgba(0, 0, 0, 0.08);
  --nelo-shadow-popover: 0 10px 36px rgba(0, 0, 0, 0.22);
  /* What the fixed chrome leaves for the page: the sidebar on the left, a reading pane on the right. */
  --nelo-main-left: 0px;
  --nelo-main-right: 0px;
  --nelo-ease: cubic-bezier(0.32, 0.72, 0, 1);

  /* Blazor Blueprint (shadcn) variables */
  --background: var(--nelo-bg);
  --foreground: var(--nelo-ink);
  --card: var(--nelo-surface);
  --card-foreground: var(--nelo-ink);
  --popover: var(--nelo-surface-raised);
  --popover-foreground: var(--nelo-ink);
  --primary: var(--nelo-accent);
  --primary-foreground: var(--nelo-on-accent);
  --secondary: var(--nelo-accent-soft);
  --secondary-foreground: var(--nelo-accent);
  --muted: var(--nelo-fill);
  --muted-foreground: var(--nelo-ink-muted);
  --accent: var(--nelo-accent-soft);
  --accent-foreground: var(--nelo-accent);
  --destructive: var(--nelo-danger);
  --destructive-foreground: var(--nelo-on-danger);
  --border: var(--nelo-separator);
  --input: var(--nelo-separator);
  --ring: var(--nelo-accent);
  --radius: 12px;
  --font-sans: var(--nelo-font-text);

  color-scheme: light;
}

:root.dark {
  --nelo-bg: #000000;
  --nelo-surface: #1c1c1e;
  --nelo-surface-raised: #2c2c2e;
  --nelo-fill: rgba(118, 118, 128, 0.24);
  --nelo-bar: rgba(22, 22, 24, 0.82);
  --nelo-ink: #f2f3f7;
  --nelo-ink-muted: #a1a6b3;
  --nelo-separator: rgba(84, 84, 88, 0.65);
  --nelo-accent: #7d9bff;
  --nelo-accent-soft: #1f2a4d;
  --nelo-on-accent: #0b1020;
  --nelo-tone-positive: #4cc38a;
  --nelo-tone-neutral: #9096a5;
  --nelo-tone-negative: #f07a72;
  --nelo-danger: #ff6961;
  --nelo-on-danger: #2a0705;
  --nelo-overlay: rgba(0, 0, 0, 0.55);
  --nelo-shadow-card: 0 4px 14px rgba(0, 0, 0, 0.5);
  --nelo-shadow-sheet: 0 -2px 20px rgba(0, 0, 0, 0.6);
  --nelo-shadow-tile: 0 0 0 0.5px rgba(255, 255, 255, 0.06);
  --nelo-shadow-popover: 0 10px 36px rgba(0, 0, 0, 0.6);
  --nelo-toast-action: #2350d8;
  --nelo-thumb-l: 32%;
  --nelo-thumb-s: 30%;
  color-scheme: dark;
}

@media (prefers-reduced-transparency: reduce) {
  :root { --nelo-bar: var(--nelo-surface); }
}
