/*
 * Bull listing: column hiding and the "Print / Save as PDF" layout.
 *
 * Columns the visitor hides get .col-hidden (set by column_toggle_controller),
 * which wins over everything, on screen and on paper. .print-only elements (the
 * printout title, the Notes column, the key) exist only on paper.
 */
.col-hidden {
  display: none !important;
}

.print-only {
  display: none;
}

@media print {
  @page {
    size: landscape;
    margin: 0.4in;
  }

  body {
    background: #fff !important;
  }

  /* Site chrome and on-screen helpers */
  body > header,
  .no-print {
    display: none !important;
  }

  main {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .listing-page {
    padding: 0 !important;
  }

  div.print-only {
    display: block;
  }

  th.print-only,
  td.print-only {
    display: table-cell;
  }

  .print-title {
    margin-bottom: 8pt;
    color: #000;
  }

  .print-title h1 {
    font-size: 15pt;
    font-weight: 700;
  }

  .print-title p {
    font-size: 9pt;
  }

  .listing-scroll {
    overflow: visible !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .listing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }

  .listing-table[data-print-density="compact"] {
    font-size: 7.5pt;
  }

  .listing-table[data-print-density="tight"] {
    font-size: 6.5pt;
  }

  .listing-table thead {
    display: table-header-group; /* repeat headings on every page */
  }

  .listing-table tr {
    break-inside: avoid;
  }

  .listing-table th,
  .listing-table td {
    position: static !important;
    padding: 2.5pt 4pt !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #000 !important;
    font-size: inherit !important;
    line-height: 1.25 !important; /* the screen's text-sm line height wastes paper */
    border-bottom: 0.5pt solid #999;
  }

  .listing-table th {
    font-weight: 700 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: normal !important;
    vertical-align: bottom;
    border-bottom: 1pt solid #000;
  }

  .listing-table a {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: inherit !important;
  }

  /* Sort arrows and ①② markers mean nothing on paper */
  .listing-table th a span span {
    display: none !important;
  }

  .listing-table .notes-col {
    min-width: 1.75in;
  }

  .print-key {
    margin-top: 10pt;
    font-size: 7pt;
    color: #000;
    column-count: 3;
    column-gap: 14pt;
    break-inside: avoid;
  }

  .print-key p {
    break-inside: avoid;
    margin-bottom: 2pt;
  }
}
