/* print stylesheet */ 

@media print and (color) {
  * {
    -webkit-print-color-adjust: exact !important;
    color: inherit !important;
    print-color-adjust: exact !important;
  }
}

@media print {
    @page {
        margin: .5in;
    }

    /* hide sitewide elements that are not necessary for printing */
    
    #top-header,
    header, 
    footer,
    #search-2,
    .block--cta-donate,
    .block--cta-signup,
    #a2a_share_save_widget-2,
    .widget_nav_menu,
    .print-link { 
        display: none !important;
    }


    /* //DEFAULT STYLING */
    html,
    body {
        padding-top: 0 !important;
        top: 0 !important;
        margin-top: 0 !important;
        height: auto;
    }

    /* //prevent headings from being printed at the bottom of the page */
    h1, h2, h3, h4, h5, h6, p, ul {
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    html, body, h1, h2, h3, ol, ul, div, article { 
        border: 0; 
        padding: 0;
        width: auto;
        height: auto;
        float: none; 
        position: static; 
        overflow: visible;
    }


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

    html {
        font-size: 100%;
    }

    /* //include the url after link elements */
    a:after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
        font-style: italic;
        display: block;
        word-break: break-all;
    }

    .query-field-featured_image a:after,
    .post-meta a:after {
        content: "";
        display: none;
    }

    .post-meta a {
       border: 0; 
    }

    .video:after {
        content: "Video has been removed for printing";
        font-size: 80%;
        font-style: italic;
    }

    p {
      orphans: 2;
      widows: 2;
    }

    h1 {
        font-size: 26pt !important;
    }
    h2 {
        font-size: 20pt !important;
    }
    h3 {
        font-size: 18pt !important;
    }

    h4, h5, h6 {
        font-size: 14pt !important;
    }

    p, ul, ol, li, blockquote, table, th, tr, td {
        font-size: 12pt !important;
    }

    /* //prevent images from bleeding over the edge of the printed page: */
    figure,
    img,
    iframe {
      max-width: 50% !important;
    }
    
    figure img {
      max-width: 100% !important;
    }

    .wp-caption,
    .wp-caption p {
        font-size: 10pt !important;
        color: #666;
        text-align: left !important;
    }


    /* //prevent large elements from being split across multiple pages. */
    ul, img, video, table, figure, .media__image, .table, .c-page-info, blockquote {
        page-break-inside: avoid;
        break-inside: avoid;
      }

    p a {
        word-wrap: break-word;
        border: none;
    }

    table,
    table tr td,
    table tr th {
        page-break-inside: avoid;
    }

    img {
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
        object-fit: unset;
        height: auto !important;
        width: 100% !important;
    }

    figure {
        max-width: 100% !important;
        width: 100% !important;
    }
}