/*
 * Shared Theme System for odrive Mockups
 * Include this file in all pages for consistent theming
 */

/* ============================================
   Color Schemes
   ============================================ */

/* Default/Procore scheme (orange) */
:root,
[data-scheme="procore"] {
    --accent: #F26522;
    --accent-light: #FF7A3D;
    --accent-rgb: 242, 101, 34;
    --accent-glow: rgba(242, 101, 34, 0.25);
    --accent-glow-light: rgba(242, 101, 34, 0.12);
}

/* Ocean scheme (teal) */
[data-scheme="ocean"] {
    --accent: #0D9488;
    --accent-light: #14B8A6;
    --accent-rgb: 13, 148, 136;
    --accent-glow: rgba(13, 148, 136, 0.25);
    --accent-glow-light: rgba(13, 148, 136, 0.12);
}

/* Midnight scheme (blue) */
[data-scheme="midnight"] {
    --accent: #3B82F6;
    --accent-light: #60A5FA;
    --accent-rgb: 59, 130, 246;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --accent-glow-light: rgba(59, 130, 246, 0.12);
}

/* Slate scheme (neutral) */
[data-scheme="slate"] {
    --accent: #64748B;
    --accent-light: #94A3B8;
    --accent-rgb: 100, 116, 139;
    --accent-glow: rgba(100, 116, 139, 0.25);
    --accent-glow-light: rgba(100, 116, 139, 0.12);
}

/* odrive scheme (light blue from odrive.com) */
[data-scheme="odrive"] {
    --accent: #4a9fd4;
    --accent-light: #6bb5de;
    --accent-rgb: 74, 159, 212;
    --accent-glow: rgba(74, 159, 212, 0.25);
    --accent-glow-light: rgba(74, 159, 212, 0.12);
}

/* Legacy alias for backward compatibility */
:root {
    --odrive-orange: var(--accent);
    --odrive-orange-light: var(--accent-light);
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-purple: #a371f7;
}

/* ============================================
   Dark Theme (Default)
   ============================================ */
[data-theme="dark"] {
    --surface-dark: #0d1117;
    --surface-mid: #161b22;
    --surface-light: #21262d;
    --border-subtle: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --nav-bg: rgba(13, 17, 23, 0.9);
    --card-bg: rgba(22, 27, 34, 0.8);
    --hero-gradient: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--accent-rgb), 0.15), transparent),
                    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(88, 166, 255, 0.08), transparent),
                    #0d1117;
    --grid-line: rgba(255,255,255,0.02);
    --cta-gradient: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(var(--accent-rgb), 0.15), transparent);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glow-accent: 0 0 60px var(--accent-glow);
}

/* ============================================
   Light Theme
   ============================================ */
[data-theme="light"] {
    /* Primary surface colors */
    --surface-dark: #ffffff;
    --surface-mid: #f8f9fa;
    --surface-light: #e9ecef;
    --border-subtle: #dee2e6;
    --text-primary: #1a1a2e;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: rgba(255, 255, 255, 0.9);
    --hero-gradient: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--accent-rgb), 0.08), transparent),
                    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(88, 166, 255, 0.05), transparent),
                    #ffffff;
    --grid-line: rgba(0,0,0,0.03);
    --cta-gradient: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(var(--accent-rgb), 0.08), transparent);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glow-accent: 0 0 60px var(--accent-glow-light);

    /* Aliases for pages using alternate variable names */
    --odrive-dark: #ffffff;
    --odrive-slate: #f8f9fa;
    --border-color: #dee2e6;

    /* Mesh gradient for personal page */
    --mesh-gradient: radial-gradient(ellipse 60% 40% at 10% 20%, rgba(var(--accent-rgb), 0.06), transparent),
                    radial-gradient(ellipse 50% 50% at 90% 80%, rgba(163, 113, 247, 0.04), transparent),
                    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(88, 166, 255, 0.03), transparent),
                    #ffffff;
}

/* Legacy alias */
[data-theme="dark"] { --glow-orange: var(--glow-accent); }
[data-theme="light"] { --glow-orange: var(--glow-accent); }

/* Theme panel and toggle removed — locked to light + procore */

/* ============================================
   Light Theme - Tailwind Gray Overrides
   Use !important to cascade over page inline styles
   ============================================ */
[data-theme="light"] .text-white { color: var(--text-primary) !important; }
[data-theme="light"] .btn-primary,
[data-theme="light"] a.text-white[style*="background"],
[data-theme="light"] button.text-white[style*="background"] { color: #ffffff !important; }
[data-theme="light"] .text-gray-200 { color: #374151 !important; }
[data-theme="light"] .text-gray-300 { color: #4b5563 !important; }
[data-theme="light"] .text-gray-400 { color: #6b7280 !important; }
[data-theme="light"] .text-gray-500 { color: #4b5563 !important; }
[data-theme="light"] .text-gray-600 { color: #374151 !important; }
[data-theme="light"] .text-gray-700 { color: #1f2937 !important; }

/* Light theme hover states */
[data-theme="light"] .hover\:text-white:hover { color: var(--accent) !important; }
[data-theme="light"] a:hover { color: var(--accent); }

/* Light theme borders */
[data-theme="light"] .border-gray-700 { border-color: #e5e7eb !important; }
[data-theme="light"] .border-gray-800 { border-color: #e5e7eb !important; }

/* Light theme backgrounds */
[data-theme="light"] .bg-gray-800 { background-color: #f3f4f6 !important; }
[data-theme="light"] .bg-gray-900 { background-color: #f8f9fa !important; }
[data-theme="light"] .bg-white\/5 { background-color: rgba(0, 0, 0, 0.03) !important; }
[data-theme="light"] .bg-white\/10 { background-color: rgba(0, 0, 0, 0.05) !important; }

/* Light theme body background - ensures consistent base */
[data-theme="light"] body {
    background-color: #ffffff !important;
}

/* ============================================
   Light Theme - Navigation
   ============================================ */
[data-theme="light"] nav {
    background: var(--nav-bg) !important;
    border-color: var(--border-subtle) !important;
}

[data-theme="light"] nav a {
    color: #4b5563;
}

[data-theme="light"] nav a:hover {
    color: var(--accent);
}

[data-theme="light"] nav .text-xl,
[data-theme="light"] nav .font-semibold {
    color: var(--text-primary);
}

/* ============================================
   Light Theme - Cards & Surfaces
   ============================================ */
[data-theme="light"] .feature-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] [class*="rounded-2xl"][class*="border"] {
    background: var(--surface-mid);
    border-color: var(--border-subtle);
}

[data-theme="light"] .feature-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

[data-theme="light"] .glow-orange,
[data-theme="light"] .glow-accent {
    box-shadow: var(--glow-accent);
}

/* ============================================
   Light Theme - Footer
   ============================================ */
[data-theme="light"] footer {
    background: var(--surface-mid);
    border-color: var(--border-subtle) !important;
}

[data-theme="light"] footer a {
    color: #6b7280;
}

[data-theme="light"] footer a:hover {
    color: var(--accent);
}

/* ============================================
   Light Theme - Backgrounds
   ============================================ */
[data-theme="light"] .hero-bg,
[data-theme="light"] .mesh-bg,
[data-theme="light"] .grid-pattern {
    background: var(--hero-gradient);
}

[data-theme="light"] .bg-grid {
    background-color: var(--surface-dark);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

/* ============================================
   Light Theme - Form Elements
   ============================================ */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: var(--surface-dark);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

[data-theme="light"] input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Light Theme - Badges & Pills
   ============================================ */
[data-theme="light"] .bg-gray-700 {
    background-color: #e5e7eb !important;
}

[data-theme="light"] .bg-gray-700 .text-gray-300 {
    color: #374151 !important;
}

/* ============================================
   Light Theme - Sections & Content Areas
   ============================================ */
[data-theme="light"] section {
    background-color: transparent;
}

/* Testimonial cards */
[data-theme="light"] .testimonial-card {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

/* Storage option cards (enterprise signup) */
[data-theme="light"] .storage-option {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

[data-theme="light"] .storage-option.selected {
    border-color: var(--accent) !important;
    background: #fff5f0 !important;
}

/* Integration logos */
[data-theme="light"] .integration-logo {
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
}

/* FAQ items */
[data-theme="light"] .faq-item {
    border-color: #e5e7eb !important;
}

/* Pricing cards */
[data-theme="light"] .pricing-card,
[data-theme="light"] [class*="rounded-2xl"][class*="p-8"] {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

/* Feature check icons - use accent color */
[data-theme="light"] .feature-check {
    color: var(--accent) !important;
}

/* CTA sections with gradient backgrounds */
[data-theme="light"] section[class*="relative"] > div[class*="absolute"][style*="gradient"] {
    opacity: 0.5;
}
