/* Print version of the public site. Loaded for every page; the print rules only apply when printing.
   Websmart: kept separate so styles.css, blockstyles.css and custom.css are untouched. */

/* On screen the print-only header and footer stay hidden. */
.print-only { display: none; }

@page { size: letter; margin: 16mm 14mm 18mm; }

@media print {
  .print-only { display: block !important; }

  /* Things that mean nothing on paper */
  .preview-bar, .visually-hidden-focusable, .utility, .site-header, .section-subnav, nav, .menu,
  footer, .alert-bar, .hero-shape, .page-orb, .hero-story-controls, .hero-story-nav, .hero-pause, .floating-note,
  .like-box, .share-this, .article-aside a[href^="/news"], .sponsors, .sponsor-item, .contact-form, form,
  .gallery-nav, video, iframe, .ratio, button, .actions, .cta-band, .volunteer, .photo-frame { display: none !important; }

  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; line-height: 1.45; }
  * { box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; }
  /* Side margin of our own, so text never touches the paper edge even if the browser's margin is set to None */
  body { padding: 0 8mm !important; margin: 0 !important; }
  .wrap, .container-xl, main { max-width: none !important; width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; margin: 0 !important; }
  /* Screen spacing is far too generous on paper */
  section, .page-block, .page-hero, .events-section, .event-feature, .news-landing, .events-landing, .promos { padding-top: 10pt !important; padding-bottom: 10pt !important; margin-top: 0 !important; margin-bottom: 0 !important; background: none !important; }
  .block-box { padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; }
  .event-feature, .next-event, .news-latest-grid, .signature-grid { display: block !important; }
  .event-feature-photo img, .next-event-photo img, .news-lead-image img { height: auto !important; max-height: 220pt; width: auto; max-width: 100%; border-radius: 0 !important; }
  .news-listing, .event-list article, .news-compact { display: block !important; }
  .news-card, .signature-card, .event-list article, .news-compact { border: 0 !important; border-bottom: 1px solid #999 !important; padding: 6pt 0 !important; margin: 0 0 6pt !important; }

  /* Single column: the side panel flows under the story */
  .row { display: block !important; }
  .row > [class*="col-"] { width: 100% !important; max-width: 100% !important; padding: 0 !important; }
  .article-aside { border: 1px solid #999 !important; padding: 8pt 10pt !important; margin-top: 14pt !important; background: #fff !important; }

  /* Page title block (the banner) */
  .page-hero { background: none !important; color: #000 !important; padding: 0 0 8pt !important; margin: 0 0 10pt !important; border-bottom: 1px solid #000; }
  .page-hero h1 { font-size: 22pt; color: #000 !important; }
  .banner-card { background: none !important; color: #000 !important; box-shadow: none !important; border: 1px solid #000; border-radius: 0; }
  .banner-card * { color: #000 !important; }
  .has-banner-card .article-shell > .banner-card-slot { margin-top: 0 !important; }
  .page-hero-jumps { display: none !important; }
  .page-hero-photo { display: none !important; }
  .page-hero-subtitle, .eyebrow { color: #333 !important; }

  h1, h2, h3, h4 { color: #000 !important; break-after: avoid; page-break-after: avoid; }
  p, li, blockquote, figure, tr, img, .article-aside { break-inside: avoid; page-break-inside: avoid; }
  p { orphans: 3; widows: 3; }
  img { max-width: 100% !important; height: auto !important; }
  figure { margin: 8pt 0; }
  figcaption { font-size: 9pt; color: #333; }
  a, a:visited { color: #000 !important; text-decoration: underline; }

  /* Show where web links go, but not menus, anchors, tel or mail links */
  main a[href^="http"]:not([href*="saugeenhospice"])::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }

  /* Running page number, where the browser supports it */
  @page { @bottom-right { content: "Page " counter(page) " of " counter(pages); font-size: 9pt; } }

  /* Print header: once, at the top of the first page */
  .print-header { display: flex !important; align-items: center; justify-content: space-between; gap: 12pt; padding: 0 0 8pt !important; margin: 0 0 12pt !important; border-bottom: 2px solid #000; }
  .print-header img { flex: 0 0 auto; display: block; width: 137pt !important; height: 44pt !important; max-width: 137pt !important; max-height: 44pt !important; aspect-ratio: 798 / 256; object-fit: contain !important; object-position: left center; }
  .print-header div { text-align: right; font-size: 10pt; }
  .print-header strong { display: block; font-size: 12pt; }

  /* Print footer: once, at the end of the document */
  .print-footer { display: block !important; margin-top: 18pt; padding-top: 8pt; border-top: 1px solid #000; font-size: 9pt; color: #000; break-inside: avoid; page-break-inside: avoid; }
  .print-footer p { margin: 0 0 2pt; }
}

/* Promotions: the hover message is always shown on paper. */
@media print {
  .promo-hover { position: static !important; opacity: 1 !important; transform: none !important; background: none !important; color: #000 !important; padding: 6pt 0 0 !important; }
  .promo-split { display: block !important; }
  .promo-figure { margin-bottom: 8pt; }
  .promo-cta { display: none !important; }
}

/* FAQ landing: all answers open, topic list hidden */
@media print {
  .faq-index { display: none !important; }
  .faq-layout { display: block !important; }
  .faq-list details > div { display: block !important; padding: 0 0 6pt !important; }
  .faq-list details[hidden] { display: block !important; }
  .faq-js .faq-group { display: block !important; }
}

/* Section landing: no tiles on paper */
@media print { .section-tiles { display: none !important; } }

/* Signature event page: plain on paper */
@media print {
  .event-page .event-detail-hero { background: none !important; color: #000 !important; padding: 0 0 8pt !important; border-bottom: 1px solid #000; }
  .event-page .event-detail-fade, .event-page .event-detail-photo, .event-page .back-link, .event-page .event-detail-hero .actions { display: none !important; }
  .event-page .event-detail-hero > .wrap, .event-page .event-body, .event-page .event-meta { display: block !important; }
  .event-page .event-detail-hero h1, .event-page .event-detail-hero p, .event-page .event-detail-hero .eyebrow, .event-page .event-poster { color: #000 !important; background: none !important; border: 0 !important; }
  .event-page .event-meta { margin: 0 !important; border: 0 !important; }
  .event-page .registration-card { background: none !important; color: #000 !important; border: 1px solid #000; padding: 8pt !important; }
  .event-page .registration-card * { color: #000 !important; }
}
