/*
 * Extra Doxygen stylesheet, loaded after doxygen-awesome-css.
 *
 * The sidebar lists the pages first, then the generated indexes (Topics,
 * Modules, Namespaces, ...). The first index after a page gets a separator
 * and an "API reference" caption, so the two groups read apart.
 * navtree.js gives each link a class named after its page, and nests the
 * top-level entries under the main page's list.
 */
#nav-tree-contents > ul > li > ul > li:not(:has(> .item > .label > a:is(
    .topics\.html, .modules\.html, .namespaces\.html, .concepts\.html,
    .annotated\.html, .interfaces\.html, .structs\.html, .exceptions\.html,
    .files\.html, .examples\.html)))
+ li:has(> .item > .label > a:is(
    .topics\.html, .modules\.html, .namespaces\.html, .concepts\.html,
    .annotated\.html, .interfaces\.html, .structs\.html, .exceptions\.html,
    .files\.html, .examples\.html))
{
    margin-top: var(--spacing-large);
    padding-top: var(--spacing-medium);
    border-top: 1px solid var(--separator-color);

    /* Aligned with the labels: navtree.js indents each level by 16px. */
    &::before {
        content: "API reference";
        display: block;
        padding: 0 0 var(--spacing-small) 32px;
        color: var(--page-secondary-foreground-color);
        font-size: 0.75em;
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
}

/*
 * Member group headers (`///@name`). doxygen.css draws their separator with
 * box-shadows in hard-coded page colors, which show as boxes beside the
 * header when the theme switches between light and dark mode.
 */
div.groupHeader {
    color: var(--page-secondary-foreground-color);
    box-shadow:
        13px 0 var(--page-background-color),
        -13px 0 var(--page-background-color),
        13px 1px var(--separator-color),
        -13px 1px var(--separator-color);
}
