/* ============================================
   THE ELTON FILES — print styles
   ============================================ */

@page {
  size: A4;
  margin: 15mm;
}

@media print {

  html, body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
    margin: 0;
    padding: 0;
  }

  .no-print,
  .top-bar {
    display: none !important;
  }

  .sheet {
    background: white !important;
    background-image: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: auto !important;
    page-break-after: always;
    break-after: page;
  }

  .sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  figure,
  .fullbleed-figure,
  .report-image,
  .grid-cell,
  .margin-layout,
  .photocopy-frame,
  .subject-overview {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Stamps */
  .stamp {
    color: #800 !important;
    border-color: #800 !important;
    opacity: 1;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .classification {
    color: #800 !important;
    border-color: #800 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Annotation ink */
  .annotation {
    color: #800 !important;
    border-color: #800 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Redaction bars always black */
  .redacted {
    background: black !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Barcode */
  .barcode-bars {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
    filter: grayscale(1) contrast(1.15);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .tpl-fullbleed .fullbleed-figure {
    flex: none;
  }
  .tpl-fullbleed .fullbleed-figure img {
    flex: none;
    max-height: 220mm;
    width: 100%;
    object-fit: contain;
  }

  .tpl-grid .grid-images { flex: none; }
  .tpl-grid .grid-cell   { min-height: 0; }
  .tpl-grid .grid-cell img {
    flex: none;
    max-height: 180mm;
    width: 100%;
    object-fit: contain;
  }

  .tpl-margin .margin-layout { flex: none; }
  .tpl-margin .margin-image img {
    flex: none;
    max-height: 190mm;
    width: 100%;
    object-fit: contain;
  }

  .tpl-photocopy .photocopy-frame img {
    filter: grayscale(1) contrast(1.6) brightness(0.85) !important;
    max-height: 200mm;
  }

  /* Typography */
  a {
    color: black !important;
    text-decoration: none !important;
  }

  .volume-table a {
    color: black !important;
  }

  .status-active { color: black !important; }

  .report-body p,
  .photocopy-notes p {
    orphans: 3;
    widows: 3;
  }
}
