/* ==========================================================================
   Print
   ========================================================================== */

@media print {

    @page {
        margin: 15mm;
    }

    html,
    body {
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
        line-height: 1.45;
    }

    /*
     * Remove screen-only interface elements.
     */
    .utility-top-bar,
    .menu-container,
    .mobile-menu-button,
    .mobile-nav,
    .village-alerts-bar,
    .frontpage-slideshow,
    .headergraphic,
    .header-searchbar,
    .search-header-form,
    .search-pagination,
    .backtotop,
    .socialmediaicons,
    .onetap-container-toggle,
    nav.onetap-accessibility,
    #wpadminbar,
    .wpforms-container,
    footer {
        display: none !important;
    }

    /*
     * Keep the site's branding/header compact,
     * but remove navigation from it.
     */
    header,
    .top-bar,
    .top-bar-inner,
    .branding-container {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    .branding-container img {
        max-height: 55px !important;
        width: auto !important;
    }

    /*
     * Main content should use the printable page.
     */
    .content,
    section.content,
    main,
    article,
    .wp-site-blocks {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    /*
     * Undo full-width viewport tricks that don't translate
     * well to a printed page.
     */
    .alignwide,
    .alignfull,
    .is-layout-constrained.alignfull {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: auto !important;
    }

    /*
     * Print-friendly typography.
     */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    li,
    td,
    th {
        color: #000000 !important;
    }

    h1,
    h2,
    h3,
    h4 {
        break-after: avoid;
        page-break-after: avoid;
    }

    /*
     * Don't split useful content unnecessarily.
     */
    img,
    figure,
    table,
    blockquote,
    .wp-block-file,
    .bp-documents li,
    .search-card,
    .blog-card,
    .mcc-single-event__detail {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /*
     * Tables should behave like tables when printed,
     * even if the responsive/mobile CSS has converted
     * them into stacked cards.
     */
    .wp-block-table {
        display: table !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .wp-block-table thead {
        display: table-header-group !important;
    }

    .wp-block-table tbody {
        display: table-row-group !important;
    }

    .wp-block-table tr {
        display: table-row !important;
        border: 0 !important;
    }

    .wp-block-table th,
    .wp-block-table td {
        display: table-cell !important;
        padding: 6px 8px !important;
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #777777 !important;
    }

    .wp-block-table td::before {
        display: none !important;
        content: none !important;
    }

    /*
     * Images should never overflow the printed page.
     */
    img,
    svg {
        max-width: 100% !important;
        height: auto !important;
    }

    /*
     * Remove decorative effects.
     */
    *,
    *::before,
    *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /*
     * Links remain recognisable without requiring colour.
     */
    a,
    a:visited {
        color: #000000 !important;
        text-decoration: underline;
    }

    /*
     * Embedded PDF/file viewers are not useful on paper.
     * Keep the actual file title/link.
     */
    .wp-block-file object,
    .wp-block-file iframe,
    .wp-block-file embed {
        display: none !important;
    }

    .wp-block-file .wp-block-file__button {
        display: none !important;
    }
}