/* ==========================================================================
   Print — receiving slips, invoices, estimates, test reports, counter closing.
   The whole app chrome is suppressed and only #gt-print-root is laid out, so
   any template can be printed from any screen without a new window.
   ========================================================================== */

@page { size: A4; margin: 12mm 10mm; }
@page thermal { size: 80mm auto; margin: 3mm; }

html, body {
  background: #fff !important;
  color: #000 !important;
  height: auto !important;
  overflow: visible !important;
}

/* Hide the application; show only the print portal. */
#gt-root,
#gt-boot,
#gt-modal-root,
#gt-drawer-root,
#gt-popover-root,
.toastify,
.swal2-container,
.skip-link { display: none !important; }

#gt-print-root {
  display: block !important;
  position: static !important;
  visibility: visible !important;
}

/* 80mm thermal receipts for the sales counter. */
body[data-print='thermal'] { width: 74mm; }
body[data-print='thermal'] #gt-print-root { font-size: 10px; line-height: 1.35; }
body[data-print='thermal'] .doc { width: 74mm; }

.print-only { display: block !important; }
.no-print   { display: none !important; }

/* Keep logical blocks intact across page breaks. */
.doc, .doc table, .doc__block, .timeline__item, .card { break-inside: avoid; }
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
tr, img { break-inside: avoid; }

.page-break { break-after: page; }

/* Print with real ink values rather than the screen theme. */
.doc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* Expose link targets that the reader cannot click on paper. */
.doc a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 9px; color: #64748b; }
