/* ===================================
   THEME SYSTEM - CSS VARIABLES
   Light & Dark Mode Support
   =================================== */

/* Light Theme (Default) */
:root {
  /* Primary Colors */
  --primary: #10B981;
  --primary-hover: #059669;
  --primary-light: #34D399;
  --accent: #00D1A0;
  --accent-hover: #00B88C;
  
  /* Background Colors */
  --bg: #F7F9FC;
  --bg-secondary: #FFFFFF;
  --card-bg: #FFFFFF;
  --card-bg-hover: #FAFBFC;
  
  /* Text Colors */
  --text-main: #111827;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-inverse: #FFFFFF;
  
  /* Border & Divider */
  --border: #E5E7EB;
  --border-hover: #D1D5DB;
  --divider: #F3F4F6;
  
  /* 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);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
  
  /* Status Colors */
  --success: #10B981;
  --success-light: #D1FAE5;
  --error: #EF4444;
  --error-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  
  /* Overlay */
  --overlay: rgba(0, 0, 0, 0.5);
  --overlay-light: rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
}

/* Dark Theme */
[data-theme="dark"] {
  /* Primary Colors */
  --primary: #10B981;
  --primary-hover: #34D399;
  --primary-light: #059669;
  --accent: #00F0D0;
  --accent-hover: #33F3DD;
  
  /* Background Colors */
  --bg: #0D1117;
  --bg-secondary: #161B22;
  --card-bg: #161B22;
  --card-bg-hover: #1C2128;
  
  /* Text Colors */
  --text-main: #E2E8F0;
  --text-secondary: #A1B0C5;
  --text-tertiary: #6B7F99;
  --text-inverse: #0D1117;
  
  /* Border & Divider */
  --border: #2A3038;
  --border-hover: #3A4148;
  --divider: #21262D;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.5);
  
  /* Status Colors */
  --success: #34D399;
  --success-light: #064E3B;
  --error: #F87171;
  --error-light: #7F1D1D;
  --warning: #FBBF24;
  --warning-light: #78350F;
  
  /* Overlay */
  --overlay: rgba(0, 0, 0, 0.7);
  --overlay-light: rgba(0, 0, 0, 0.3);
}

/* ===================================
   GLOBAL THEME TRANSITIONS
   =================================== */

* {
  transition-property: background-color, border-color, color, fill, stroke, box-shadow;
  transition-duration: var(--transition-normal);
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent transition on page load */
.preload * {
  transition: none !important;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===================================
   SCROLLBAR STYLING
   =================================== */

/* Custom Scrollbar for Webkit browsers */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg);
}

/* ===================================
   SELECTION STYLING
   =================================== */

::selection {
  background-color: var(--primary);
  color: var(--text-inverse);
}

::-moz-selection {
  background-color: var(--primary);
  color: var(--text-inverse);
}

/* ===================================
   FOCUS STYLES (Accessibility)
   =================================== */

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
