/* Applied only when printing (media="print" on the <link>).
   Strips the app chrome so the sheet lands on A4 on its own. */

@page {
  size: A4;
  margin: 0;
}

body { background: #fff; margin: 0; }

#nav,
#toasts,
.print-bar {
  display: none !important;
}

#shell { display: block; }
#view { padding: 0; }

.sheet {
  border: 0;
  border-radius: 0;
  padding: 14mm;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  max-width: none;
  margin: 0;
}

/* The document header stays two columns on paper regardless of how narrow the
   page is in CSS pixels. Stated explicitly so a future screen breakpoint can
   never reach in and stack it again. */
.sheet-head { flex-direction: row; }
.sheet-meta { text-align: right; min-width: 220px; }
.sheet-meta table { margin-left: auto; }

/* Long descriptions must flow into the remaining page space instead of
   moving the entire item to a new page. Repeat only the column headings. */
.sheet-lines thead { display: table-header-group; }
.sheet-lines tbody tr,
.sheet-lines tbody td { page-break-inside: auto; break-inside: auto; }
.sheet-lines tfoot { display: table-row-group; }
.sheet-lines tfoot tr { break-inside: avoid; }
.sheet-totals,
.sheet-foot { page-break-inside: avoid; }

/* Force the accent colours through — browsers drop backgrounds when printing
   unless asked not to. */
* {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.sheet--quote-sidebar { padding-left:60mm; min-height:0; }
.sheet--quote-sidebar .design-sidebar { left:14mm; top:14mm; bottom:14mm; width:39mm; padding:4mm; }
.design-header { break-inside:avoid; }
