/* Print Styles for Export Pages - Hybrid Approach */

/**
 * This file contains essential global print styles and utilities.
 * Component-specific styles are kept in their respective components.
 */

/* ===== 1. Page Setup ===== */
@page {
  size: A4;
  margin: 15mm;
}

@media print {
  /* ===== 2. Global Print Behavior ===== */
  body {
    background-color: white !important;
    color: black !important;
  }
  
  /* Hide unnecessary elements */
  header, footer, nav, .no-print {
    display: none !important;
  }
  
  /* ===== 3. Essential Print Utility Classes ===== */
  /* Page break utilities */
  .print-page-break {
    page-break-after: always;
    break-after: page;
  }
  
  .print-avoid-break {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  /* Visibility utilities */
  .print-only {
    display: block !important;
  }
  
  .screen-only {
    display: none !important;
  }
  
  /* ===== 4. Color Utilities ===== */
  /* Ensure proper color printing */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Print color palette - for use across components */
  .print-color-primary {
    color: #1e40af !important;
  }
  
  .print-bg-primary {
    background-color: #1e40af !important;
  }
  
  .print-color-success {
    color: #059669 !important;
  }
  
  .print-bg-success {
    background-color: #059669 !important;
  }
  
  .print-color-warning {
    color: #f59e0b !important;
  }
  
  .print-bg-warning {
    background-color: #f59e0b !important;
  }
  
  .print-color-danger {
    color: #dc2626 !important;
  }
  
  .print-bg-danger {
    background-color: #dc2626 !important;
  }
  
  /* ===== 5. Critical Tailwind Overrides ===== */
  /* These overrides ensure Tailwind classes behave properly in print */
  
  /* Background colors */
  .bg-white, .bg-gray-100, .bg-gray-200 {
    background-color: white !important;
  }
  
  /* Remove visual effects */
  .shadow, .shadow-md, .shadow-lg {
    box-shadow: none !important;
  }
  
  /* Remove animations and transitions */
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== 6. Screen-only Styles ===== */
@media screen {
  .print-only {
    display: none !important;
  }
}
