/* Print view for the TCC sheets (Hand Baggage, Delay Reports).
   Prints the module's output only — the e-mail list / the delay report tables —
   on A4 with the browser's default margins. Also applied while the parent app
   measures the frame before printing (html.xl-printing). */
@page { size: A4; }
@media print {
  html, body, html.xl-printing, html.xl-printing body {
    background: #fff !important; background-image: none !important; min-height: 0 !important; height: auto !important;
    margin: 0 !important; padding: 0 !important; overflow: visible !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #toast, .modal-backdrop, .modal, header.appbar { display: none !important; }
  /* Hand Baggage: only the e-mail preview (what is pasted into Outlook) */
  main:has(#emailRender) { display: block !important; padding: 0 !important; margin: 0 !important; }
  main:has(#emailRender) .editor-col, .preview-bar, .preview-col > .col-title { display: none !important; }
  .preview-col, .preview-shell, .preview-scroll, #emailRender {
    display: block !important; position: static !important; width: auto !important; max-width: none !important; height: auto !important;
    max-height: none !important; overflow: visible !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important;
    background: none !important; box-shadow: none !important; }
  /* Delay Reports: the report tables only */
  .delay-grid, .import-actions, .filter-bar, .tile-actions, .nf-head .spacer, .nf-head button, button.delay-del, td:has(> button.delay-del), th:empty { display: none !important; }
  main, .delay-section, .delay-card, .nf-block { display: block !important; padding: 0 !important; margin: 0 !important; border: 0 !important;
    background: none !important; box-shadow: none !important; }
  .nf-block { margin-top: 6mm !important; break-inside: avoid-page; }
  .delay-scroll, #delayWrap, #nfWrap { overflow: visible !important; max-height: none !important; height: auto !important; }
  table { break-inside: auto; } tr { break-inside: avoid; }
}
/* same view while the parent measures the frame for printing */
html.xl-printing #toast, html.xl-printing .modal-backdrop, html.xl-printing .modal, html.xl-printing header.appbar,
html.xl-printing main:has(#emailRender) .editor-col, html.xl-printing .preview-bar, html.xl-printing .preview-col > .col-title,
html.xl-printing .delay-grid, html.xl-printing .import-actions, html.xl-printing .filter-bar, html.xl-printing .tile-actions,
html.xl-printing .nf-head .spacer, html.xl-printing .nf-head button, html.xl-printing button.delay-del,
html.xl-printing td:has(> button.delay-del) { display: none !important; }
html.xl-printing body { padding: 0 !important; background-image: none !important; }
html.xl-printing main { display: block !important; padding: 0 !important; }
html.xl-printing .preview-col, html.xl-printing .preview-shell, html.xl-printing .preview-scroll, html.xl-printing #emailRender,
html.xl-printing .delay-scroll, html.xl-printing #delayWrap, html.xl-printing #nfWrap {
  position: static !important; height: auto !important; max-height: none !important; overflow: visible !important; }
