/* User Provided Stylesheet */

/* Custom styling for book */

/* Nav elements in the sidebar */

.primary-scrollbar a, .primary-scrollbar div {
    font-size: 0.9rem;
    background: none;
    padding-bottom: 0.15rem;
    margin-bottom: 0;
    color: #48566b;
}

.primary-scrollbar a:is(.dark *), .primary-scrollbar div:is(.dark *) {
    color: #ced6dd;
}

.primary-scrollbar .active:not(.font-bold) {
    color: #4D7EE9;
    border-left: 2px solid #4D7EE9;
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Book title in the sidebar */

.primary-scrollbar .font-bold {
    color: #222832;
    font-size: 1rem;
    margin-top: 1rem;
    padding-left: 0.1;
    padding-right: 0.1;
    /*
    padding-bottom: 0.8rem !important;
    margin-bottom: 0.8rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    */
}

.primary-scrollbar .font-bold:is(.dark *) {
    color: white;
}

/* Hide the "made with MyST" default logo */
.primary-scrollbar + div {
    display: none;
}

/* Make left sidebar show on most
 * large screens to replicate look
 * and feel of Jupyterbook v1 */
@media screen and (min-width: 960px) {
    article main {
        width: 80%;
        margin-left: 13rem;
    }

    /* Pseudo-previous sibling
     * selector, this selects
     * the left sidebar container
     * <div> (idea came from
     * https://tobiasahlin.com/blog/previous-sibling-css-has/) */

    div:has(+ .article) {
        min-width: unset;
        max-width: 250px;
    }

    div:has(+ .article), div:has(+ .article) > div {
        display: grid !important;
    }
}

@media screen and (min-width: 1280px) {
    article main {
        width: initial;
        margin-left: unset;
    }

    div:has(+ .article), div:has(+ .article) > div {
        max-width: initial;
    }
}
