/* Shared documentation styles from https://scipopt.org/bootstrap/css/:
 * doxygen.css and doxygen-awesome.css, retrieved 2026-10-29.
 * GCG colors and compatibility with Doxygen 1.18 below.
 */
body.gcg-documentation {
    --primary-color: #11a;
    --primary-dark-color: #11a;
    --primary-light-color: #fc0;
    --page-foreground-color: #23282f;
    --content-maxwidth: 1100px;
    --gcg-sidebar-width: 250px;
    margin: 0;
    padding: 0;
}

#top {
    display: block;
    padding-top: 50px;
}

#top > .navbar {
    z-index: 10000;
}

#top > .hero {
    margin: 0;
}

#top .hero-text {
    position: relative;
    z-index: 1;
}

#top .hero-tagline {
    font-size: 14px;
}

#top .hero .container {
    width: auto;
    max-width: var(--content-maxwidth);
}

#top .gcg-current-version {
    color: inherit;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

#main-nav {
    padding: 0 10px;
}

#doc-content {
    background: var(--page-background-color);
}

#doc-content .title {
    color: var(--page-foreground-color);
}

#doc-content .title a {
    color: inherit !important;
}

/* Keep guide icons inside their section and its reserved right margin. */
#doc-content blockquote:has(.gcg-guide-icon) {
    position: relative;
}

#doc-content .gcg-guide-icon {
    position: absolute;
    top: 1em;
    right: 1em;
    width: min(64px, 15%);
    height: auto;
}

/* Doxygen 1.18 draws the document icon with CSS. */
.icondoc {
    background-image: none;
}

#nav-tree {
    box-sizing: border-box;
}

#nav-tree .selected {
    background: #fff3bf;
}

/* Doxygen 1.18 reserves space for leaf icons as well as expansion arrows. */
#nav-tree .item > .arrow {
    margin-left: -16px;
}

/* Keep citation labels separate from wrapped bibliography entries. */
#doc-content dl.citelist {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 1em .75em;
    margin: 0;
    padding: 0;
}

#doc-content dl.citelist dt,
#doc-content dl.citelist dd,
#doc-content dl.citelist p {
    margin: 0;
    padding: 0;
    float: none;
}

#doc-content dl.citelist dt {
    width: auto;
}

#nav-path {
    clear: both;
    position: static;
    width: auto;
}

/* Match SCIP's sidebar and document banner while retaining Doxygen's tree and search. */
@media screen and (min-width: 768px) {
    #main {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    #top, #nav-path {
        flex-shrink: 0;
    }

    #container {
        flex: 1;
        min-height: 0;
    }

    #doc-content {
        height: 100% !important;
    }

    #top {
        margin-left: var(--gcg-sidebar-width);
    }

    #main-nav {
        position: fixed;
        top: 50px;
        left: 0;
        width: var(--gcg-sidebar-width);
        height: 53px;
        padding: 8px;
        z-index: 100;
        background: var(--side-nav-background);
        border-bottom: 1px solid var(--separator-color);
    }

    #main-menu > li:not(#searchBoxPos2) {
        display: none;
    }

    #main-menu #searchBoxPos2 {
        float: none;
    }

    #MSearchBox {
        width: 100%;
        margin: 0;
        height: 35px;
        border-radius: 4px;
    }

    #MSearchField {
        width: calc(100% - 42px);
        height: 33px;
    }

    #MSearchResultsWindow {
        position: fixed;
        top: 103px !important;
        left: 8px !important;
        right: auto;
        transform: none;
    }

    #side-nav {
        position: fixed;
        top: 103px;
        height: calc(100vh - 103px) !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, .16);
    }

    #nav-tree {
        height: 100% !important;
        padding-top: 20px;
    }

    #nav-path {
        margin-left: var(--gcg-sidebar-width);
    }
}

@media (prefers-color-scheme: dark) {
    html:not(.light-mode) body.gcg-documentation {
        --page-foreground-color: #d1d1d1;
        --primary-color: #9bb8ff;
        --primary-dark-color: #b9cdff;
    }

    #nav-tree .selected {
        background: #51421b;
    }
}

@media screen and (max-width: 767px) {
    #top .hero {
        padding: 16px 0;
    }

    #top .hero-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
    }

    #top .hero-text {
        width: auto;
    }

    #top .hero h1 {
        font-size: 28px;
    }

    #top .hero-tagline {
        font-size: 14px;
    }

    #top .hero-logo img {
        width: 64px;
    }

    #searchBoxPos1 {
        top: 4px;
        left: 54px;
        width: calc(100% - 62px);
    }

    #searchBoxPos1 #MSearchBox {
        width: 100%;
        margin: 0;
    }

    #searchBoxPos1 #MSearchField {
        width: calc(100vw - 130px);
    }

    #doc-content {
        height: auto !important;
        min-width: 0;
    }
}
