/*
 * print.css — one A4 sheet per page, nothing else.
 *
 * The page is landscape because four 148.5 x 105mm labels tile it exactly:
 * 2 x 148.5 = 297 and 2 x 105 = 210. Margin is 0 on purpose — the labels
 * already fill the sheet edge to edge, and any margin the browser adds would
 * scale them down and move the cut lines.
 */

@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  /* The label is a slate design: header band, zebra rows and the dark tick
     fills are backgrounds, and a driver that drops background printing would
     remove the row separation the packer reads. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #fff;
  }

  /* Anything the factory operator uses but the printer must not see. */
  .screen-only,
  #topbar,
  .pane-edit,
  .preview-bar,
  .toast,
  .popover,
  .modal,
  .footnote {
    display: none !important;
  }

  #app {
    display: block;
    height: auto;
    overflow: visible;
  }

  #workspace {
    display: block;
    height: auto;
    overflow: visible;
  }

  .pane-preview {
    display: block;
    width: auto;
    height: auto;
    border: 0;
    background: none;
    overflow: visible;
  }

  .preview-scroll {
    display: block;
    height: auto !important;
    padding: 0;
    overflow: visible;
    background: none;
  }

  #print-root {
    zoom: 1 !important;
    transform: none !important;
    width: auto;
  }

  .sheet {
    box-shadow: none !important;
    border: 0 !important;
    margin: 0 !important;
    break-after: page;
    page-break-after: always;
  }

  .sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}
