/*
 * Print stylesheet. Media-scoped via wp_enqueue_style in inc/enqueues.php.
 *
 * Goals:
 *   - Strip navigation / footer / sharing chrome.
 *   - Black text on white background for ink savings + readability.
 *   - Show hrefs after links so printed copies are self-describing.
 *   - Keep article headings on the same page as their first paragraph.
 */

@page {
  margin: 2cm;
}

body {
  background: #ffffff !important;
  color: #000000 !important;
  font-size: 12pt;
  line-height: 1.5;
}

/* Hide chrome */
header,
footer,
nav,
.sss-skip-link,
.sss-brand-switcher,
.elementor-location-header,
.elementor-location-footer,
.wp-block-navigation,
.sss-nav,
aside,
.site-sidebar,
.sharedaddy,
.jp-relatedposts {
  display: none !important;
}

article,
main,
.sss-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Show link hrefs */
a[href^="http"]::after,
a[href^="mailto:"]::after {
  content: " (" attr(href) ")";
  font-size: 0.85em;
  word-break: break-all;
}

/* Avoid awkward breaks */
h1, h2, h3, h4, h5, h6 {
  page-break-after: avoid;
  page-break-inside: avoid;
}
p, blockquote, li {
  orphans: 3;
  widows: 3;
}
img, figure, table {
  page-break-inside: avoid;
  max-width: 100% !important;
}
