/* ==========================================================
   Print Stylesheet
   Upper Blue Mountains Bushwalking Club
   ========================================================== */

/*
   Print-only document elements remain hidden on screen.
*/

.print-document-header,
.print-document-footer {
    display: none;
}

@media print {

    /* ------------------------------------------------------
       Page
       ------------------------------------------------------ */

    @page {
        margin: 20mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font: 11pt/1.45 Georgia, "Times New Roman", serif;
    }

    /* ------------------------------------------------------
       Hide website elements
       ------------------------------------------------------ */

    header:not(.print-document-header),
    nav,
    aside,
    footer:not(.print-document-footer),
    .navbar,
    .breadcrumb,
    .sidebar,
    .skip-link,
    .cookie-banner,
    .modal,
    .btn,
    .btn-group,
    .pagination,
    .alert,
    .social-links,
    #backToTop,
    .print-link {
        display: none !important;
    }

    /* ------------------------------------------------------
       Show print-only document elements
       ------------------------------------------------------ */

    .print-document-header,
    .print-document-footer {
        display: block !important;
    }

    /* ------------------------------------------------------
       Main content
       ------------------------------------------------------ */

    main,
    article,
    .container,
    .container-fluid,
    .row-fluid {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove common screen presentation */

    article,
    .well,
    .well-raised {
        background: none !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    /* ------------------------------------------------------
       Print-only document header
       ------------------------------------------------------ */

    .print-document-header {
        border-bottom: 2px solid #000;
        margin: 0 0 1.2em;
        padding: 0 0 .8em;
    }

    .print-document-header .club-name {
        font-size: 18pt;
        font-weight: bold;
        line-height: 1.2;
        margin: 0;
    }

    .print-document-header .document-title {
        font-size: 22pt;
        font-weight: bold;
        line-height: 1.2;
        margin: .4em 0;
    }

    .print-document-header .document-meta {
        font-size: 10pt;
        margin-top: .8em;
    }

    .print-document-header .document-meta p {
        margin: .15em 0;
    }

    /* ------------------------------------------------------
       Print-only document footer
       ------------------------------------------------------ */

    .print-document-footer {
        border-top: 1px solid #777;
        font-size: 9pt;
        margin-top: 2em;
        padding-top: .6em;
    }

    .print-document-footer p {
        margin: 0;
    }

    /* ------------------------------------------------------
       Headings
       ------------------------------------------------------ */

    h1 {
        font-size: 22pt;
    }

    h2 {
        font-size: 18pt;
        margin-top: 1.4em;
    }

    h3,
    h4,
    h5,
    h6,
    .policy-heading {
        font-size: 15pt;
        margin-top: 1.2em;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        break-after: avoid;
        page-break-after: avoid;
    }

    /* ------------------------------------------------------
       Paragraphs and lists
       ------------------------------------------------------ */

    p {
        margin-bottom: .8em;
        orphans: 3;
        widows: 3;
    }

    ol,
    ul {
        margin-left: 1.4em;
    }

    li {
        margin-bottom: .35em;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* ------------------------------------------------------
       Tables
       ------------------------------------------------------ */

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        border: 1px solid #666;
        padding: 4pt;
    }

    thead {
        display: table-header-group;
    }

    tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* ------------------------------------------------------
       Images
       ------------------------------------------------------ */

    img {
        max-width: 100%;
        height: auto;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* ------------------------------------------------------
       Links
       ------------------------------------------------------ */

    a,
    a:visited {
        color: #000;
        text-decoration: none;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        overflow-wrap: anywhere;
    }

    a[href^="mailto:"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        overflow-wrap: anywhere;
    }
}