/*
 * parcel-brief-print.css — Phase F print stylesheet for the parcel drawer.
 *
 * Triggered by `body.guide-parcel-print-mode` (set by the drawer's print
 * button) AND by `@media print`. Hides the entire app shell except for
 * the drawer contents, restyles the drawer to fill letter paper, and
 * collapses dynamic chrome (skeletons, AI pills, sticky nav rail).
 *
 * Output is a one-page Parcel Intelligence Brief with the section cards
 * laid out as a single column, ready to hand to a landowner.
 */

@media print {
  /* Hide everything except the drawer, but ONLY when the drawer is what is being printed (its print button, or the drawer
     open). This rule used to apply to every print on every page, so Print produced a blank sheet everywhere. */
  body.guide-parcel-print-mode > *:not(#guide-parcel-drawer),
  body.guide-parcel-drawer-open > *:not(#guide-parcel-drawer) {
    display: none !important;
  }
  body.guide-parcel-drawer-open {
    overflow: visible !important;
  }
  #guide-parcel-drawer {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: #FFFFFF !important;
  }
  .pd-head-actions { display: none !important; }
  .pd-nav { display: none !important; }
  .pd-icon-btn, .pd-cta { display: none !important; }
  .pd-ai-pill { display: none !important; }
  .pd-skeleton { display: none !important; }
  .pd-section { break-inside: avoid; }
  .pd-section { box-shadow: none; border: 1px solid #E0DCD2 !important; }
  .pd-head { border-bottom: 1px solid var(--guide-color-text-primary, #1A1A1F) !important; }
  .pd-section-title { color: var(--guide-color-text-primary, #1A1A1F) !important; }
  .pd-grade { color: var(--guide-color-text-on-accent, #FFFFFF) !important; }

  /* Print footer with timestamp + parcel id */
  .pd-head::after {
    content: " — Generated " attr(data-generated-at);
    color: #6B6B73;
    font-weight: 400;
    font-size: var(--guide-fs-xs);
    margin-left: 8px;
  }
}

/* The body class is also used to force-print without a media query. */
body.guide-parcel-print-mode #guide-parcel-drawer {
  width: 8.5in !important;
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  z-index: var(--guide-z-max, 99999) !important;
  background: #FFFFFF !important;
}
body.guide-parcel-print-mode > *:not(#guide-parcel-drawer):not(script):not(style):not(link) {
  visibility: hidden !important;
}
