/**
 * Print styles (child theme).
 *
 * Supplements the parent theme's css/print-css.css, which predates the alert
 * bar and Elementor. Loaded after it so these rules win.
 *
 * @author Fudo
 * @date   2026-09-17
 */
@media print {

    /* The parent sheet locks html/body to viewport height with overflow clip,
       which pushes all content past the first printed page. */
    html,
    body {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
    }

    /* The parent sheet locks html/body to viewport height with overflow clip,
       which pushes all content past the first printed page. */
    html,
    body {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
    }

    /* Chrome/Safari strip background images by default, which blanks out
       Elementor galleries since each item is a background-image on an <a>. */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide site furniture that should never print. */
    .idaho-announcement-bar,
    .announcement-close,
    #wpadminbar,
    .mega-menu-wrap,
    .fontsizer-wrap,
    .row-footer-links,
    .top-navigation,
    .mega-menu-wrap,
    .mega-sub-menu,
    #mega-menu-wrap-primary,
    .modal,
    .modal-body,
    .modal-backdrop,
    .navbar-toggler,
    .gt_switcher_wrapper,
    .skip-link,
    .breadcrumb,
    .breadcrumbs,
    #back-to-top {
        display: none !important;
    }

    /* Elementor gallery: items are background-image anchors with no intrinsic
       height, so give them a printable size and keep them off page breaks. */
    .elementor-widget-gallery .e-gallery-item,
    .elementor-widget-gallery .elementor-gallery-item {
        display: block !important;
        width: 48% !important;
        height: 2.75in !important;
        float: left !important;
        margin: 0 1% 0.25in !important;
        background-size: cover !important;
        background-position: center !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .elementor-widget-gallery .elementor-gallery__container,
    .elementor-widget-gallery .e-gallery-container {
        display: block !important;
        height: auto !important;
        position: static !important;
    }

    .elementor-widget-gallery .e-gallery-item * {
        position: static !important;
    }

    /* Gallery overlays/captions add nothing on paper. */
    .elementor-gallery-item__overlay {
        display: none !important;
    }

    /* Elementor lazy-load and animation states can leave content invisible. */
    .elementor-invisible,
    .elementor-animated-content {
        visibility: visible !important;
        opacity: 1 !important;
        animation: none !important;
    }

    /* Start the page at the heading, not with leading whitespace. The parent
       sheet sets min-height/height 100% on these, which forces a blank first
       page before any content renders. */
    .site-content,
    .entry-content,
    .site-main,
    #main,
    .content-wrapper,
    #site-body {
        padding-top: 0 !important;
        margin-top: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }

    /* The site header reserves vertical space even when hidden, which pushes
       all content onto page two. */
    #masthead,
    .site-header,
    .hfeed.site#page > header,
    .bg-light {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
    }

    .container,
    .site-content .row div[class*="col-"],
    .sidebars {
        height: auto !important;
        min-height: 0 !important;
    }

    /* The parent sheet appends every href in parentheses, which is noise for
       image links and in-page anchors. */
    .site-content a[href^="#"]::after,
    .elementor-widget-gallery a::after {
        content: "" !important;
    }
}
