/**
 * Design Tokens — CSS Custom Properties
 *
 * Central source of truth for all visual styling across the platform.
 * Dark theme as default — this is an AI companion / content platform.
 *
 * CLASS NAMING RULES:
 * -------------------
 * - NO Bootstrap class names (btn, container, card, alert, badge, etc.)
 * - NO Tailwind utility classes (flex, grid, w-*, text-sm, font-bold, etc.)
 * - Semantic names only: button-primary, content-wrapper, panel, message-error
 *
 * @package    HoloSuiteAI
 * @subpackage Theme
 * @version    2.0.0
 * @author     HoloSuite Industries
 */

:root {
    /* ============================================================
     * COLORS — Brand & UI (Purple/Violet Primary)
     * ============================================================ */
    --color-primary: #7c3aed;
    --color-primary-hover: #8b5cf6;
    --color-primary-active: #6d28d9;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #5b21b6;
    --color-primary-subtle: rgba(124, 58, 237, 0.12);

    --color-secondary: #6366f1;
    --color-secondary-hover: #818cf8;
    --color-secondary-active: #4f46e5;

    --color-accent: #ec4899;
    --color-accent-hover: #f472b6;
    --color-accent-light: #fbcfe8;

    --color-success: #10b981;
    --color-success-hover: #34d399;
    --color-success-light: rgba(16, 185, 129, 0.15);
    --color-success-text: #6ee7b7;

    --color-warning: #f59e0b;
    --color-warning-hover: #fbbf24;
    --color-warning-light: rgba(245, 158, 11, 0.15);
    --color-warning-text: #fcd34d;

    --color-danger: #ef4444;
    --color-danger-hover: #f87171;
    --color-danger-light: rgba(239, 68, 68, 0.15);
    --color-danger-text: #fca5a5;

    --color-info: #3b82f6;
    --color-info-hover: #60a5fa;
    --color-info-light: rgba(59, 130, 246, 0.15);
    --color-info-text: #93c5fd;

    /* ============================================================
     * BACKGROUND COLORS — Dark Theme Default
     * ============================================================ */
    --bg-body: #0a0a0f;
    --bg-primary: #0f0f1a;
    --bg-secondary: #141422;
    --bg-surface: #1a1a2e;
    --bg-elevated: #222240;
    --bg-overlay: rgba(0, 0, 0, 0.75);
    --bg-sunken: #060609;
    --bg-input: #1a1a2e;
    --bg-hover: rgba(124, 58, 237, 0.08);

    /* ============================================================
     * TEXT COLORS
     * ============================================================ */
    --text-primary: #f1f1f4;
    --text-secondary: #c4c4d4;
    --text-muted: #8888a4;
    --text-disabled: #55556a;
    --text-inverse: #0a0a0f;
    --text-link: var(--color-primary-light);
    --text-link-hover: var(--color-primary);
    --text-heading: #ffffff;

    /* ============================================================
     * BORDER COLORS
     * ============================================================ */
    --border-primary: #2a2a44;
    --border-secondary: #1f1f36;
    --border-focus: var(--color-primary);
    --border-error: var(--color-danger);
    --border-success: var(--color-success);

    /* ============================================================
     * TYPOGRAPHY
     * ============================================================ */
    --font-family: 'Inter', 'Figtree', -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code',
        'Consolas', monospace;

    /* Font Sizes */
    --font-size-xs: 0.75rem;     /* 12px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-md: 1.125rem;    /* 18px */
    --font-size-lg: 1.25rem;     /* 20px */
    --font-size-xl: 1.5rem;      /* 24px */
    --font-size-2xl: 1.875rem;   /* 30px */
    --font-size-3xl: 2.25rem;    /* 36px */
    --font-size-4xl: 3rem;       /* 48px */
    --font-size-5xl: 3.75rem;    /* 60px */

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-snug: 1.35;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* ============================================================
     * SPACING SCALE (8px base)
     * ============================================================ */
    --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-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    --space-24: 6rem;      /* 96px */
    --space-32: 8rem;      /* 128px */

    /* ============================================================
     * BORDER RADIUS
     * ============================================================ */
    --radius-sm: 0.25rem;     /* 4px */
    --radius-md: 0.5rem;      /* 8px */
    --radius-lg: 0.75rem;     /* 12px */
    --radius-xl: 1rem;        /* 16px */
    --radius-2xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;

    /* ============================================================
     * SHADOWS (Dark theme — more pronounced)
     * ============================================================ */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5),
                 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
                 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
                 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
    --shadow-glow-sm: 0 0 10px rgba(124, 58, 237, 0.2);

    /* ============================================================
     * TRANSITIONS
     * ============================================================ */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ============================================================
     * Z-INDEX SCALE
     * ============================================================ */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-overlay: 400;
    --z-modal: 500;
    --z-toast: 600;
    --z-tooltip: 700;

    /* ============================================================
     * LAYOUT / CONTAINERS
     * ============================================================ */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;
    --content-max-width: 1280px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 72px;
    --nav-height: 64px;
}

/**
 * ==========================================================================
 * LIGHT THEME OVERRIDES
 * Applied when [data-theme="light"] is set on <html>.
 * Inverts background/surface/border/text tokens to light equivalents.
 * All component CSS uses var() from :root above — these overrides cascade
 * automatically without touching any component CSS.
 * ==========================================================================
 */
[data-theme="light"] {
    /* Backgrounds */
    --bg-body:       #f5f5f7;
    --bg-primary:    #ffffff;
    --bg-secondary:  #f0f0f5;
    --bg-surface:    #ffffff;
    --bg-elevated:   #f9f9fc;
    --bg-overlay:    rgba(0, 0, 0, 0.4);
    --bg-sunken:     #eaeaef;
    --bg-input:      #ffffff;
    --bg-hover:      rgba(124, 58, 237, 0.06);

    /* Text */
    --text-primary:   #1a1a2e;
    --text-secondary: #333355;
    --text-muted:     #666680;
    --text-disabled:  #aaaabc;
    --text-inverse:   #ffffff;
    --text-heading:   #0f0f1e;

    /* Borders */
    --border-primary:   #e2e2ea;
    --border-secondary: #ededf5;

    /* Shadows — lighter in light mode */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.08);
}
