/* ************************
   Navigation (AKA left Sidebar)
   ************************
*/
@media screen and (min-width: 875px) {
    div.sphinxsidebar {
        position: fixed;
        margin-left: 0px;
        overflow-y: auto;
        height: 95%;
        top: 30px;
        border-right: 1px solid #767677;
        padding-right: 5px;
        background-color: white;
    }
}

img.logo {
    max-width: 60%;
}

.sphinxsidebar::-webkit-scrollbar { width: 0 !important }
.sphinxsidebar { overflow: -moz-scrollbars-none; }

div.sphinxsidebarwrapper h1 {
    font-size: 1.8em;
}

div.sphinxsidebarwrapper p.caption {
    font-size: 1.4em;
}

div.sphinxsidebarwrapper ul {
    font-size: .9em;
    padding-left: .5em;
}

li.toctree-l1 {
    padding-top: .5em;
}

div#searchbox {
    padding-bottom: 1em;
}

/* GitHub logo */
img.inlinelogo {
    max-height: 1em;
}

/* ************************
   In-page TOC (Right Sidebar)
   ************************
*/
@media screen and (min-width: 1150px) {
    div.rightsidebar {
        /* Positioning */
        display: block;
        width: 210px;
        position: fixed;
        top: 72px;
        right: 0;
        padding-right: 24px;
        z-index: 1;
        left: 50%;
        transform: translateX(410px);
    }
}

@media screen and (max-width: 1150px) {
    div.rightsidebar {
        display: none;
    }
}

div.rightsidebar {
    /* Font text */
    font-size: .8em;
    color: #767677;
    text-decoration: none;
    overflow-y: auto;
    max-height: 85%;
}

div.rightsidebar a {
    color: #767677;
    text-decoration: none;
    border-bottom: none;
}

/* Right sidebar indentation */
div.rightsidebar ul {
    list-style: none;
}

/* Top level TOC is just the page title, make it inivisble */
div.rightsidebar h3 + ul > li > a {
    display: none;
}

/* Second level */
div.rightsidebar ul {
    margin: 3px 0px 3px 0px;
}

div.rightsidebar > ul > li > ul > li {
    padding-top: .5em;
}

/* Third */
div.rightsidebar ul > li > ul {
    margin: 5px 0 5px 0px;
}

/* Fourth */
div.rightsidebar ul > li > ul > li > ul {
    margin: 5px 0 5px 15px;
}

/* ************************
   In-page buttons etc
   ************************
*/

@media screen and (min-width: 1150px) {
    div.document {
        width: 1160px;
    }

    div.body {
        padding-left: 2.5em;
    }

    a.left-prev {
        margin-left: 2.5em !important;
    }
}

/* Ensure the body doesn't cut off text on mobile */
div.body {
    min-width: 10px;
    max-width: 675px;
}

/* Prev / Next buttons */
a.left-prev, a.right-next {
    border: 1px solid #767677;
    color: #767677;
    border-radius: 6px;
    padding: 5px;
    text-decoration: none;
    overflow-x: hidden;
    margin: 0px 10px 10px 30px;

    /* Opacity control */
    opacity: 0.6;
    transition: opacity .3s ease-out;
    -moz-transition: opacity .3s ease-out;
    -webkit-transition: opacity .3s ease-out;
    -o-transition: opacity .3s ease-out;
}

a.left-prev:hover, a.right-next:hover {
    opacity: 1;
}

.right-next {
    float: right;
    max-width: 45%;
    overflow: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.left-prev {
    float: left;
    max-width: 45%;
    overflow: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prev-next-top, .prev-next-bottom {
    max-width: 700px;
}

/* Caption titles in the main text */
div.body p.caption {
    font-size: 1.2em;
}

/* Prevent body from scrolling under the left sidebar */
.bodywrapper {
    overflow-x: hidden;
}

/* Prevent footer from rolling off to the right side */
div.footer {
    max-width: 650px;
}
