/* src: https://github.com/JorelAli/mdBook-pagetoc */

@media only screen and (max-width:1439px) {
    .sidetoc {
        display: none;
    }
}

@media only screen and (min-width:1440px) {
    main {
        position: relative;
    }

    .sidetoc {
        position: fixed;
        font-size: var(--pagetoc-fontsize);
        height: 100%;
        top: 0;
        right: 0;
        z-index: 10;
        display: flex;
        align-items: center;
        width: var(--pagetoc-width);
    }
    .pagetoc {
        height: 80vh;
        overflow-y: scroll;
        width: 100%;
        opacity: 0;
        transition: all 0.2s;
        border-radius: 8px;
        background: var(--sidebar-bg);
    }

    .pagetoc:hover {
        opacity: 1;
    }

    ::-webkit-scrollbar {
        width: 5px;
        height: 10px;
        background-color: none;
    }

    ::-webkit-scrollbar-thumb {
        border-radius: 10px;
        background-color: rgba(0, 0, 0, 0.2);
    }

    .pagetoc a {
        border-left: 1px solid var(--sidebar-bg);
        /* color: var(--fg); */
        /* color: var(--sidebar-fg); */
        color: var(--links);
        display: block;
        padding-bottom: 5px;
        padding-top: 5px;
        padding-left: 10px;
        text-align: left;
        text-decoration: none;
        font-weight: normal;
        background: var(--sidebar-bg);
    }
    .pagetoc a:hover,
    .pagetoc a.active {
        background: var(--sidebar-bg);
        /* color: var(--sidebar-fg); */
        color: var(--sidebar-active);
        font-weight: bold;
        font-size: var(--pagetoc-fontsize);
    }
}
