/**
 * Dream Property Search - Theme Variables
 * 
 * This file contains all CSS custom properties (variables) that define the visual theme.
 * Designers can override these by providing a custom theme file that loads after this one.
 * 
 * Sprint 7: Themeable architecture - drop in any CSS file to restyle the entire app!
 */

:root {
    /* ========== COLORS ========== */
    /* Primary colors for main actions and brand */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --primary-light: #dbeafe;
    --primary-dark: #1e3a8a;
    
    /* Secondary colors for accents */
    --secondary-color: #7c3aed;
    --secondary-hover: #6d28d9;
    --secondary-active: #5b21b6;
    --secondary-light: #ede9fe;
    --secondary-dark: #4c1d95;
    
    /* Neutral colors for text and backgrounds */
    --background-color: #ffffff;
    --background-secondary: #f9fafb;
    --background-tertiary: #f3f4f6;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    /* Border colors */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --border-dark: #d1d5db;
    
    /* Status colors */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --error-color: #ef4444;
    --error-light: #fee2e2;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    
    /* ========== TYPOGRAPHY ========== */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    
    --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;
    
    /* ========== SPACING ========== */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */
    
    /* ========== BORDERS ========== */
    --border-radius-sm: 0.25rem;   /* 4px */
    --border-radius-md: 0.5rem;    /* 8px */
    --border-radius-lg: 0.75rem;   /* 12px */
    --border-radius-xl: 1rem;      /* 16px */
    --border-radius-full: 9999px;  /* Full circle/pill */
    
    --border-width: 1px;
    --border-width-thick: 2px;
    
    /* ========== SHADOWS ========== */
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* ========== TRANSITIONS ========== */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
    
    /* ========== Z-INDEX ========== */
    --z-index-dropdown: 1000;
    --z-index-sticky: 1020;
    --z-index-fixed: 1030;
    --z-index-modal-backdrop: 1040;
    --z-index-modal: 1050;
    --z-index-popover: 1060;
    --z-index-tooltip: 1070;
}

/* ========== THEME VARIANTS ========== */
/* These can be applied with data-theme="dark", data-theme="modern", etc. */

/* Dark theme */
[data-theme="dark"] {
    --background-color: #1f2937;
    --background-secondary: #111827;
    --background-tertiary: #0f172a;
    --text-color: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --border-color: #374151;
    --border-light: #4b5563;
    --border-dark: #1f2937;
}

/* Modern theme - bright and colorful */
[data-theme="modern"] {
    --primary-color: #06b6d4;
    --primary-hover: #0891b2;
    --primary-active: #0e7490;
    --secondary-color: #f97316;
    --secondary-hover: #ea580c;
    --secondary-active: #c2410c;
    --border-radius-sm: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
}

/* Classic theme - professional and conservative */
[data-theme="classic"] {
    --primary-color: #1e40af;
    --primary-hover: #1e3a8a;
    --primary-active: #1e293b;
    --secondary-color: #475569;
    --secondary-hover: #334155;
    --secondary-active: #1e293b;
    --font-family: Georgia, 'Times New Roman', serif;
    --border-radius-sm: 0.125rem;
    --border-radius-md: 0.25rem;
    --border-radius-lg: 0.375rem;
    --border-radius-xl: 0.5rem;
}

/* ========== GLOBAL RESETS ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
}

/* ========== TYPOGRAPHY UTILITIES ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ========== UTILITY CLASSES ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }

.font-bold { font-weight: var(--font-weight-bold); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-medium { font-weight: var(--font-weight-medium); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }
