/* Print-only overrides — loaded via a <link media="print"> in head.js, so
   everything here only takes effect when actually printing (or print-previewing);
   no @media wrapper needed, the link's own media attribute is the gate.
   Generic across pages, not tied to any one view: strip app-shell chrome and
   interactive controls, leave the read-only content behind. */

/* Remove app shell chrome, not needed on paper. */
.cp-sidebar, .cp-topbar, .cp-offline-banner { display: none !important; }

/* List-page toolbars (search bar, action buttons) are pure chrome, no
   printable content of their own. The print sheet's own toolbar (print again,
   close the tab) is the same: it exists to be used from the screen this page
   is shown on, and means nothing once the page is paper. */
.cp-list-controls, .cp-print-toolbar { display: none !important; }

/* Buttons and tab strips are interactive controls with nothing to do on
   paper. Genuine form inputs are deliberately left alone — they can carry
   printable values (e.g. a filled-in order form). */
.btn, button, .nav-tabs { display: none !important; }

/* Cards: drop the on-screen drop shadow (doesn't reproduce well on paper,
   the existing 1px border already marks the card's edge without it). */
.card { box-shadow: none !important; }

/* Card headers: a plain bordered white band instead of theme.css's solid
   black fill — readable black-on-white without burning a wide black bar
   into every printed page. */
.card-header {
  background-color: #fff !important;
  border-bottom-color: var(--bs-border-color) !important;
  color: #000 !important;
}
.card-header .bi { color: #000 !important; }

/* Status badges: plain text on paper. Their on-screen legibility comes from the background
   (text-bg-primary is white on blue, text-bg-success white on green), and print-color-adjust
   defaults to `economy`, which lets the browser drop backgrounds. White text on a dropped
   background is white on white, so an Ord. Stat. column that reads fine on screen prints
   blank. Black text needs no background to be legible. */
.badge {
  background: transparent !important;
  color: #000 !important;
}

/* The store colour (the strip, and the work order list's LOC chip) is the one place colour
   carries information rather than decoration: the CPF sorts finished frames into bins
   colour-coded per store, so the colour on paper is the colour on the shelf. Worth overriding `economy` for. On a mono printer it lands as a
   grey that still distinguishes stores. */
.cp-store-strip,
.cp-loc {
  print-color-adjust: exact;
}

/* A long list prints across pages, so repeat the column headers on each one and keep a row
   from being split down the middle by a page break. */
.cp-print-table thead {
  display: table-header-group;
}

.cp-print-table tr {
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features -- caniuse files
     break-inside under "multicolumn", and the partial support it flags is about multi-column
     layout, not paged media, which is the only context this rule is ever evaluated in. A
     browser that ignored it would split a row across a page break: annoying on a list you
     are ticking down, not broken. */
  break-inside: avoid;
}

/* Store order pick list: one page per sheet, so each division's fulfiller
   gets their own. */
.cp-so-sheets {
  display: block;
}

.cp-so-sheet + .cp-so-sheet {
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features -- the same false
     "multicolumn" flag as break-inside above; this is paged media. A browser that ignored it
     would run the sheets together, which is the only thing the page break is for. */
  break-before: page;
}
