/* Print specific CSS sheet for InvoiceGenius */
@media print {
  @page {
    size: A4;
    margin: 20mm;
  }

  /* Force every new page to have a 20mm margin (handled by @page) */

  /* Apply break-inside: avoid; to the invoice line item rows so they never split */
  tr, .line-item-row {
    break-inside: avoid;
    page-break-inside: avoid; /* For older browser support */
  }

  /* Ensure the 'Total' section always stays attached to the last item or moves to a new page entirely */
  .total-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Hide the screen-only page break indicator when actually printing */
  .page-break-lines {
    background-image: none !important;
  }
}
