/*
 * Print and screen styling for the proforma page (render/proforma.js).
 * Link this file in any page that shows the pages. It sets the paper size, the three font names and the
 * "print backgrounds exactly" switch. The drawing itself (every line, every position) is inside each page's SVG.
 */

/* A4, no margin: the page is drawn edge to edge, positioned in points from the top-left corner. */
@page { size: A4; margin: 0; }

.pf-page {
  position: relative;
  box-sizing: border-box;
  width: 210mm;
  height: 296.8mm;            /* a hair under 297mm so rounding can never push a blank sheet out after each page */
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  break-after: page;
  page-break-after: always;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.pf-page:last-child { break-after: auto; page-break-after: auto; }

.pf-svg { display: block; position: absolute; left: 0; top: 0; width: 210mm; height: 297mm; }

/* text: keep every double space (item descriptions have them), no kerning/ligatures so widths match the originals */
.pf-page text {
  white-space: pre;
  font-kerning: none;
  font-variant-ligatures: none;
  text-rendering: geometricPrecision;
  fill: #000;
}
/* The three fonts the originals use. Named, not shipped: they are installed on the office PCs and Macs. */
.pf-page .v   { font-family: Verdana, "DejaVu Sans", sans-serif; font-weight: 400; }
.pf-page .vb  { font-family: Verdana, "DejaVu Sans", sans-serif; font-weight: 700; }
.pf-page .vbi { font-family: Verdana, "DejaVu Sans", sans-serif; font-weight: 700; font-style: italic; }
.pf-page .sh  { fill: #808080; }                                                                     /* the letterhead title's grey shadow copy */
.pf-page .cb  { font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-weight: 700; }   /* the letterhead title */
.pf-page .th  { font-family: Tahoma, Verdana, sans-serif; font-weight: 400; }                       /* amount in words */

@media screen {
  body { background: #e9e9e9; }
  .pf-page { margin: 14px auto; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
}
@media print {
  html, body { margin: 0; padding: 0; background: #fff; }
  .pf-page { margin: 0; box-shadow: none; }
}
