/*
 * Printing a receipt through the browser (src/lib/print.ts).
 *
 * Only #print-root prints. The page is the roll's width with no margin, so
 * the receipt printer's driver prints the 32 or 48 columns as they are laid
 * out. Black on white whatever the theme, because the paper is.
 */

@page roll58 {
  size: 58mm auto;
  margin: 0;
}

@page roll80 {
  size: 80mm auto;
  margin: 0;
}

html,
body {
  height: auto !important;
  background: #ffffff !important;
}

#root,
.m-overlay,
.m-toasts {
  display: none !important;
}

#print-root {
  display: block !important;
  page: roll58;
  color: #000000;
}

#print-root[data-paper="80"] {
  page: roll80;
}

.print-receipt {
  margin: 0;
  padding: 2mm 0;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
  /* 32 columns across 48 mm of printable width, 48 across 72 mm. */
  font-size: 10.5pt;
  line-height: 1.25;
  white-space: pre;
}

#print-root[data-paper="58"] .print-receipt {
  width: 48mm;
  margin: 0 auto;
  font-size: calc(48mm / 32 / 0.6);
}

#print-root[data-paper="80"] .print-receipt {
  width: 72mm;
  margin: 0 auto;
  font-size: calc(72mm / 48 / 0.6);
}

.print-line--strong {
  font-weight: 700;
}
