/* ==========================================================================
   VIPR Guide Design -- print
   --------------------------------------------------------------------------
   Labs print designs and tape them into notebooks, so this is a real output
   path, not an afterthought.

   The important decision: on paper the sequence regions are distinguished by
   BORDERS AND WEIGHT, not by background fills. A greyscale lab printer renders
   the lime NN highlight and the amber tail as near-identical mid-greys, which
   would make a printed design ambiguous at exactly the point where ambiguity is
   expensive. Colour printers still get the fills via -webkit-print-color-adjust
   on the NN run only.
   ========================================================================== */

@media print {
  @page { margin: 12mm; }

  html, body { background: #FFFFFF !important; }

  /* Chrome and anything interactive is not part of the record. */
  [data-shell="sidebar"], .sidebar-wrapper,
  [data-shell="navbar"], .navbar-custom,
  .footer-links, .copy-btn-group, .dropzone,
  .no-print, .nav-tabs-vipr, .toast-container,
  button, .btn-custom { display: none !important; }

  .main-wrapper { margin-left: 0 !important; padding: 0 !important; }

  .card, .table-card-custom, .advisory-panel {
    box-shadow: none !important;
    border: 1px solid #BBBBBB !important;
    border-radius: 4px !important;
    padding: 0.6rem !important;
    break-inside: avoid;
  }

  .page-title { font-size: 1.25rem !important; }

  /* Sequences: wrap rather than scroll, so nothing is cut off the page. */
  .seq-block {
    background: #FFFFFF !important;
    border: 1px solid #999999 !important;
    font-size: 10pt !important;
    line-height: 1.6 !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow: visible !important;
    break-inside: avoid;
  }
  /* An aligned track cannot wrap without losing its meaning, so shrink it. */
  .seq-align { font-size: 8pt !important; white-space: pre !important; overflow: visible !important; }

  /* Distinguish by weight and underline, which survive greyscale. */
  .seq-y, .seq-zz, .seq-tail, .seq-skip, .seq-mm {
    background: transparent !important;
    color: #000000 !important;
  }
  .seq-tail { font-style: italic !important; }
  .seq-skip { color: #777777 !important; text-decoration: underline dotted #777777 !important; }
  .seq-mm   { font-weight: 700 !important; text-decoration: underline wavy #000000 !important; }

  /* The NN run is the one thing worth keeping a fill for on a colour printer;
     it also gets a box so greyscale still shows it. */
  .seq-nn {
    font-weight: 700 !important;
    color: #000000 !important;
    background: #E8FBB0 !important;
    outline: 1px solid #000000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Keep the published/heuristic distinction legible in mono. */
  .chip { border: 1px solid #000000 !important; background: transparent !important; color: #000000 !important; }
  .chip-heuristic::before { content: "~ "; }

  .table-custom { font-size: 9pt !important; }
  .table-custom th { background: #EEEEEE !important; }
  .table-custom.table-seq td.mono { font-size: 8pt !important; }

  /* Expand everything collapsed, so a printed page is complete. */
  .collapse:not(.show) { display: block !important; height: auto !important; }
  .accordion-button { background: transparent !important; }

  /* Show link targets for the citations. */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555555; }
}
