/* Centralized Theme Stylesheet
 * ============================
 * Update colors here to change the theme across the entire application
 * 
 * HOW TO CHANGE THEME COLORS:
 * 1. Modify --color-primary below (e.g., #9e0e0e)
 * 2. Update --color-primary-rgb to match (e.g., 158, 14, 14 for #9e0e0e)
 * 3. Also update the Tailwind config in includes/theme_config.php
 * 4. Refresh your browser to see changes
 * 
 * TO CONVERT HEX TO RGB:
 * - Use an online converter or calculate manually
 * - Example: #9e0e0e = rgb(158, 14, 14)
 * - Enter as: --color-primary-rgb: 158, 14, 14;
 * 
 * CURRENT THEME: Sophisticated Deep Emerald & Gold
 * Primary Color: #047857 (Deep Emerald Green)
 * A classy, professional color scheme perfect for financial applications
 * Elegant green tones - NO BLUE COLORS
 */

:root {
    /* Primary Theme Colors - Sophisticated Deep Emerald & Gold Scheme */
    /* Elegant, professional, and timeless color palette - NO BLUE */
    --color-primary: #047857;              /* Deep emerald green - sophisticated primary */
    --color-primary-hover: #065f46;        /* Darker emerald on hover */
    --color-primary-light: #10b981;        /* Bright emerald for accents */
    --color-primary-dark: #064e3b;         /* Very dark emerald for depth */
    
    /* RGB values for rgba() usage - MUST MATCH PRIMARY COLOR */
    /* For #047857: R=4, G=120, B=87 */
    --color-primary-rgb: 4, 120, 87;       /* RGB values of primary color */
    
    /* Background Colors */
    --color-background-light: #ffffff;     /* White background */
    --color-background-dark: #0f172a;      /* Dark slate background */
    
    /* Text Colors */
    --color-text-light: #1e293b;           /* Dark slate text */
    --color-text-dark: #f1f5f9;            /* Light slate text */
    --color-text-secondary-light: #64748b;  /* Medium slate */
    --color-text-secondary-dark: #94a3b8;   /* Light slate */
    
    /* Surface Colors */
    --color-surface-light: #f8fafc;        /* Very light gray */
    --color-surface-dark: #1e293b;         /* Dark slate */
    
    /* Status Colors */
    --color-positive: #22c55e;              /* Green */
    --color-negative: #ef4444;              /* Red */
    
    /* Border Colors */
    --color-border-light: #e2e8f0;         /* Light gray border */
    --color-border-dark: #334155;           /* Dark gray border */
    
    /* Button Styles - Compact Design */
    --button-height: 2.5rem;                /* 40px - more compact */
    --button-padding-x: 0.875rem;          /* 14px - less padding */
    --button-padding-y: 0.5rem;            /* 8px */
    --button-gap: 0.5rem;                  /* 8px gap between icon and text */
    --button-border-radius: 0.5rem;        /* 8px rounded corners */
    
    /* Card Padding - Reduced */
    --card-padding: 1rem;                  /* 16px instead of 24px */
    --card-padding-large: 1.25rem;          /* 20px for larger cards */
    
    /* Spacing - Reduced */
    --spacing-compact: 0.5rem;             /* 8px */
    --spacing-normal: 0.75rem;             /* 12px */
    --spacing-large: 1rem;                 /* 16px */
}

/* Compact Button Base Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--button-height);
    padding: var(--button-padding-y) var(--button-padding-x);
    gap: var(--button-gap);
    border-radius: var(--button-border-radius);
    font-weight: 600;
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
}

/* Helper function to convert hex to RGB - using CSS custom properties */
.btn-secondary {
    /* Use CSS variable with opacity - will be calculated dynamically */
    background-color: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: rgba(var(--color-primary-rgb), 0.15);
}

/* Dark mode button adjustments */
.dark .btn-secondary {
    background-color: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-text-dark);
}

.dark .btn-secondary:hover {
    background-color: rgba(var(--color-primary-rgb), 0.25);
}

/* Compact Card Styles */
.card {
    padding: var(--card-padding);
    border-radius: 0.75rem;
}

.card-large {
    padding: var(--card-padding-large);
}

/* Reduced spacing utilities */
.spacing-compact {
    gap: var(--spacing-compact);
}

.spacing-normal {
    gap: var(--spacing-normal);
}

/* Immediate rendering styles - prevents FOUC (Flash of Unstyled Content) */

/* Site logo (currency symbol from Currency Settings) - render immediately */
.site-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Rounded shapes - render immediately */
.rounded-full {
    border-radius: 9999px !important;
}

.rounded-lg {
    border-radius: 0.5rem !important;
}

.rounded-xl {
    border-radius: 0.75rem !important;
}

/* Primary color - render immediately */
.bg-primary {
    background-color: var(--color-primary) !important;
}

/* Button dimensions - render immediately */
button[class*="h-10"],
a[class*="h-10"],
button.h-10,
a.h-10 {
    min-height: 2.5rem !important;
    height: 2.5rem !important;
}

button[class*="h-12"],
a[class*="h-12"],
button.h-12,
a.h-12 {
    min-height: 3rem !important;
    height: 3rem !important;
}

/* Common button styles - render immediately */
button.bg-primary,
a.bg-primary {
    background-color: var(--color-primary) !important;
    color: white !important;
}

/* Immediate rendering styles - prevents FOUC */
    font-weight: 400;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
}

/* Site logo (currency symbol) - render immediately */
.site-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Rounded shapes - render immediately */
.rounded-full {
    border-radius: 9999px !important;
}

.rounded-lg {
    border-radius: 0.5rem !important;
}

.rounded-xl {
    border-radius: 0.75rem !important;
}

/* Primary buttons - render immediately */
.bg-primary {
    background-color: var(--color-primary) !important;
}

/* Ensure buttons have proper dimensions immediately */
button[class*="h-10"],
a[class*="h-10"] {
    min-height: 2.5rem !important;
}

button[class*="h-12"],
a[class*="h-12"] {
    min-height: 3rem !important;
}

