/**
 * OneFoxy Platform - Main CSS Entry Point
 * SOLID Architecture Implementation
 * 
 * This file imports all CSS modules in the correct order following SOLID principles:
 * - Single Responsibility: Each module has one specific purpose
 * - Open/Closed: Modules are open for extension, closed for modification
 * - Liskov Substitution: Themes can be substituted without breaking layout
 * - Interface Segregation: Utilities provide specific interfaces for common tasks
 * - Dependency Inversion: Components depend on design tokens, not concrete values
 */

/* =============================================================================
   FOUNDATION LAYER - Design Tokens & Base Styles
   ============================================================================= */

/* 1. Design System Foundation */
@import '01-variables.css';     /* Design tokens, CSS custom properties */

/* 2. Base Layer */
@import '02-base.css';          /* Global resets, typography, accessibility */

/* =============================================================================
   LAYOUT LAYER - Structure & Positioning
   ============================================================================= */

/* 3. Layout System */
@import '03-layout.css';        /* Grid system, flexbox, positioning utilities */

/* =============================================================================
   COMPONENT LAYER - UI Components
   ============================================================================= */

/* 4. Components */
@import '04-components.css';    /* Self-contained UI components */

/* =============================================================================
   UTILITY LAYER - Atomic Classes
   ============================================================================= */

/* 5. Utilities */
@import '05-utilities.css';     /* Atomic utility classes */

/* =============================================================================
   ENHANCEMENT LAYERS - Animation & Theming
   ============================================================================= */

/* 6. Animations */
@import '06-animations.css';    /* Transitions, animations, micro-interactions */

/* 7. Themes */
@import '07-themes-clean.css';        /* Theme variants and customizations */

/* =============================================================================
   RESPONSIVE LAYER - Adaptive Design
   ============================================================================= */

/* 8. Responsive */
@import '08-responsive.css';    /* Media queries and responsive patterns */

/* =============================================================================
   LEGACY COMPATIBILITY
   ============================================================================= */

/* Legacy Bootstrap overrides for smooth transition */
.card {
  --bs-card-bg: var(--card-bg);
  --bs-card-border-color: var(--border-color);
}

.btn-primary {
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-color);
  --bs-btn-hover-bg: var(--primary-hover);
  --bs-btn-hover-border-color: var(--primary-hover);
}

.table {
  --bs-table-bg: var(--table-bg);
  --bs-table-border-color: var(--border-color);
}

/* =============================================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================================= */

/* Enable hardware acceleration for animations */
.card,
.btn,
.modal {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* =============================================================================
   DEVELOPMENT HELPERS (Remove in production)
   ============================================================================= */

/* Uncomment for debugging layout issues */
/*
.debug * {
  outline: 1px solid rgba(255, 0, 0, 0.3) !important;
}

.debug *:hover {
  outline: 2px solid rgba(255, 0, 0, 0.6) !important;
}
*/

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  /* Hide non-essential elements when printing */
  .sidebar,
  .navbar,
  .btn,
  .modal,
  .toast {
    display: none !important;
  }
  
  /* Optimize layout for print */
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  
  /* Use print-friendly colors */
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
}

/* =============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================= */

/* Enhanced focus management */
.focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-primary: #000000;
    --bg-primary: #ffffff;
  }
}

/* =============================================================================
   BROWSER COMPATIBILITY
   ============================================================================= */

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
  .form-control {
    -webkit-appearance: none;
    appearance: none;
  }
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
  .form-control {
    -moz-appearance: none;
    appearance: none;
  }
}

/* =============================================================================
   END OF MAIN CSS FILE
   ============================================================================= */
