/* FosterPath — print.css
 * Clean print / PDF stylesheet for resource cards.
 * Linked with media="print" — does not affect screen rendering.
 */

@media print {

  /* ── RESET / BASE ──────────────────────────────────────────────────────── */
  * { box-sizing: border-box; }

  body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11pt;
    color: #000;
    background: #fff;
    margin: 0;
    padding: 0;
  }

  /* ── HIDE NON-CONTENT UI ───────────────────────────────────────────────── */
  header,
  nav,
  .crisis-strip,
  .fp-crisis-strip,
  .category-nav,
  .state-nav,
  .state-picker,
  .filter-bar,
  .hero,
  .card-arrow,
  .card-footer,
  .report-link,
  .section-dot,
  .count-badge,
  .link-btn svg,
  footer,
  [class*="nav"],
  [class*="picker"],
  [class*="state-chip"] { display: none !important; }

  /* ── PAGE LAYOUT ───────────────────────────────────────────────────────── */
  .fp-resources,
  .resources-section,
  .resource-section,
  main {
    padding: 0.5in 0.75in !important;
    background: #fff !important;
  }

  /* ── SECTION HEADS ─────────────────────────────────────────────────────── */
  .section-head,
  .fp-section-head,
  [class*="section-head"] {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 4pt;
    margin: 18pt 0 8pt;
    page-break-after: avoid;
  }

  .section-head h2,
  .section-head h3,
  .fp-section-head h2,
  .fp-section-head h3 {
    font-size: 14pt;
    font-weight: bold;
    color: #000;
  }

  /* ── CARDS ─────────────────────────────────────────────────────────────── */
  .cards,
  .fp-cards,
  [class*="-cards"] { display: block; }

  .card,
  .fp-card,
  [class*="-card"]:not([class*="-card-"]) {
    display: block;
    border: 1px solid #aaa;
    border-radius: 4pt;
    margin-bottom: 10pt;
    padding: 8pt 10pt;
    page-break-inside: avoid;
    break-inside: avoid;
    background: #fff !important;
  }

  /* Force card bodies open */
  .card-body,
  .fp-card-body,
  [class*="-card-body"] {
    display: block !important;
    visibility: visible !important;
    max-height: none !important;
    overflow: visible !important;
    padding-top: 4pt !important;
  }

  .card-header,
  .fp-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8pt;
    cursor: default;
    margin-bottom: 6pt;
  }

  .card-icon,
  .fp-card-icon {
    width: 28pt;
    height: 28pt;
    font-size: 16pt;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f0f0f0 !important;
    border: 1px solid #ccc;
  }

  .card-title,
  .fp-card-title {
    font-size: 12pt;
    font-weight: bold;
    color: #000;
    margin-bottom: 2pt;
  }

  .card-subtitle,
  .fp-card-subtitle {
    font-size: 10pt;
    color: #333;
    font-style: italic;
  }

  /* ── TAGS ──────────────────────────────────────────────────────────────── */
  [class*="tag"] {
    display: inline-block !important;
    border: 1px solid #888 !important;
    border-radius: 3pt !important;
    padding: 1pt 4pt !important;
    font-size: 8pt !important;
    color: #000 !important;
    background: transparent !important;
    margin-right: 3pt !important;
    margin-bottom: 2pt !important;
  }

  /* ── BODY CONTENT ──────────────────────────────────────────────────────── */
  .card-body p,
  .fp-card-body p {
    font-size: 10pt;
    margin-bottom: 4pt;
    color: #000;
  }

  .card-body ul,
  .fp-card-body ul {
    margin: 4pt 0 4pt 14pt;
    padding: 0;
  }

  .card-body li,
  .fp-card-body li {
    font-size: 10pt;
    color: #000;
    margin-bottom: 3pt;
    line-height: 1.4;
  }

  /* ── TIP BOX ───────────────────────────────────────────────────────────── */
  .tip-box {
    border: 1px solid #888 !important;
    border-left: 3pt solid #000 !important;
    background: transparent !important;
    padding: 5pt 8pt !important;
    margin-top: 6pt;
    font-size: 10pt;
    color: #000;
    border-radius: 3pt;
  }

  /* ── LINKS ─────────────────────────────────────────────────────────────── */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #444;
    word-break: break-all;
  }

  .card-header a::after,
  .card-icon a::after { content: none; }

  /* ── PAGE BREAKS ───────────────────────────────────────────────────────── */
  .section-head,
  .fp-section-head { page-break-before: auto; }

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

} /* end @media print */
