/* Theme System - CSS Variables for Dark/Light Mode */

:root {
  /* Light Mode Colors (Default) */
  --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  --bg-secondary: rgba(255, 255, 255, 0.95);
  --bg-tertiary: rgba(248, 250, 252, 0.9);
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.8);
  
  /* Text Colors - Dark text for light mode */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-tertiary: #64748b;
  --text-accent: #1e293b;
  
  /* Accent Colors */
  --accent-primary: #2563eb;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #0891b2;
  --accent-gradient: linear-gradient(135deg, #2563eb, #7c3aed);
  
  /* Border Colors */
  --border-primary: rgba(148, 163, 184, 0.4);
  --border-secondary: rgba(148, 163, 184, 0.3);
  --border-accent: rgba(37, 99, 235, 0.4);
  
  /* Shadow Colors */
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.12);
  --shadow-heavy: rgba(0, 0, 0, 0.2);
  
  /* Interactive States */
  --hover-overlay: rgba(59, 130, 246, 0.1);
  --active-overlay: rgba(59, 130, 246, 0.2);
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
}

[data-theme="dark"] {
  /* Dark Mode Colors */
  --bg-primary: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  --bg-secondary: rgba(26, 26, 46, 0.9);
  --bg-tertiary: rgba(22, 33, 62, 0.8);
  --bg-card: rgba(26, 26, 46, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.2);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #ccd6f6;
  --text-tertiary: #8892b0;
  --text-accent: #00d4ff;
  
  /* Accent Colors */
  --accent-primary: #00d4ff;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #ff6b35;
  --accent-gradient: linear-gradient(135deg, #00d4ff, #7c3aed);
  
  /* Border Colors */
  --border-primary: rgba(0, 212, 255, 0.3);
  --border-secondary: rgba(0, 212, 255, 0.2);
  --border-accent: rgba(0, 212, 255, 0.5);
  
  /* Shadow Colors */
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.6);
  
  /* Interactive States */
  --hover-overlay: rgba(0, 212, 255, 0.1);
  --active-overlay: rgba(0, 212, 255, 0.2);
  
  /* Status Colors */
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;
  --info: #00d4ff;
}

/* Theme Transition */
* {
  transition: background-color 0.3s ease, 
              color 0.3s ease, 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
}

/* Base Body Styling */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Theme Toggle Button Styles */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-card);
  border: 2px solid var(--border-accent);
  border-radius: 50px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 10px 30px var(--shadow-medium);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px var(--shadow-heavy);
  border-color: var(--accent-primary);
}

.theme-toggle-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
  transform: rotate(180deg);
}

.theme-toggle-text {
  font-size: 0.9rem;
  margin-left: 0.25rem;
}

/* AI Chatbot Integration */
#deployment-e98c9c09-e5f1-4a0b-820d-cadc7402ab2c {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    max-height: 600px;
}

/* AI Chatbot Light Mode Fixes */
#deployment-e98c9c09-e5f1-4a0b-820d-cadc7402ab2c * {
    color: var(--text-primary) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-primary) !important;
}

#deployment-e98c9c09-e5f1-4a0b-820d-cadc7402ab2c input,
#deployment-e98c9c09-e5f1-4a0b-820d-cadc7402ab2c textarea,
#deployment-e98c9c09-e5f1-4a0b-820d-cadc7402ab2c button {
    color: var(--text-primary) !important;
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
}

#deployment-e98c9c09-e5f1-4a0b-820d-cadc7402ab2c button:hover {
    background-color: var(--hover-overlay) !important;
    color: var(--text-primary) !important;
}

/* Responsive Theme Toggle */
@media (max-width: 768px) {
    #deployment-e98c9c09-e5f1-4a0b-820d-cadc7402ab2c {
        bottom: 10px;
        right: 10px;
        max-width: 320px;
        max-height: 500px;
    }
}
  .theme-toggle {
    top: 15px;
    right: 15px;
    padding: 0.5rem 0.75rem;
  }
  
  .theme-toggle-text {
    display: none;
  }
}

/* Theme-aware component styles */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  box-shadow: 0 10px 30px var(--shadow-light);
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 15px 40px var(--shadow-medium);
}

.button-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: 0 10px 30px var(--shadow-medium);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px var(--shadow-heavy);
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent-primary);
}

.bg-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
}

/* Smooth theme transition for all elements */
.theme-transition * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}