/**
 * CSS Custom Properties (Variables)
 * Centralized design tokens for consistent theming
 * Extracted from custom.css and consolidated for better organization
 */

:root {
  /* ===== COLOR TOKENS ===== */

  /* Primary Colors */
  --color-primary-blue: #1d4ed8;
  --color-primary-blue-hover: #60a5fa;
  --color-primary-blue-light: #FFFFFF;

  /* Status Colors */
  --color-success-green: #22c55e;
  --color-success-green-hover: #16a34a;
  --color-error-red: #ef4444;
  --color-warning-yellow: #f59e0b;
  --color-info-cyan: #06b6d4;

  /* Gray Scale */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Dark Mode Colors */
  --color-dark-bg: #111827;
  --color-dark-surface: #1f2937;
  --color-dark-border: #374151;
  --color-dark-text: #f9fafb;
  --color-dark-text-muted: #d1d5db;
  --color-dark-text-secondary: #9ca3af;

  /* Required Label Colors */
  --color-required-bg-light: #dbeafe;
  --color-required-text-light: #FFFFFF;
  --color-required-bg-dark: rgb(59 130 246 / 15%);
  --color-required-text-dark: #FFFFFF;

  /* ===== SPACING & SIZING ===== */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-base: 1rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius-base: 0.5rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-full: 9999px;

  /* ===== SHADOWS ===== */
  --shadow-subtle: 0 1px 3px 0 rgb(0 0 0 / 10%);
  --shadow-medium: 0 4px 6px -1px rgb(0 0 0 / 10%);
  --shadow-strong: 0 10px 15px -3px rgb(0 0 0 / 10%);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -2px rgb(0 0 0 / 5%);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 10%), 0 10px 10px -5px rgb(0 0 0 / 4%);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 25%);
  --shadow-glow: 0 0 20px rgb(59 130 246 / 40%);
  --shadow-glow-purple: 0 0 20px rgb(147 51 234 / 40%);

  /* ===== TYPOGRAPHY ===== */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --letter-spacing-wide: 0.025em;

  /* ===== TRANSITIONS ===== */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-smooth: 0.2s ease;

  /* ===== LEGACY ALIASES (for compatibility) ===== */
  --primary-blue: var(--color-primary-blue);
  --primary-blue-hover: var(--color-primary-blue-hover);
  --success-green: var(--color-success-green);
  --error-red: var(--color-error-red);
  --border-light: var(--color-gray-200);
  --border-dark: var(--color-gray-700);

  /* ===== GRADIENTS ===== */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-cool: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);

  /* ===== EFFECTS ===== */
  --glass-morphism: rgb(255 255 255 / 10%);

  /* ===== ICON SIZES ===== */
  --icon-xs: 0.75rem;
  --icon-sm: 1rem;
  --icon-base: 1.25rem;
  --icon-lg: 1.5rem;
  --icon-xl: 2rem;
  --icon-2xl: 2.5rem;

  /* ===== Z-INDEX SCALE ===== */
  --z-dropdown: 1000;
  --z-modal: 1040;
  --z-overlay: 1050;
  --z-tooltip: 1060;
  --z-toast: 9999;
  --z-max: 10000;

  /* ===== NAVIGATION DESIGN TOKENS ===== */
  
  /* Navigation Colors */
  --nav-bg-light: #ffffff;
  --nav-bg-dark: #1f2937;
  --nav-border-light: #e5e7eb;
  --nav-border-dark: #374151;
  --nav-text-light: #4b5563;
  --nav-text-dark: #d1d5db;
  --nav-text-hover-light: #111827;
  --nav-text-hover-dark: #ffffff;
  --nav-bg-hover-light: #f9fafb;
  --nav-bg-hover-dark: #374151;
  
  /* Active State Colors */
  --nav-active-text-light: #1d4ed8;
  --nav-active-text-dark: #60a5fa;
  --nav-active-bg-light: #eff6ff;
  --nav-active-bg-dark: #1e3a8a;
  
  /* My Listings Colors */
  --nav-host-text-light: #16a34a;
  --nav-host-text-dark: #4ade80;
  --nav-host-text-hover-light: #15803d;
  --nav-host-text-hover-dark: #22c55e;
  --nav-host-bg-hover-light: #f0fdf4;
  --nav-host-bg-hover-dark: #14532d;
  --nav-host-active-bg-light: #dcfce7;
  --nav-host-active-bg-dark: #166534;
  
  /* Navigation Spacing */
  --nav-height-desktop: 4rem;
  --nav-height-mobile: 3.5rem;
  --nav-padding-x: 1rem;
  --nav-padding-x-lg: 1.5rem;
  --nav-item-padding-y: 0.5rem;
  --nav-item-padding-x: 0.75rem;
  --nav-item-gap: 1.5rem;
  
  /* Navigation Typography */
  --nav-font-size: 0.875rem;
  --nav-font-weight: 500;
  --nav-font-weight-active: 600;
  
  /* Navigation Borders & Shadows */
  --nav-border-radius: 0.375rem;
  --nav-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px 0 rgb(0 0 0 / 6%);
  --nav-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -2px rgb(0 0 0 / 5%);
  
  /* Navigation Transitions */
  --nav-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* ===== ADDITIONAL LEGACY ALIASES ===== */
  --primary-color: var(--color-primary-blue);
  --secondary-color: var(--color-primary-blue-hover);
  --success-color: var(--color-success-green);
  --error-color: var(--color-error-red);
  --warning-color: var(--color-warning-yellow);
  --text-primary: var(--color-gray-800);
  --text-secondary: var(--color-gray-600);
  --bg-primary: #ffffff;
  --bg-secondary: var(--color-gray-50);
  --border-color: var(--color-gray-200);
}

/* CRITICAL: Ensure proper contrast on dark overlays and backgrounds */
.dark *[style*="background: rgba(0"],
.dark *[style*="background-color: rgba(0"],
html.dark *[style*="background: rgba(0"],
html.dark *[style*="background-color: rgba(0"],
body.dark *[style*="background: rgba(0"],
body.dark *[style*="background-color: rgba(0"] {
  color: #f9fafb !important; /* Light text on dark backgrounds */
}

/* Ensure text is light on any very dark background */
*[style*="background: #0"],
*[style*="background-color: #0"],
*[style*="background: rgba(0, 0, 0"],
*[style*="background-color: rgba(0, 0, 0"] {
  color: #f9fafb !important; /* Light text on very dark backgrounds */
}

/* Override any gray-800 text that might appear on dark backgrounds in dark mode */
.dark .text-gray-800,
html.dark .text-gray-800,
body.dark .text-gray-800,
.dark [style*="color: #ffffff"],
html.dark [style*="color: #ffffff"],
body.dark [style*="color: #ffffff"] {
  color: #f9fafb !important; /* Light text in dark mode */
}

/* ULTRA-AGGRESSIVE CONTRAST FIX - Override any remaining gray-800 text in dark mode */

/* NUCLEAR OPTION: Force white text on any element with gray-800 color in dark contexts */
html.dark *[style*="color: rgb(31, 41, 55)"],
body.dark *[style*="color: rgb(31, 41, 55)"],
.dark *[style*="color: rgb(31, 41, 55)"],
html.dark *[style*="color:rgb(31, 41, 55)"],
body.dark *[style*="color:rgb(31, 41, 55)"],
.dark *[style*="color:rgb(31, 41, 55)"],
html.dark *[style*="color: rgb(31,41,55)"],
body.dark *[style*="color: rgb(31,41,55)"],
.dark *[style*="color: rgb(31,41,55)"],
html.dark *[style*="color:rgb(31,41,55)"],
body.dark *[style*="color:rgb(31,41,55)"],
.dark *[style*="color:rgb(31,41,55)"] {
  color: #ffffff !important;
}

/* Cover computed styles that might result in gray-800 */

