/* =============================================================================
   base/variables.css
   Single source of truth for all design tokens — light theme only.
   ============================================================================= */

:root {
    color-scheme: light;

    /* ── Brand ─────────────────────────────────────────────────────────── */
    /* White-label agencies override this whole block at runtime (see WhiteLabelTheme.cs),
       so never hard-code a brand colour in a stylesheet: derive it from these tokens. */
    --primary:            #1e40af;
    --primary-rgb:        30, 64, 175;
    --primary-dark:       #1a3790;
    --primary-darker:     #172554;
    --primary-soft:       #60a5fa;
    --primary-light:      #eff6ff;
    --primary-tint:       #dbeafe;
    --primary-tint-strong: #bfdbfe;

    /* ── Text ───────────────────────────────────────────────────────────── */
    --text-dark:          #1a1f36;
    --text-medium:        #4b5563;
    --text-light:         #6b7280;
    --text-subtle:        #9ca3af;

    /* ── Backgrounds ────────────────────────────────────────────────────── */
    --bg-primary:         #ffffff;
    --bg-secondary:       #f9fafb;
    --bg-tertiary:        #f3f4f6;
    --bg-hover:           #f3f4f6;
    --input-bg:           #ffffff;

    /* legacy alias — do not add new uses */
    --background:         #ffffff;

    /* ── Borders ────────────────────────────────────────────────────────── */
    --border-color:       #e5e7eb;
    --border-light:       #f3f4f6;
    --border-focus:       var(--primary);

    /* ── Shadows ────────────────────────────────────────────────────────── */
    --shadow-sm:          0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:          0 4px 6px rgba(0, 0, 0, 0.06);
    --shadow-lg:          0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-primary:     0 4px 12px rgba(var(--primary-rgb), 0.15);
    --card-shadow:        0 1px 3px rgba(var(--primary-rgb), 0.08);
    --shadow-color:       rgba(var(--primary-rgb), 0.05);

    /* Overlays (modals, loaders, scrims) */
    --overlay-scrim:      rgba(0, 0, 0, 0.45);
    --overlay-light:      rgba(255, 255, 255, 0.82);

    /* ── Semantic: Success ──────────────────────────────────────────────── */
    --success:            #10b981;
    --success-light:      #d1fae5;
    --success-bg:         #ecfdf5;
    --success-border:     #a7f3d0;
    --success-color:      #10b981;

    /* ── Semantic: Warning ──────────────────────────────────────────────── */
    --warning:            #f59e0b;
    --warning-light:      #fef3c7;
    --warning-bg:         #fffbeb;

    /* ── Semantic: Danger ───────────────────────────────────────────────── */
    --danger:             #ef4444;
    --danger-light:       #fee2e2;
    --danger-bg:          #fef2f2;
    --danger-border:      #fecaca;
    --danger-color:       #ef4444;

    /* ── Semantic: Info ─────────────────────────────────────────────────── */
    --info:               #3b82f6;
    --info-light:         #dbeafe;
    --info-bg:            #eff6ff;

    /* ── Accent ─────────────────────────────────────────────────────────── */
    --accent-teal:        #14b8a6;
    --accent-purple:      #8b5cf6;
    --accent-indigo:      #6366f1;

    /* ── Gray scale ─────────────────────────────────────────────────────── */
    --gray-50:            #f9fafb;
    --gray-100:           #f3f4f6;
    --gray-200:           #e5e7eb;
    --gray-300:           #d1d5db;
    --gray-400:           #9ca3af;
    --gray-500:           #6b7280;
    --gray-600:           #4b5563;
    --gray-700:           #374151;
    --gray-800:           #1f2937;
    --gray-900:           #111827;

    /* ── Border radius ──────────────────────────────────────────────────── */
    --radius-sm:          6px;
    --radius-md:          8px;
    --radius-lg:          12px;
    --radius-xl:          16px;
    --radius-full:        9999px;

    /* ── Spacing ────────────────────────────────────────────────────────── */
    --space-1:            0.25rem;
    --space-2:            0.5rem;
    --space-3:            0.75rem;
    --space-4:            1rem;
    --space-5:            1.25rem;
    --space-6:            1.5rem;
    --space-8:            2rem;
    --space-10:           2.5rem;
    --space-12:           3rem;

    /* ── Typography ─────────────────────────────────────────────────────── */
    --font-family:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    --font-size-xs:       0.6875rem;
    --font-size-sm:       0.8125rem;
    --font-size-base:     0.875rem;
    --font-size-md:       0.9375rem;
    --font-size-lg:       1rem;
    --font-size-xl:       1.125rem;
    --font-size-2xl:      1.25rem;
    --font-size-3xl:      1.5rem;
    --font-weight-normal:   400;
    --font-weight-medium:   500;
    --font-weight-semibold: 600;
    --font-weight-bold:     700;
    --line-height-tight:    1.25;
    --line-height-normal:   1.5;
    --line-height-relaxed:  1.75;

    /* ── Transitions ────────────────────────────────────────────────────── */
    --transition-fast:    all 0.15s ease;
    --transition-base:    all 0.2s ease;
    --transition-slow:    all 0.3s ease;
    --transition:         all 0.2s ease;

    /* ── Breakpoints (reference only — use values in @media rules) ─────── */
    /* --bp-xs:  480px   — small phones                                    */
    /* --bp-sm:  640px   — large phones / small embedded viewports         */
    /* --bp-md:  768px   — tablets / medium embedded viewports             */
    /* --bp-lg:  1024px  — small laptops                                   */
    /* --bp-xl:  1200px  — desktops                                        */

    /* ── Z-index scale ──────────────────────────────────────────────────── */
    --z-dropdown:         1035;
    --z-sticky:           1020;
    --z-fixed:            1030;
    --z-modal-backdrop:   1040;
    --z-modal:            1050;
    --z-modal-overlay:    1050;
    --z-popover:          1060;
    --z-tooltip:          1070;
    --z-global-loader:    1080;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
