/**
 * Print (theme).
 *
 * Loaded by libraries.yml
 * Prefer design tokens / custom properties over raw values.
 */
 
/*
@import "../utility/_media-queries.pcss.css";
@import "../utility/_mixins.pcss.css";
*/

/* Intention: provide a concise, well-designed print version of webpages */
/* https://www.smashingmagazine.com/2013/03/tips-and-tricks-for-print-style-sheets/ */
/* https://www.smashingmagazine.com/2015/01/designing-for-print-with-css/ */
/* https://www.smashingmagazine.com/2018/05/print-stylesheets-in-2018/ */
@media print {
  @page {
    margin: 1cm 0.5cm; /* Need more top/bottom margin for page data */
  }

  /* Debugging Only */
  /* div {
    border: 1px solid black;
  } */

  body,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  a,
  td,
  th,
  div {
    background: #fff !important; /* Explicit bg color should always be white */
    color: #000 !important; /* Explicit text color should always be black */
  }

  body,
  article {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .abovecontent {
    position: relative;
  }

    /* Branding */
    .abovecontent::before {
      content: url("/assets/images/fdic-logo-dark.svg");
      position: relative;
      top: 0;
      left: 0;
      display: block;
      height: 2.5rem;
      width: 5rem;
      /* Debugging Only */
      /* border: 1px solid black; */
    }

  h1 {
    margin: 0;
    padding: 0;
    background: none;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid; /* avoid breaks directly after a heading */
    color: #000;
    widows: 2;
    orphans: 3;
  }

    h1 a::after, h2 a::after, h3 a::after, h4 a::after, h5 a::after, h6 a::after {
      font-size: 9pt;
    }

  .content-subheading,
  .highlight,
  .content {
    margin: 0;
    padding: 0;
  }

  /* Hide unnecessary elements */
  #block-fdic-theme-governmentbanner,
  header,
  .usa-header,
  nav,
  aside,
  footer,
  embed,
  object,
  video,
  audio,
  iframe,
  .media--type-remote-video,
  #block-fdic-theme-sharethis,
  #QSISlider,
  .QSISlider,
  .QSISlider *,
  #block-fdic-theme-news-node-inactive-block,
  #block-fdic-theme-breadcrumbs,
  .extlink,
  .usa-alert--error,
  .views-exposed-form,
  .usa-pagination,
  .left,
  #block-fdic-theme-primary-local-tasks,
  ed11y-element-panel,
  .contextual,
  .fdic-share,
  .video-icon,
  .js-form-item,
  .views-view-navigation,
  .more-link,
  .more-link a,
  .glider-track {
    display: none;
  }

  .bg-meet-our-team {
    max-height: auto;
    margin-right: 0;
    margin-left: 0;
  }

  .highlight {
    display: inline-block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: #000;
    letter-spacing: normal;
    text-align: center;
  }

  /* Speeches Only */
    .news-type--speeches .news-heading-wrapper {
      margin: 50% auto 0;
      max-width: 60%;
      text-align: center;
    }

    .news-type--speeches .content,
    .news-type--speeches article.node--news,
    .news-type--speeches .field--name-body {
      page-break-before: always;
    }

    .news-type--speeches .content-subtitle {
      margin-bottom: 2rem;
      font-family: "Times New Roman";
    }

    .news-type--speeches h1,
    .news-type--speeches h2,
    .news-type--speeches h3,
    .news-type--speeches h4,
    .news-type--speeches h5,
    .news-type--speeches h6,
    .news-type--speeches p,
    .news-type--speeches .news-byline,
    .news-type--speeches ul,
    .news-type--speeches ol,
    .news-type--speeches .block-fdic-node-last-updated-block p {
      font-family: "Times New Roman";
    }

    .news-type--speeches table.footnotes tr > td {
      padding: 0;
      font-family: "Times New Roman";
    }

    .news-type--speeches .usa-icon {
      display: none;
    }

  /* Article nodes only */
  .node--article {
    /* .paragraph--type--text {
      column-count: 3;
    } */
  }

    .node--article .paragraph--type--from-library {
      display: none;
    }

  .content-subtitle {
    color: #000;
    font-size: 12pt;
  }

  p {
    font-size: 12pt;
    widows: 2;
    orphans: 3;
  }

  table:not(.footnotes),
  figure {
    page-break-inside: avoid; /* avoid breaking tables and figures */
  }

  .paragraph--type--card {
    -moz-column-break-inside: avoid;
         break-inside: avoid;
  }

  .paragraph--type--main-body-section {
    min-height: 0;
  }

    .paragraph--type--main-body-section .field--name-field-mbs-content {
      padding: 0;
    }

  .bg-blue {
    padding-bottom: 0;
  }

  /* Fixes to render issues stemming from printing full URLs from links within a td */
    table:not(.footnotes) th,
    table:not(.footnotes) td {
      font-size: 10pt;
    }

      table:not(.footnotes) th a, table:not(.footnotes) td a {
        text-decoration: none;
      }

      table:not(.footnotes) th a.footnote__citation, table:not(.footnotes) td a.footnote__citation {
        margin-left: 1pt;
      }

    table:not(.footnotes) tr a::after {
      /* display: block; */
      font-size: 8pt;
      word-break: break-all;
    }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

    a.font-header-arrow,
    a.font-header-arrow::after {
      font-size: 12pt !important;
      font-weight: normal !important;
      letter-spacing: normal !important;
      text-decoration: underline !important;
    }

  /* NOT printing href paths from: queries, fn numbers */
  a:not([href*='?combine']):not(.footnote__reference, .footnote__anchor, .footnote__citation, .footnotes__item-backlink)::after {
    content: ' (' attr(href) ') '; /* Default space before/after */
    overflow-wrap: anywhere;
  }

  a.remove-trailing-space:not([href*='?combine']):not(.footnote__reference, .footnote__anchor, .footnote__citation, .footnotes__item-backlink)::after {
    content: ' (' attr(href) ')'; /* Remove space after */
  }

  /* Print absolute URL before hash anchors, exclude fn numbers */
  a[href*='#']:not(.footnote__reference, .footnote__anchor, .footnote__citation, .footnotes__item-backlink)::after {
    content: ' (' attr(data-full-url) ') '; /* Default space before/after */
    overflow-wrap: anywhere;
  }

  a[href*='#'].remove-trailing-space:not(.footnote__reference, .footnote__anchor, .footnote__citation, .footnotes__item-backlink)::after {
    content: ' (' attr(data-full-url) ')'; /* Remove space after */
    overflow-wrap: anywhere;
  }

  /* Hides empty links or empty in-page anchor links */
  a[href=''],
  a[href='#'],
  a:not([href]) {
    display: none;
  }

  /* Adds domain ahead of relative links */
  a[href^='/']::after {
    content: ' (https://www.fdic.gov' attr(href) ') ' !important; /* Default space before/after */
    overflow-wrap: anywhere;
  }

  a[href^='/'].remove-trailing-space::after {
    content: ' (https://www.fdic.gov' attr(href) ')' !important; /* Remove space after */
  }

  #block-fdic-theme-news-last-updated-block p {
    margin-bottom: 0;
    font-size: 9pt;
  }

  /* Footnotes */
  /* Bluebook standards for pub titles in speech footnotes */
  /* Text of title must be italics when viewed online /*
  /* Small caps in print. */
  ul.footnotes,
  table.footnotes {
    margin: 0 0 1rem;
    font-size: 9pt;

    /* Targets .pub-title and .pub-author style added by editor */
  }
    ul.footnotes .pub-title,
    ul.footnotes .pub-author,
    table.footnotes .pub-title,
    table.footnotes .pub-author {
      font-feature-settings: "smcp";
      font-variant: small-caps;
      font-style: normal;
    }

  /* Table footnotes only */
    /* Stubborn table footnote styles */
    table.footnotes tr td {
      padding: 0 !important;
      font-size: 9pt;
      text-align: left !important;
    }

      table.footnotes tr td:nth-child(1) {
        width: auto !important;
        padding-right: 0.25rem !important;
      }

  /* Non-table footnotes only */
  ul.footnotes {
    /* Footnote area */
  }
    ul.footnotes .footnote__anchor,
    ul.footnotes .footnotes__item-backlink {
      top: 0;
      width: auto;
      margin-top: -0.25rem;
      margin-right: 0.25rem;
    }

  .footnote__reference,
  .footnote__citation,
  .footnote__anchor,
  .footnotes__item-backlink {
    margin: 0;
    padding: 0;
    font-size: 75%;
    font-weight: normal;
    line-height: none;
    text-decoration: none;
  }

  /* Footnote in text */
  .footnote__reference,
  .footnote__citation {
    margin-top: 0;
    vertical-align: super;
  }

  .footnote__citation {
    margin-left: -4pt;
  }

  /* Footnote area */
  .footnote__anchor,
  .footnotes__item-backlink {
    position: relative;
    top: -0.25rem;
    width: auto;
  }
    .footnotes__item-text p {
      margin: 0;
    }

  @page {
    @footnote {
      padding-top: 0.5em;
      border-top: 1pt solid black;
    }
  }
}
