
/* 
The print-site banner
*/
#print-site-banner {
    border:2px; 
    border-style:solid; 
    border-color:#000000; 
    padding: 0em 1em 0em 1em; 
    margin-bottom: 2em;
}
#print-site-banner h3 {
    margin-top: 1rem;
}

/* Enumerate figures */
.print-site-enumerate-figures figcaption:before {
    counter-increment: figurecounter;
    content: "Figure " counter(figurecounter) ": ";
}


/* Print URLS: 
Change a 'link' to 'link (target)' */
div.print-site-add-full-url section.print-page a[href^="http"]::after{
    content: " (" attr(href) ") ";
}


/* Do some nice animations when clicking on a ToC link */
#print-site-page h1:target, 
#print-site-page h2:target, 
#print-site-page h3:target, 
#print-site-page h4:target, 
#print-site-page h5:target, 
#print-site-page h6:target {
    animation: highlight 1.5s ease;
}
#print-site-page .print-page:target h1 {
    animation: highlight 1.5s ease;
}
@keyframes highlight {
    from { color: orange; }
    to { color: none; }
}


/* 
Print site table of contents styling
 */
/* Don't display the table of contents in HTML version */
#print-page-toc { display: none }


.print-page-toc-nav {
    padding-bottom: 2em;
}

#print-page-toc ul {
    list-style-position: inside;
    list-style-type: none;
}

#print-site-page ul {
    margin-left: 0em;
}

/* Be able to not print certain elements */
#print-site-page .print-site-plugin-ignore { display: none;}

@media print {    

    /* included bookmarks on h1 and h2
    Doesn't work, but included In case Chrome gets support 
    for these experimental CSS features that define PDF bookmarks */
    /* #print-site-page h1 {
        bookmark-level: 1;
        bookmark-label: content(); 
        -ah-bookmark-level: 1;
        -ro-pdf-bookmark-level: 1;
    }
    #print-site-page h2 {
        bookmark-level: 2;
        bookmark-label: content(); 
        -ah-bookmark-level: 2;
        -ro-pdf-bookmark-level: 2;
    } */

    /* Be able to not print certain elements */
    .print-site-plugin-ignore { display: none; }

    /* Remove print site banner */
    #print-site-banner { display: none; }

    /* display the table of contents in print version */
    #print-page-toc { display: block }

    /* PDF page breaks on each MkDocs page, except the first one */
    #print-site-page section.print-page {
        page-break-before: always;
    }
    #print-site-page > section.print-page:first-of-type {
        page-break-before: avoid;
    }

    /* PDF page breaks - separate title page for each section */
    #print-site-page section.print-page.md-section > h1 {
        align-content: center;
        text-align: center;
        vertical-align: middle;
        padding: 5rem 0rem;
        font-size: 2.5em;
    }

    #print-site-page p, 
    #print-site-page pre, 
    #print-site-page blockquote, 
    #print-site-page .tabbed-set {
        page-break-inside: avoid;
    }

    /* Avoid a page break immediately after a heading */
    /* Credits https://stackoverflow.com/a/9238898/5525118 */
    #print-site-page h1 {
        page-break-inside: avoid;
    }
    #print-site-page h1::after {
        content: "";
        /* display: block; */
        height: 100px;
        margin-bottom: -100px;
    }

    #print-site-page footer { display : none; }
    
    #print-site-cover-page {
        display: block;
        width:100%; 
        text-align: center;
    }
    #print-site-cover-page h1 {
        font-size: 300%;
    }
}
