/*
 * CalcLogix - Main Stylesheet
 * 
 * This file imports all CSS modules in the correct order:
 * 1. Variables (CSS custom properties)
 * 2. Base styles (resets, typography, global styles)
 * 3. Components (reusable UI components)
 * 4. Utilities (helper classes)
 */

/* === CSS VARIABLES === */
@import url('./variables.css');

/* === BASE STYLES === */
@import url('./base.css');

/* === COMPONENTS === */
@import url('./components-simple.css');

/* === UTILITIES === */
@import url('./utilities.css');

/* === CRITICAL STYLES (Inline these for performance) === */
/* Header styles for immediate render */
.header-critical {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(24, 24, 24, 0.9);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

/* Loading state */
.page-loading {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.page-loaded {
  opacity: 1;
}

/* === PERFORMANCE OPTIMIZATIONS === */
/* GPU acceleration for animations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Contain layout shifts */
.layout-contained {
  contain: layout;
}

/* === PAGE-SPECIFIC OVERRIDES === */
/* These can be moved to separate files if they grow large */

/* Override global link hover styles for header and footer */
header a:hover,
footer a:hover,
.nav a:hover {
  text-decoration: none !important;
}

/* Calculator pages */
.calculator-page .hero {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

/* Library page */
.library-page .article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .mobile-optimized {
    /* Reduce font sizes for mobile */
    font-size: 0.9rem;
  }
  
  .mobile-stack {
    flex-direction: column;
  }
  
  .mobile-full-width {
    width: 100%;
  }
}

/* === TEMPORARY MIGRATION STYLES === */
/* These help during the transition from inline styles */
/* Remove these after full migration */

.legacy-support {
  /* Support for old inline styles */
}

/* Override any conflicting Tailwind classes if needed */
.tailwind-override {
  /* Specific overrides go here */
}

#refiChart {
  opacity: 0;
  transition: opacity 0.6s ease;
  display: block;
  margin: 0 auto;
}
#refiChart.visible {
  opacity: 1;
}