/* css/print.css - Dedicated Print Stylesheet for A4 Invoices */

@media print {
  /* 1. Hide all navigation bars, buttons, banners, and modals */
  .no-print,
  nav,
  button,
  .btn,
  #toast,
  #modal-container,
  header {
    display: none !important;
  }

  /* 2. Reset page body for white paper printing */
  html, body {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 3. A4 Page Dimensions & Standard Margins */
  @page {
    size: A4 portrait;
    margin: 12mm 15mm 15mm 15mm;
  }

  /* 4. Invoice container reset */
  .print-invoice-card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 5. Prevent awkward page breaks in the middle of items or totals */
  table, tr, td, th, .keep-together {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* 6. Crisp high-contrast borders for printing */
  table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  th {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    border-bottom: 1.5pt solid #9ca3af !important;
  }

  td {
    border-bottom: 0.5pt solid #e5e7eb !important;
  }
}
