/* public/print.css */
/* ---------- Print-only, zero effect on screen ---------- */

@page {
  size: Letter;
  margin: 0.75in;
}

@media print {
  /* Keep your current print look */
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
    line-height: 1.45;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    height: auto !important; /* prevent viewport-height spillovers */
  }

  /* Hide chrome explicitly marked as print:hidden */
  .print\:hidden { display: none !important; }

  /* ====== Surgical overrides to stop the blank page ====== */
  .min-h-screen { min-height: auto !important; }
  .h-screen     { height: auto !important; }
  .pb-16        { padding-bottom: 0 !important; }

  /* Avoid awkward page breaks inside the letter block */
  .letter, .letter > * { break-inside: avoid-page; }

  /* Keep shadows/rings off for cleaner output */
  .shadow, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl { box-shadow: none !important; }
  .ring, .ring-1, .ring-2, .ring-4 { box-shadow: none !important; }

  /* Optional letterhead hooks preserved */
  body.has-letterhead::before,
  body.has-letterhead::after {
    content: "";
    display: block;
    width: var(--logo-w, 0);
    height: var(--logo-h, 0);
    background-image: var(--logo-url, none);
    background-size: contain;
    background-repeat: no-repeat;
    margin-bottom: calc(var(--logo-h, 0) == 0 ? 0 : 8pt);
  }
}

