/* Visernic Print Optimization */
@media print {
  /* Page Setup */
  @page {
    margin: 1cm;
    size: auto;
  }

  /* Reset Backgrounds & Colors */
  body, #root, .dark, .light {
    background-color: #ffffff !important;
    color: #000000 !important;
    background-image: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Reset Shadows & Effects */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    transition: none !important;
  }

  /* Force Text Color to Black */
  h1, h2, h3, h4, h5, h6, p, span, div, li, td, th {
    color: #000000 !important;
    fill: #000000 !important;
  }

  /* Link Styling */
  a {
    text-decoration: underline;
    color: #000000 !important;
  }

  /* Hide Non-Printable Elements */
  nav, footer, button, .no-print, [role="button"], 
  iframe, script, .fixed, .sticky, 
  [aria-hidden="true"] {
    display: none !important;
  }

  /* Layout Adjustments */
  .container, .wrapper, main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    position: static !important;
    overflow: visible !important;
  }

  /* Image Optimization */
  img {
    max-width: 100% !important;
    break-inside: avoid;
    page-break-inside: avoid;
    filter: grayscale(100%);
  }
  
  /* Break Management */
  pre, blockquote, .card, table, figure {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }
}
