/**
 * AI Chat — design tokens shim for fcs_v4
 * ------------------------------------------------------------------
 * ai-chat.css (and ai-chat-page.css) were built for fx-new-live's
 * design system (themes.css). fcs_v4's main.css doesn't define the
 * spacing / radius / typography scale they rely on, so the floating
 * bar lost its `position:fixed` offsets, pill radius and glass look.
 *
 * These are the exact values from fx-new-live themes.css. Loaded
 * BEFORE ai-chat.css so the widget renders identically. Only the
 * tokens that were missing in fcs_v4 are defined here (no overrides
 * of fcs_v4's own --primary-blue etc.).
 */
:root {
    /* Spacing scale */
    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-7: 1.75rem;   /* 28px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */

    --gap-xs: var(--space-1);
    --gap-sm: var(--space-2);
    --gap-md: var(--space-3);

    /* Border radius scale */
    --radius-sm:  0.25rem;   /* 4px */
    --radius-md:  0.375rem;  /* 6px */
    --radius-lg:  0.5rem;    /* 8px */
    --radius-xl:  0.75rem;   /* 12px */
    --radius-2xl: 1rem;      /* 16px */
    --radius-3xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;   /* Pills, avatars */

    /* RGB form of primary blue (for rgba() shadows) */
    --primary-blue-rgb: 59, 130, 246;

    /* Typography — families (match fcsapi.com site font = Lexend) */
    --font-primary: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Consolas', 'Monaco', monospace;

    /* Typography — weights */
    --font-normal:   400;
    --font-medium:   500;
    --font-semibold: 600;
    --font-bold:     700;

    /* Typography — sizes */
    --text-xs:   0.75rem;    /* 12px */
    --text-sm:   0.8125rem;  /* 13px */
    --text-base: 0.875rem;   /* 14px */
    --text-lg:   1rem;       /* 16px */
    --text-xl:   1.125rem;   /* 18px */
    --text-2xl:  1.25rem;    /* 20px */

    /* Typography — line height & tracking */
    --leading-tight:   1.25;
    --leading-normal:  1.5;
    --leading-relaxed: 1.625;
    --tracking-tight: -0.0125em;

    /* ------------------------------------------------------------------
       Colors / surfaces (LIGHT) — needed because regular fcs_v4 pages
       load style.css (NOT main.css), so the widget had no color tokens.
       Values mirror fcs_v4 main.css :root.
       ------------------------------------------------------------------ */
    --primary-blue:      #3B82F6;
    --primary-blue-dark: #2563EB;
    --primary-blue-rgb:  59, 130, 246;

    --bg-primary:        #FFFFFF;
    --bg-secondary:      #F8FAFC;
    --bg-tertiary:       #F1F5F9;
    --bg-dark:           #0F172A;
    --bg-dark-secondary: #1E293B;

    --text-primary:   #0F172A;
    --text-secondary: #475569;
    --text-muted:     #94A3B8;
    --text-white:     #FFFFFF;

    --border-light:  #E2E8F0;
    --border-medium: #CBD5E1;
    --border-dark:   #334155;

    --color-green: #10B981;
    --color-red:   #EF4444;
    --green-rgb:   16, 185, 129;
    --red-rgb:     239, 68, 68;

    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    --transition-fast:   0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
}

/* Dark theme overrides — mirror fcs_v4 main.css [data-theme="dark"] */
[data-theme="dark"] {
    --bg-primary:   #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary:  #334155;

    --text-primary:   #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted:     #64748B;

    --border-light:  #334155;
    --border-medium: #475569;
    --border-dark:   #64748B;
}
