/* Print stylesheet for the whole app. Affects ONLY printed / Save-as-PDF
   output - screen rendering is untouched. Loaded with media="print" so it
   never applies on screen. Goal: a clean report on paper - no nav, no footer,
   no interactive chrome, light backgrounds, sensible page breaks. */

@page {
  size: A4;
  margin: 1.5cm 1.6cm 1.8cm;
}

@media print {
  /* Print real backgrounds/colours (status chips etc.) rather than dropping them. */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide app chrome and anything interactive - it has no place on paper. */
  nav,
  footer,
  .vh-bar,
  .vh-trigger,
  .btn-back,
  .nav-toggle,
  .people-search,
  .people-seg-zone,
  .dl-popup,
  .download-btn,
  [data-cookie-settings],
  .btn:not(.print-keep) {
    display: none !important;
  }

  html { font-size: 11pt; }

  body {
    background: #fff !important;
    color: #111 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Let the content use the full printable width. */
  .app-section,
  .shell,
  .shell-wide {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Cards: flat on paper - no shadow, thin border, and never split mid-card. */
  .card,
  .section-card,
  .issues-block,
  .signoff-block {
    box-shadow: none !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Keep a heading with the content that follows it. */
  h1, h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* Rows and photos should not be torn across a page break. */
  .row,
  .photo-thumb,
  tr,
  li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Links print as plain text, not blue underlined web links. */
  a {
    color: #111 !important;
    text-decoration: none !important;
  }

  /* Expand any collapsed sections so the print is complete. */
  .section-body.collapsed,
  [hidden].print-show {
    display: block !important;
  }
}
