/* ============================================================
   PRINT STYLESHEET — VDI Check Trade Full Report
   Linked from full-report.html as media="print".
   Hides chrome, reformats sections for A4, forces light theme.
   ============================================================ */

@media print {
  /* Force light background + dark text regardless of theme */
  :root {
    color-scheme: light;
  }
  body {
    background: #fff !important;
    color: #1a202c !important;
    font-size: 11pt;
    line-height: 1.4;
  }

  /* Hide non-print elements */
  .auth-header,
  .auth-header__mobile-nav,
  .site-footer,
  .report-nav,
  .report-nav__hamburger,
  .report-nav__overlay,
  .full-report__actions,
  .dev-nav,
  .low-balance-banner,
  .search-error-banner,
  .theme-toggle { display: none !important; }

  /* Remove sticky/fixed positioning */
  .report-nav,
  .auth-header { position: static !important; }

  /* Full width — remove sidebar grid */
  .report-layout {
    display: block !important;
  }

  /* Container — remove horizontal constraints */
  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Panels — remove shadows, ensure borders print */
  .vdi-box {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 12pt;
  }

  .vdi-box-title {
    background: #2f3e52 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* Preserve branded panel colours on the full report when printing */
  .report-content .vdi-box-title {
    background: var(--brand-header-bg) !important;
    color: var(--brand-header-text) !important;
  }
  .report-content .vdi-box-accent {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Status flags — force colour printing */
  .status-flags {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .status-flag {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .flag-banner {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Tables — keep rows together */
  .data-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* MOT records — don't split across pages */
  .full-report__mot {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Report section state labels — hide mock-only labels */
  .report-section__state-label { display: none !important; }

  /* Links — show URL after link text for printed reference */
  .full-report__detail a::after,
  .report-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
  }

  /* UK plates — force yellow background */
  .uk-plate {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Page margins */
  @page {
    size: A4;
    margin: 15mm 12mm;
  }

  /* Page header info — ensure it prints */
  .page-title, .page-subtitle {
    color: #1a202c !important;
  }
}
