/* Print / PDF (browser print in M2): the map snapshot above the panel at full width,
   a header with firm, date and analysis id, the results and both disclaimers. */

/* While printing is being prepared the map takes its print size on screen too, so
   Leaflet lays out its tiles for the size they are printed at. */
body.print-sizing .map { width: 680px; height: 340px; flex: none; }

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  html, body { height: auto; background: #fff; }
  body { font-size: 11pt; overflow: visible; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* a focus ring (the chip takes focus after a run) is not part of the page */
  :focus, :focus-visible { outline: none !important; }
  .top, .foot, .no-print, dialog, .signin, .terms-view { display: none !important; }
  /* the map keeps its legend, scale and the OSM / Esri attribution (required); not its buttons */
  .leaflet-control-zoom, .leaflet-control-layers { display: none !important; }
  .app:not([hidden]) { display: flex !important; flex-direction: column; height: auto; }
  .map {
    order: 1; width: 680px; height: 340px; margin: 0 auto 12px; border: 1px solid var(--line);
    break-inside: avoid;
  }
  .panel { order: 2; width: 100%; overflow: visible; border: 0; padding: 0; }
  .print-head {
    display: block; order: 0; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--ink);
  }
  .ph-title { font-size: 14pt; font-weight: 600; }
  .ph-meta { font-size: 9.5pt; color: var(--muted); }
  .results { border-top: 0; padding-top: 0; }
  /* Ctrl+P bypasses the disabled button: a stale result is not printed as if it were current */
  .results.is-stale > :not(.stale) { display: none !important; }
  .print-head.is-stale .ph-meta { display: none; }
  .check { break-inside: avoid; }
  /* next steps are printed open */
  .next[hidden] { display: block !important; }
  button.check-head::after { display: none; }
  .disclaimers { break-inside: avoid; }
  .disclaimers .fine { color: var(--ink); }
}
