/*
 * Global design tokens for the Trigger UI.
 * Keep shared color, spacing, and typography definitions centralized here so
 * feature stylesheets can stay focused on layout concerns.
 */
:root {
  color-scheme: light dark;
  --font-family-sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --space-page: 2rem;
  --space-gap: 0.6rem;
  --space-panel: 1.5rem;
  --space-panel-mobile: 1.2rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --color-body-bg: #f3f4f6;
  --color-surface: #ffffff;
  --color-surface-raised: rgba(255, 255, 255, 0.95);
  --color-surface-muted: rgba(255, 255, 255, 0.7);
  --color-surface-highlight: rgba(59, 130, 246, 0.08);
  --color-text-primary: #111827;
  --color-text-inverse: #ffffff;
  --color-text-muted: #6b7280;
  --color-text-strong: #1f2937;
  --color-link: #1d4ed8;
  --color-link-strong: #2563eb;
  --color-border: #d1d5db;
  --color-border-subtle: #e5e7eb;
  --color-border-soft: rgba(229, 231, 235, 0.6);
  --color-panel-border: rgba(148, 163, 184, 0.35);
  --color-outline: rgba(17, 24, 39, 0.1);

  --color-success: #047857;
  --color-success-strong: #065f46;
  --color-success-muted: rgba(16, 185, 129, 0.15);
  --color-danger: #b91c1c;
  --color-danger-muted: rgba(239, 68, 68, 0.15);
  --color-warning: #b45309;
  --color-neutral-pill: rgba(107, 114, 128, 0.16);

  --color-badge-bg: rgba(37, 99, 235, 0.12);
  --color-key-bg: rgba(17, 24, 39, 0.1);
  --color-code-surface: #111827;
  --color-code-text: #f3f4f6;

  --gradient-primary: linear-gradient(
    120deg,
    var(--color-link-strong),
    var(--color-link)
  );
  --gradient-progress: linear-gradient(
    90deg,
    var(--color-link-strong),
    var(--color-link)
  );

  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-button: 0 1px 4px rgba(0, 0, 0, 0.12);
  --shadow-panel: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  --transition-snappy: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-body-bg: #111827;
    --color-surface: #1f2937;
    --color-surface-raised: rgba(30, 41, 59, 0.94);
    --color-surface-muted: rgba(55, 65, 81, 0.5);
    --color-surface-highlight: rgba(37, 99, 235, 0.2);
    --color-text-primary: #f9fafb;
    --color-text-inverse: #111827;
    --color-text-muted: #9ca3af;
    --color-text-strong: #f3f4f6;
    --color-border: rgba(148, 163, 184, 0.4);
    --color-border-subtle: rgba(75, 85, 99, 0.6);
    --color-border-soft: rgba(75, 85, 99, 0.45);
    --color-panel-border: rgba(59, 130, 246, 0.35);
    --color-outline: rgba(148, 163, 184, 0.4);
    --color-neutral-pill: rgba(148, 163, 184, 0.24);
    --color-success-muted: rgba(16, 185, 129, 0.25);
    --color-success: #34d399;
    --color-success-strong: #10b981;
    --color-danger-muted: rgba(239, 68, 68, 0.25);
    --color-key-bg: rgba(148, 163, 184, 0.25);
    --color-code-surface: #0f172a;
    --color-code-text: #f8fafc;
    --shadow-soft: 0 2px 12px rgba(15, 23, 42, 0.4);
    --shadow-panel: 0 20px 40px rgba(15, 23, 42, 0.45);
  }
}
