/* Print output is a separate document (#print-document, built by app.js
   just before printing — see app.css for the shared .print-page sizing
   rules and app.js for how pages are packed). This stylesheet only
   toggles which document is visible and hides editor-only chrome. */

@page {
  size: A4;
  /* .print-page itself is the full physical page (see app.css) and
     already carries its own uniform 20mm padding, so no @page margin is
     needed on top of that. */
  margin: 0;
}

@media print {
  .screen-only,
  .toolbar,
  .notice,
  .dialog-overlay,
  .add-item-button,
  .invoice-page,
  .a4-pages {
    display: none !important;
  }

  body {
    background: #fff;
  }

  #print-document {
    position: static;
    top: auto;
    left: auto;
    visibility: visible;
  }

  .editable {
    border: none !important;
    background: none !important;
    padding: 0;
    margin: 0;
    pointer-events: none;
  }

  .invoice-item-row {
    padding: 0.4rem 0.5rem;
  }

  /* The footer's on-screen margin-top: auto (app.css) is a flex trick
     for the single, unpaginated editor sheet; .print-page-footer's grid
     row is already sized exactly to the footer's own content, so it
     needs a plain margin here instead. */
  .print-page-footer .invoice-footer {
    margin-top: 0;
  }
}
