/**
 * NexaFrontiers Global Theme System
 * 7 Professional Color Themes with CSS Custom Properties
 * Version: 1.0.0
 */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS (BASE)
   ============================================ */
:root {
    /* Typography */
    --nf-font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --nf-font-mono: 'Space Mono', 'Fira Code', monospace;

    /* Spacing Scale */
    --nf-space-xs: 4px;
    --nf-space-sm: 8px;
    --nf-space-md: 16px;
    --nf-space-lg: 24px;
    --nf-space-xl: 32px;
    --nf-space-2xl: 48px;
    --nf-space-3xl: 64px;
    --nf-space-4xl: 96px;

    /* Border Radius */
    --nf-radius-sm: 8px;
    --nf-radius-md: 12px;
    --nf-radius-lg: 20px;
    --nf-radius-xl: 24px;
    --nf-radius-full: 100px;

    /* Transitions */
    --nf-transition-fast: 0.15s ease;
    --nf-transition-base: 0.3s ease;
    --nf-transition-slow: 0.5s ease;

    /* Z-Index Scale */
    --nf-z-dropdown: 100;
    --nf-z-sticky: 200;
    --nf-z-modal: 300;
    --nf-z-tooltip: 400;
}

/* ============================================
   THEME 1: LIGHT (Default - Emerald Accent)
   ============================================ */
:root,
:root[data-theme="light"] {
    /* Backgrounds */
    --nf-bg-primary: #ffffff;
    --nf-bg-secondary: #f5f7fa;
    --nf-bg-tertiary: #eef1f5;
    --nf-bg-card: #ffffff;
    --nf-bg-nav: rgba(255, 255, 255, 0.95);

    /* Text */
    --nf-text-primary: #1e293b;
    --nf-text-secondary: #475569;
    --nf-text-muted: #64748b;

    /* Accent */
    --nf-accent: #059669;
    --nf-accent-hover: #047857;
    --nf-accent-light: rgba(5, 150, 105, 0.1);
    --nf-gradient-1: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    --nf-gradient-2: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    --nf-gradient-hero: linear-gradient(180deg, rgba(5, 150, 105, 0.03) 0%, transparent 50%);
    --nf-shadow-accent: 0 10px 40px rgba(5, 150, 105, 0.2);

    /* Borders */
    --nf-border-color: rgba(0, 0, 0, 0.08);

    /* Shadows */
    --nf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --nf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --nf-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --nf-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Status Colors */
    --nf-danger: #ef4444;
    --nf-warning: #f59e0b;
    --nf-success: #10b981;
}

/* ============================================
   THEME 2: DARK (Cyan Accent)
   ============================================ */
:root[data-theme="dark"] {
    /* Backgrounds */
    --nf-bg-primary: #0f172a;
    --nf-bg-secondary: #1e293b;
    --nf-bg-tertiary: #334155;
    --nf-bg-card: #1e293b;
    --nf-bg-nav: rgba(15, 23, 42, 0.95);

    /* Text */
    --nf-text-primary: #f1f5f9;
    --nf-text-secondary: #cbd5e1;
    --nf-text-muted: #94a3b8;

    /* Accent - Cyan */
    --nf-accent: #06b6d4;
    --nf-accent-hover: #0891b2;
    --nf-accent-light: rgba(6, 182, 212, 0.15);
    --nf-gradient-1: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    --nf-gradient-2: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    --nf-gradient-hero: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    --nf-shadow-accent: 0 10px 40px rgba(6, 182, 212, 0.25);

    /* Borders */
    --nf-border-color: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --nf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --nf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --nf-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --nf-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* ============================================
   THEME 3: MIDNIGHT (Gold Accent)
   ============================================ */
:root[data-theme="midnight"] {
    /* Backgrounds */
    --nf-bg-primary: #020617;
    --nf-bg-secondary: #0f172a;
    --nf-bg-tertiary: #1e293b;
    --nf-bg-card: #0f172a;
    --nf-bg-nav: rgba(2, 6, 23, 0.95);

    /* Text */
    --nf-text-primary: #f8fafc;
    --nf-text-secondary: #e2e8f0;
    --nf-text-muted: #94a3b8;

    /* Accent - Gold */
    --nf-accent: #f59e0b;
    --nf-accent-hover: #d97706;
    --nf-accent-light: rgba(245, 158, 11, 0.15);
    --nf-gradient-1: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --nf-gradient-2: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --nf-gradient-hero: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
    --nf-shadow-accent: 0 10px 40px rgba(245, 158, 11, 0.25);

    /* Borders */
    --nf-border-color: rgba(255, 255, 255, 0.08);

    /* Shadows */
    --nf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --nf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --nf-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
    --nf-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* ============================================
   THEME 4: WARM (Amber Accent)
   ============================================ */
:root[data-theme="warm"] {
    /* Backgrounds */
    --nf-bg-primary: #fffbf5;
    --nf-bg-secondary: #fef7ed;
    --nf-bg-tertiary: #fef3e2;
    --nf-bg-card: #ffffff;
    --nf-bg-nav: rgba(255, 251, 245, 0.95);

    /* Text */
    --nf-text-primary: #422006;
    --nf-text-secondary: #57534e;
    --nf-text-muted: #78716c;

    /* Accent - Amber */
    --nf-accent: #d97706;
    --nf-accent-hover: #b45309;
    --nf-accent-light: rgba(217, 119, 6, 0.12);
    --nf-gradient-1: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --nf-gradient-2: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    --nf-gradient-hero: linear-gradient(180deg, rgba(217, 119, 6, 0.05) 0%, transparent 50%);
    --nf-shadow-accent: 0 10px 40px rgba(217, 119, 6, 0.2);

    /* Borders */
    --nf-border-color: rgba(66, 32, 6, 0.08);

    /* Shadows */
    --nf-shadow-sm: 0 1px 3px rgba(66, 32, 6, 0.06);
    --nf-shadow-md: 0 4px 12px rgba(66, 32, 6, 0.08);
    --nf-shadow-lg: 0 10px 30px rgba(66, 32, 6, 0.1);
    --nf-shadow-xl: 0 20px 50px rgba(66, 32, 6, 0.12);
}

/* ============================================
   THEME 5: SLATE (Indigo Accent)
   ============================================ */
:root[data-theme="slate"] {
    /* Backgrounds */
    --nf-bg-primary: #f8fafc;
    --nf-bg-secondary: #f1f5f9;
    --nf-bg-tertiary: #e2e8f0;
    --nf-bg-card: #ffffff;
    --nf-bg-nav: rgba(248, 250, 252, 0.95);

    /* Text */
    --nf-text-primary: #0f172a;
    --nf-text-secondary: #475569;
    --nf-text-muted: #64748b;

    /* Accent - Indigo */
    --nf-accent: #4f46e5;
    --nf-accent-hover: #4338ca;
    --nf-accent-light: rgba(79, 70, 229, 0.1);
    --nf-gradient-1: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    --nf-gradient-2: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    --nf-gradient-hero: linear-gradient(180deg, rgba(79, 70, 229, 0.04) 0%, transparent 50%);
    --nf-shadow-accent: 0 10px 40px rgba(79, 70, 229, 0.2);

    /* Borders */
    --nf-border-color: rgba(15, 23, 42, 0.08);

    /* Shadows */
    --nf-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --nf-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --nf-shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.1);
    --nf-shadow-xl: 0 20px 50px rgba(15, 23, 42, 0.12);
}

/* ============================================
   THEME 6: FOREST (Lime Accent)
   ============================================ */
:root[data-theme="forest"] {
    /* Backgrounds */
    --nf-bg-primary: #022c22;
    --nf-bg-secondary: #064e3b;
    --nf-bg-tertiary: #065f46;
    --nf-bg-card: #064e3b;
    --nf-bg-nav: rgba(2, 44, 34, 0.95);

    /* Text */
    --nf-text-primary: #ecfdf5;
    --nf-text-secondary: #a7f3d0;
    --nf-text-muted: #6ee7b7;

    /* Accent - Lime */
    --nf-accent: #84cc16;
    --nf-accent-hover: #65a30d;
    --nf-accent-light: rgba(132, 204, 22, 0.2);
    --nf-gradient-1: linear-gradient(135deg, #84cc16 0%, #a3e635 100%);
    --nf-gradient-2: linear-gradient(135deg, #65a30d 0%, #84cc16 100%);
    --nf-gradient-hero: linear-gradient(180deg, rgba(132, 204, 22, 0.1) 0%, transparent 50%);
    --nf-shadow-accent: 0 10px 40px rgba(132, 204, 22, 0.3);

    /* Borders */
    --nf-border-color: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --nf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --nf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --nf-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --nf-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* ============================================
   THEME 7: OCEAN (Sky Blue Accent)
   ============================================ */
:root[data-theme="ocean"] {
    /* Backgrounds */
    --nf-bg-primary: #0c1929;
    --nf-bg-secondary: #172a46;
    --nf-bg-tertiary: #1e3a5f;
    --nf-bg-card: #172a46;
    --nf-bg-nav: rgba(12, 25, 41, 0.95);

    /* Text */
    --nf-text-primary: #e0f2fe;
    --nf-text-secondary: #bae6fd;
    --nf-text-muted: #7dd3fc;

    /* Accent - Sky Blue */
    --nf-accent: #0ea5e9;
    --nf-accent-hover: #0284c7;
    --nf-accent-light: rgba(14, 165, 233, 0.2);
    --nf-gradient-1: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    --nf-gradient-2: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    --nf-gradient-hero: linear-gradient(180deg, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    --nf-shadow-accent: 0 10px 40px rgba(14, 165, 233, 0.3);

    /* Borders */
    --nf-border-color: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --nf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --nf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --nf-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --nf-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* ============================================
   GLOBAL STYLES (Applied to All Themes)
   ============================================ */

/* Smooth Theme Transitions */
body,
.wp-site-blocks,
.wp-block-template-part,
header,
footer,
main,
article {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Apply Theme Colors to WordPress Elements */
body {
    background-color: var(--nf-bg-primary) !important;
    color: var(--nf-text-primary) !important;
    font-family: var(--nf-font-display) !important;
}

/* Headers */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--nf-text-primary) !important;
}

/* Paragraphs */
p {
    color: var(--nf-text-secondary) !important;
}

/* Links */
a {
    color: var(--nf-accent) !important;
    transition: color var(--nf-transition-fast);
}

a:hover {
    color: var(--nf-accent-hover) !important;
}

/* WordPress Header/Navigation */
.wp-site-blocks header,
.wp-block-template-part[data-area="header"] {
    background-color: var(--nf-bg-nav) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nf-border-color) !important;
}

/* WordPress Footer */
.wp-site-blocks footer,
.wp-block-template-part[data-area="footer"] {
    background-color: var(--nf-bg-secondary) !important;
    border-top: 1px solid var(--nf-border-color) !important;
}

/* Buttons */
.wp-block-button__link,
.wp-element-button {
    background: var(--nf-gradient-1) !important;
    color: white !important;
    border-radius: var(--nf-radius-full) !important;
    transition: transform var(--nf-transition-base), box-shadow var(--nf-transition-base) !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--nf-shadow-accent) !important;
}

/* Cards and Content Boxes */
.wp-block-group,
.wp-block-cover {
    border-radius: var(--nf-radius-lg);
}

/* ============================================
   THEME SWITCHER UI
   ============================================ */
.nf-theme-switcher {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: var(--nf-z-sticky);
}

.nf-theme-toggle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--nf-bg-card);
    border: 1px solid var(--nf-border-color);
    box-shadow: var(--nf-shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all var(--nf-transition-base);
}

.nf-theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--nf-shadow-xl);
}

.nf-theme-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--nf-bg-card);
    border-radius: var(--nf-radius-lg);
    box-shadow: var(--nf-shadow-xl);
    border: 1px solid var(--nf-border-color);
    padding: var(--nf-space-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all var(--nf-transition-fast);
    min-width: 200px;
}

.nf-theme-switcher.open .nf-theme-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nf-theme-panel-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--nf-text-muted);
    margin-bottom: var(--nf-space-sm);
    padding-bottom: var(--nf-space-sm);
    border-bottom: 1px solid var(--nf-border-color);
}

.nf-theme-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nf-theme-option {
    display: flex;
    align-items: center;
    gap: var(--nf-space-sm);
    padding: 8px 10px;
    border-radius: var(--nf-radius-sm);
    cursor: pointer;
    transition: background var(--nf-transition-fast);
}

.nf-theme-option:hover {
    background: var(--nf-bg-tertiary);
}

.nf-theme-option.active {
    background: var(--nf-accent-light);
}

.nf-theme-option.active .nf-theme-name {
    font-weight: 700;
    color: var(--nf-accent);
}

.nf-theme-preview {
    width: 36px;
    height: 24px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--nf-border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.nf-theme-preview::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
}

/* Theme Previews */
.nf-theme-preview.light {
    background: #ffffff;
}

.nf-theme-preview.light::before {
    background: linear-gradient(135deg, #059669, #0d9488);
}

.nf-theme-preview.dark {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
}

.nf-theme-preview.dark::before {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

.nf-theme-preview.midnight {
    background: #020617;
    border-color: rgba(255, 255, 255, 0.1);
}

.nf-theme-preview.midnight::before {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.nf-theme-preview.warm {
    background: #fffbf5;
}

.nf-theme-preview.warm::before {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.nf-theme-preview.slate {
    background: #f1f5f9;
}

.nf-theme-preview.slate::before {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.nf-theme-preview.forest {
    background: #022c22;
    border-color: rgba(255, 255, 255, 0.1);
}

.nf-theme-preview.forest::before {
    background: linear-gradient(135deg, #84cc16, #a3e635);
}

.nf-theme-preview.ocean {
    background: #0c1929;
    border-color: rgba(255, 255, 255, 0.1);
}

.nf-theme-preview.ocean::before {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.nf-theme-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--nf-text-primary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nf-theme-switcher {
        bottom: 80px;
        right: 20px;
    }

    .nf-theme-toggle-btn {
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');