/*
 * GYSMAP Global Foundation Variables
 * 
 * Defines core CSS custom properties for colors, spacing, and layout.
 * Handles the foundational light/dark theme toggle logic.
 */

:root {
	/* Core Colors - Light Mode Defaults */
	--bg-primary: #ffffff;
	--bg-secondary: #f3f4f6;
	--bg-elevated: #ffffff;
	
	--text-primary: #111827;
	--text-secondary: #4b5563;
	--text-muted: #9ca3af;
	
	--border-color: #e5e7eb;
	--border-color-focus: #3b82f6;

	/* Brand Colors */
	--brand-primary: #2563eb;
	--brand-primary-hover: #1d4ed8;
	--brand-secondary: #10b981;
	--brand-secondary-hover: #059669;
	
	/* Semantic Colors */
	--color-success: #10b981;
	--color-error: #ef4444;
	--color-warning: #f59e0b;
	--color-info: #3b82f6;

	/* Spacing Scale */
	--spacing-1: 0.25rem;  /* 4px */
	--spacing-2: 0.5rem;   /* 8px */
	--spacing-3: 0.75rem;  /* 12px */
	--spacing-4: 1rem;     /* 16px */
	--spacing-5: 1.25rem;  /* 20px */
	--spacing-6: 1.5rem;   /* 24px */
	--spacing-8: 2rem;     /* 32px */
	--spacing-10: 2.5rem;  /* 40px */
	--spacing-12: 3rem;    /* 48px */
	--spacing-16: 4rem;    /* 64px */

	/* Layout & Shapes */
	--border-radius-sm: 4px;
	--border-radius-md: 8px;
	--border-radius-lg: 12px;
	--border-radius-full: 9999px;
	
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	
	/* Shadows/Elevations */
	--z-index-dropdown: 1000;
	--z-index-sticky: 1020;
	--z-index-modal: 1050;
	
	/* Animation Defaults */
	--transition-fast: 150ms ease-in-out;
	--transition-normal: 250ms ease-in-out;
}

/* Dark Mode Overrides via Data Attribute */
[data-theme="dark"] {
	--bg-primary: #0f172a;
	--bg-secondary: #1e293b;
	--bg-elevated: #1e293b;
	
	--text-primary: #f8fafc;
	--text-secondary: #cbd5e1;
	--text-muted: #64748b;
	
	--border-color: #334155;
	--border-color-focus: #60a5fa;

	--brand-primary: #3b82f6;
	--brand-primary-hover: #60a5fa;
	
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Base Body Application */
html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Base Box Sizing Fix */
*, *::before, *::after {
	box-sizing: border-box;
}
