/* BBF ToC (table of contents) CSS */

:root {
    --toc-width: 15rem;
    --toc-padding-left-extra: 1rem;
    --toc-padding-left: calc(var(--toc-width) + var(--toc-padding-left-extra));
}

/* these are pandoc's default ToC settings */
#TOC li {
    list-style: none;
}

#TOC ul {
    padding-left: 1.3em;
}

#TOC > ul {
    padding-left: 0;
}

#TOC a:not(:hover) {
    text-decoration: none;
}

@media screen and (min-width: 924px) {
    body {
        padding-left: var(--toc-padding-left);
    }

    #SIDEBAR::before {
        content: "Table of Contents";
        font-weight: bold;
    }

    #SIDEBAR {
        position: fixed;
        margin: 0 0;
        top: 0px;
        left: 0px;
        width: var(--toc-width);
        height: 100vh;
        line-height: 1.4;
        font-size: smaller;
        overflow: auto;
        overscroll-behavior: contain;
        /* background-color: white; */
        border: 1px solid #73AD21;
    }

    #SIDEBAR ul {
        margin: 0.35em 0;
        padding: 0 0 0 1em;
        list-style-type: none;
    }

    #SIDEBAR ul ul {
        margin: 0.25em 0;
    }

    #SIDEBAR ul ul ul {
        margin: 0.15em 0;
    }

    #SIDEBAR li p:last-child {
        margin-bottom: 0;
    }

    #SIDEBAR {
        z-index: 2;
    }

    #SIDEBAR a:not(:hover) {
        text-decoration: none;
    }
}

@media screen and (max-width: 923px) {
    #SIDEBAR {
        display: none;
    }
}

@media not screen {
    #SIDEBAR {
        display: none;
    }
}
