/**
 * Rates Print.
 *
 * Theme-agnostic defaults. Sites can override with their own print styles;
 * rules here are scoped low-specificity where possible.
 */

/* ==========================================================================
   Screen
   ========================================================================== */

.rp-chrome {
  display: none;
}

.rp-button-wrap {
  margin-top: 1rem;
}

.rp-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.875em;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.rp-button:hover {
  text-decoration-thickness: 2px;
}

.rp-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.rp-icon {
  flex-shrink: 0;
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  @page {
    margin: 0.5in;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  body {
    font-size: 10pt;
    line-height: 1.35;
  }

  /* Everything outside the rate sections (marked by print.js). Out-specifies the section/chrome display rules below. */
  html body .rp-hide,
  #wpadminbar {
    display: none !important;
  }

  /* Flatten the site layout around the rate sections */
  .rp-path {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    position: static !important;
    transform: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }

  /* ------------------------------------------------------------------------
     Header / footer chrome
     ------------------------------------------------------------------------ */

  .rp-chrome {
    display: block !important;
  }

  .rp-header {
    margin: 0 0 14pt;
    padding: 0 0 8pt;
    border-bottom: 1.5pt solid #000;
  }

  .rp-header__institution {
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .rp-header__title {
    margin: 2pt 0 4pt;
    font-size: 16pt;
    font-weight: 700;
    line-height: 1.2;
  }

  .rp-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18pt;
    font-size: 10pt;
  }

  .rp-header__effective {
    font-weight: 700;
  }

  .rp-header__url {
    margin-top: 2pt;
    font-size: 8pt;
    color: #444;
    word-break: break-all;
  }

  .rp-table-effective,
  .rp-section .rp-table-effective {
    margin: 4pt 0 0 !important;
    font-weight: 700 !important;
  }

  /* The header carries the date when printing a single table */
  .rp-single .rp-table-effective {
    display: none !important;
  }

  .rp-footer {
    margin-top: 16pt;
    padding-top: 8pt;
    border-top: 1pt solid #000;
    font-size: 8.5pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .rp-footer p {
    margin: 0 0 4pt;
  }

  /* ------------------------------------------------------------------------
     Tables
     ------------------------------------------------------------------------ */

  table.tablepress {
    width: 100% !important;
    margin: 0 0 6pt !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    font-size: 9.5pt !important;
  }

  table.tablepress thead {
    display: table-header-group;
  }

  table.tablepress tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  table.tablepress th,
  table.tablepress td {
    min-width: 0 !important;
    padding: 3pt 6pt !important;
    border: 0.75pt solid #777 !important;
    background: none !important;
    color: #000 !important;
    font-size: 9.5pt !important;
    line-height: 1.3 !important;
    border-radius: 0 !important;
  }

  table.tablepress th {
    background: #e6e6e6 !important;
    font-weight: 700 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ------------------------------------------------------------------------
     Rate sections: table + heading + footnotes
     ------------------------------------------------------------------------ */

  .rp-section {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 0 16pt !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Also undoes JS scroll wrappers (e.g. SimpleBar) that clip or reserve fixed heights */
  .rp-section *:not(th, td, table, thead, tbody, tfoot, tr, sup, sub) {
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    gap: 6pt !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #000 !important;
  }

  .rp-section :is(img, picture, figure, video, iframe, form, button, .wp-block-buttons, .rp-button-wrap, .simplebar-placeholder, .simplebar-track, .simplebar-height-auto-observer-wrapper) {
    display: none !important;
  }

  .rp-section :is(h1, h2, h3, h4, h5, h6, caption) {
    margin: 0 0 6pt !important;
    font-size: 12pt !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: left !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  .rp-section p {
    margin: 0 0 4pt !important;
  }

  .rp-section,
  .rp-section *:not(h1, h2, h3, h4, h5, h6, caption, th, td) {
    font-size: 8.5pt !important;
    line-height: 1.35 !important;
  }

  .tablepress-table-description {
    display: block;
    font-size: 8.5pt;
  }
}
