/* ============================================================
   Invoice.page — print.css
   Only loaded when media="print"
   ============================================================ */

@page {
  size: A4;
  margin: 0.5in;
}

/* Hide everything by default */
*,
body > * {
  visibility: hidden;
}

/* Show only the invoice paper and its children */
.invoice-paper,
.invoice-paper * {
  visibility: visible;
}

/* Position the invoice paper to fill the page */
.invoice-paper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  page-break-inside: avoid;
}

/* Reset layout containers */
.app-header,
.form-panel,
.upsell-toast {
  display: none !important;
}

/* Remove shadows and backgrounds from table elements */
.inv-items-table tbody tr:nth-child(even) {
  background: transparent !important;
}

/* Ensure colors print (some browsers suppress bg colors) */
.inv-items-table thead tr {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.inv-accent-bar {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.inv-notes {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.inv-title {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.totals-grand .totals-value {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Prevent page breaks in the middle of items */
.inv-items-wrap,
.inv-totals-wrap,
.inv-notes,
.inv-footer {
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Remove any decorative scrollbars */
.preview-panel,
.preview-scroll {
  overflow: visible !important;
}

/* Ensure links don't show href */
a[href]::after {
  content: none !important;
}
