/*
 * Print.
 *
 * A shop's legal pages get printed and saved as PDF more than anything else on
 * the site: a customer exercising a right of withdrawal prints the Widerrufs-
 * belehrung and the model form. Without this, that print carries the espresso
 * header, the nav, both footers and six 250px social photographs, and the body
 * text comes out cream-on-cream where the printer drops backgrounds.
 *
 * @package COF
 */

@page {
  margin: 18mm 16mm;
}

body {
  background: #fff !important;
  color: #000 !important;
  font-size: 11pt;
  line-height: 1.5;
}

/* Chrome and Safari drop backgrounds by default; anything that relied on a dark
   band for contrast has to be forced back to black on white. */
.cof-on-dark,
.cof-section--espresso,
.cof-header,
.cof-slimbar {
  background: #fff !important;
  color: #000 !important;
}

/* Site furniture. None of it means anything on paper, and the social grid alone
   is most of a second page. */
.cof-header,
.cof-footer,
.cof-slimbar,
.cof-social,
.cof-nav,
.cof-play,
.cof-videofig__video,
.cof-form,
.cof-ctaband,
.cof-skip-link,
video,
iframe { display: none !important; }

/* Sections are spaced for a 1440px screen. On paper that is whitespace. */
.cof-section { padding-block: 0 !important; }
.cof-container { max-width: none !important; padding-inline: 0 !important; }

.cof-prose { max-width: none; color: #000; }
.cof-prose :is(h1, h2, h3, h4, h5, h6) { color: #000; }
.cof-prose th { background: #f2f2f2 !important; }
.cof-prose :is(th, td) { border-color: #999 !important; }
.cof-prose .wp-block-table thead,
.cof-prose thead { border-bottom: 1px solid #999 !important; }
.cof-prose .cof-formbox {
  background: #fff !important;
  border: 1pt solid #000 !important;
}

/* A clause heading stranded at the foot of a page, or a two-line orphan, makes a
   legal document harder to cite. */
.cof-prose :is(h1, h2, h3, h4, h5, h6) { break-after: avoid; page-break-after: avoid; }
.cof-prose :is(p, li, tr, address) { break-inside: avoid; page-break-inside: avoid; }
.cof-prose { orphans: 3; widows: 3; }

/* A printed link that says "here" is useless; print the destination. Skipped for
   in-page anchors and for mailto/tel, where the text already is the address. */
.cof-prose a[href^="http"]::after {
  content: ' (' attr(href) ')';
  font-size: 9pt;
  word-break: break-all;
}

/* The pending-content flag must survive to paper. Someone printing a legal page
   that is not written yet needs to know that, more than anyone. */
.cof-prose__pending,
.cof-prose__pending strong {
  border-color: #000 !important;
  color: #000 !important;
}
.cof-prose__pending { border: 1pt dashed #000 !important; }
