/* ==========================================================================
   PRINT: overrides used only when printing (the layout links this file with
   media="print", after site.css). It uses the same DESIGN TOKENS as site.css
   and adds no colors of its own and only one size (the paper margin below):
   change the look in site.css.
   The page prints without the top bar, menu, search and buttons, and tables
   run the full width of the paper.
   ========================================================================== */
/* The one size written outside the token block: CSS variables from :root do not reach the @page box in every
   browser, so the paper margin is set here (see README.md and StylesheetTests). */
@page {
  margin: 0.5in;
}

body {
  display: block;
  min-height: 0;
  background: var(--color-card);
}

.skip-link,
.topbar,
.menu,
.menu-toggle,
.big-search-form,
.export-bar,
.btn,
button,
.demo-banner-link {
  display: none !important;
}

.shell {
  display: block;
}

.content,
.signed-out .content {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

/* A printout from a demo database says so on paper too. */
.demo-banner {
  border: var(--border-thick) solid var(--color-red);
  background: var(--color-card);
  color: var(--color-red);
}

a {
  color: var(--color-ink);
  text-decoration: none;
}

.box,
.tile {
  box-shadow: none;
  break-inside: avoid;
}

.tbl-wrap {
  overflow: visible;
}

.tbl {
  width: 100%;
}

.tbl thead {
  display: table-header-group;
}

.tbl tr {
  break-inside: avoid;
}

/* The ticket tag is a half page: it takes the top half of the sheet and the rest stays blank. */
.tag {
  min-height: var(--tag-height);
  border: var(--border-thick) solid var(--color-ink);
  break-inside: avoid;
}

.tag-station {
  font-size: var(--text-tag-station-print);
}

/* A help article prints without its "All help topics" links. */
.help-back {
  display: none !important;
}

/* A cheat sheet prints on one letter page: the paper's full width without the screen's edge, the title and its picture
   across the top, and the sections in two columns below, with no step or picture split between columns. A link in a
   sentence stays in the sentence on paper (on screen .action-link makes it a 44px target). */
.cheat-sheet {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  columns: 2;
  column-gap: var(--space-6);
}

.cheat-sheet a {
  display: inline;
  min-height: 0;
}

.cheat-sheet h1,
.cheat-sheet p:has(.help-screenshot) {
  column-span: all;
}

.cheat-sheet h1 {
  margin: 0;
}

.cheat-sheet h2 {
  margin: var(--space-3) 0 var(--space-1);
  font-size: var(--text-lead);
  break-after: avoid;
}

.cheat-sheet h2:first-of-type {
  margin-top: 0;
}

.cheat-sheet p,
.cheat-sheet ol,
.cheat-sheet ul {
  margin: 0 0 var(--space-2);
}

.cheat-sheet li {
  margin-bottom: var(--space-1);
  break-inside: avoid;
}

.cheat-sheet .help-screenshot {
  margin: var(--space-2) 0;
  break-inside: avoid;
}

/* The work order prints on one letter page: its two columns become one, and the printed sheet is set a size smaller, with
   tighter boxes and tables. */
.wo-columns {
  display: block;
}

.wo-print {
  font-size: var(--text-small);
}

.wo-print h1 {
  margin: 0;
}

.wo-print .wo-subline {
  margin: var(--space-1) 0 var(--space-2);
  font-size: var(--text-small);
}

.wo-print .wo-status,
.wo-print .box {
  margin: var(--space-2) 0;
}

.wo-print .box-title,
.wo-print .box-body,
.wo-print .wo-step {
  padding: var(--space-1) var(--space-2);
}

.wo-print .tbl th,
.wo-print .tbl td {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-small);
}
