/* ======================================================
   Miller Valve & Controls — Print Stylesheet
   Applied via <link rel="stylesheet" media="print" ...>
   Goal: clean, single-color, no chrome — engineer-friendly
   ====================================================== */

@media print {

  /* Reset page */
  @page {
    size: letter;
    margin: 0.6in 0.7in 0.7in 0.7in;
  }

  /* Strip background colors / images, force black on white for ink */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 11pt !important;
    line-height: 1.45 !important;
  }

  /* Hide everything that's not content */
  #navbar,
  .nav-toggle,
  .breadcrumb,
  .cta-strip,
  .memorial,
  footer,
  .related,
  .tool-cta,
  .quote-cta,
  .calc-cta,
  .ctaBox,
  .resources-strip,
  .faq-teaser,
  .trust-strip,
  .article-cover,
  .nav-links,
  .quote-actions button.cancel,
  .clear-btn,
  .reset-btn,
  .print-only-hide,
  [data-print="hide"] {
    display: none !important;
  }

  /* Show print-only elements */
  .print-only,
  [data-print="show"] {
    display: block !important;
  }

  /* Remove animations & transitions */
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
  }

  /* Page hero collapses to a simple title block */
  .page-hero,
  .article-hero,
  header.page-hero,
  header.article-hero {
    background: #fff !important;
    padding: 0 0 12pt 0 !important;
    border-bottom: 2pt solid #000 !important;
    margin-bottom: 18pt !important;
    overflow: visible !important;
  }
  .page-hero::before,
  .article-hero::before {
    display: none !important;
  }
  .page-hero h1,
  .article-hero h1 {
    color: #000 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 22pt !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 6pt !important;
  }
  .page-hero h1 span,
  .article-hero h1 span {
    color: #000 !important;
  }
  .page-hero p,
  .article-hero .deck {
    color: #333 !important;
    font-size: 11pt !important;
    font-style: italic !important;
  }
  .page-hero-tag,
  .article-meta {
    color: #555 !important;
    font-size: 9pt !important;
  }
  .page-hero-tag::before,
  .page-hero-tag::after,
  .article-meta .dot {
    background: #555 !important;
  }
  .article-meta .tag {
    color: #555 !important;
  }

  /* Containers full width on paper */
  .container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }

  /* Body text */
  h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif !important;
    color: #000 !important;
    page-break-after: avoid !important;
  }
  h2 { font-size: 15pt !important; margin-top: 16pt !important; }
  h3 { font-size: 12pt !important; margin-top: 12pt !important; }
  p, li { color: #000 !important; orphans: 3; widows: 3; }
  a { color: #000 !important; text-decoration: underline !important; }
  /* Show URL after external links so print readers don't lose them */
  .article-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  /* Tables */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: avoid !important;
    margin: 8pt 0 !important;
  }
  th, td {
    border: 0.5pt solid #999 !important;
    padding: 4pt 6pt !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt !important;
  }
  th { background: #eee !important; font-weight: bold !important; }

  /* Cards / callouts / formulas — flatten to bordered blocks */
  .callout, .formula, .compare-card, .related-card,
  .resource-card, .tool-card, .quote-step, .ptcard {
    background: #fff !important;
    border: 0.5pt solid #999 !important;
    border-radius: 0 !important;
    padding: 6pt 8pt !important;
    margin: 6pt 0 !important;
    color: #000 !important;
  }

  /* Page-break helpers */
  .page-break-before { page-break-before: always !important; }
  .page-break-avoid { page-break-inside: avoid !important; }

  /* Footer-ish: simple printed source line */
  body::after {
    content: "Miller Valve & Controls  ·  millervalves.com  ·  (205) 871-7778";
    display: block;
    margin-top: 24pt;
    padding-top: 8pt;
    border-top: 0.5pt solid #999;
    font-size: 8.5pt;
    color: #555;
    text-align: center;
  }

  /* === Cv Calculator print presentation === */
  .calc-tabs, .calc-form-actions, .pre-fill-row { display: none !important; }
  .calc-results, .results-section, .result-card {
    border: 0.5pt solid #000 !important;
    background: #fff !important;
    padding: 10pt 12pt !important;
    margin: 8pt 0 !important;
  }

  /* === Quote Wizard print presentation === */
  .step, .step.active { display: block !important; page-break-inside: avoid; }
  .step-nav, .step-progress, .step-actions { display: none !important; }
  input, textarea, select {
    border: none !important;
    border-bottom: 0.5pt solid #000 !important;
    background: transparent !important;
    color: #000 !important;
    padding: 2pt 0 !important;
    font-family: Georgia, serif !important;
    font-size: 11pt !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
            appearance: none !important;
  }
  textarea { border: 0.5pt solid #999 !important; padding: 4pt !important; min-height: 40pt; }
  label { font-weight: bold !important; font-size: 10pt !important; color: #000 !important; }

  /* Logo: keep it but small, top of first page */
  .nav-logo { display: none !important; }
  .print-letterhead {
    display: block !important;
    margin-bottom: 12pt !important;
    border-bottom: 0.5pt solid #999 !important;
    padding-bottom: 6pt !important;
    font-family: Georgia, serif !important;
    font-size: 9pt !important;
    color: #555 !important;
  }
  .print-letterhead strong { color: #000 !important; font-size: 11pt !important; display: block; }
}
