﻿
@page {
    size: a4;
    margin: 20mm 10mm;

    @bottom-right {
        content: "Page " counter(page) " of " counter(pages);
        font-family: Roboto, sans-serif;
    }
}

@page:first {
    margin-top: 8mm;
}

@media print {

    body {
        font-size: 12pt;
        background-color: white;
    }

    main#page-wrapper {

        p, li, ol, a {
            font-size: 12pt;
        }
        /* Document-like break logic */
        h2 {
            /*		break-before: page;*/
            break-after: avoid-page;

            &:first-of-type {
                break-before: auto;
            }
        }

        h3, h4 {
            break-after: avoid-page;
            margin-top: 1em;
        }

        aside {
            break-before: auto;
            break-after: avoid-page;
        }
        /* Show the URL after each link */
        ul:not(:is(.breadcrumb ul), :has(.tag-container)) a[href]::after {
            content: "\A(" attr(href) ")"; /* \A inserts a line break */
            white-space: pre; /* or pre-wrap to allow wrapping */

            font-size: 90%; /* Slightly smaller than main text */
            color: #000; /* Ensure it's readable in print */
        }

        ul a {
            text-decoration: none !important;
        }

        background: none;

        .content {
            padding: 0;
            box-shadow: none;
        }


        #accordion {
            .item-heading {
                background: none !important;
                color: #111 !important;
                font-weight: bold;
                padding: 0;
            }

            & .collapse {
                display: block !important;
                padding: 0;
            }

            & i {
                display: none;
            }
        }

        .info-alert-box {
            border: 2px solid green;
            color: var(--ncc-green-dark);
            background-color: transparent !important;
        }

        aside {
            padding: 0.45cm 0.85cm !important;
            border: 1px solid black;

            & > * {
                /*        display: none;*/
            }

            #related-links, ul.inthissection {
                display: block;

                ul {
                    padding-left: 0;
                }

                h3 {
                    margin-top: 0 !important;
                }

                li {
                    list-style: none;
                    border-top: 1px solid #ddd;
                    padding: 1em 0;

                    &:last-of-type {
                        border-bottom: 1px solid #ddd;
                    }

                    a {
                        background-color: transparent;
                    }
                }
            }
        }
    }

    /* Forcing breaks where needed */
    .break {
        page-break-after: always;
        break-after: always;
    }

    #page_body {
        

        .breadcrumb {
            background-color: transparent !important;
            border-bottom: 1px solid;
            margin-bottom: 2cm;

            .container {
                width: 100%;
                max-width: 100%;
            }

            ul li a {
                color: black !important;
            }
        }

        
    }

    .global-header, .navbar {
        display: block;
        background-color: transparent!important;
        border-bottom: 1px solid;

        a.site-name {
        color: #222;
        text-align: left;
/*        border: 1px solid red;*/
        flex: 100% 1 0!important;
        }

        form, #navbarNav, .nav-search-container {
            display: none!important;
            background-color: white!important;
        }

        & img {
            filter: invert();
        }

        .container {
            width: 100%;
            max-width: 100%;
            padding: auto 0!important;
        }
    }

    footer, #additional, .more-button-cta, .action-button-set, .article-images, #cookie-message, #scrollUp, #scrollToTop, button, .btn, .image-grid, .article-resources-title, section.alt    /*	, aside */ {
        display: none !important;
    }

    .sticky-top {
    position: relative!important;
    top: 0!important;
    }


    .content > .row > div, main .container {
        width: 100% !important;
        max-width: none;
        margin: 0;
        background-color: white !important;
    }

    main .row > div {
    padding: 0!important;
    width: 100%;
    }
}
