/* MAK branding: title and version font size */
:root {
    --title-font-size: 26px;
}

/* MAK branding: version number - make more prominent */
#projectnumber {
    font-size: 80%;
}

/* MAK branding: scale footer logo */
img.footer {
    width: 110px;
}

/* MAK branding: footer text size */
.navpath li.footer {
    font-size: 15px;
}

/* MAK branding: logo image - keep slightly larger than title text */
#projectlogo img {
    max-height: calc(var(--title-font-size) * 2.2) !important;
    height: calc(var(--title-font-size) * 2.2) !important;
    margin-right: var(--spacing-medium);
}

/* Align logo and project name to vertical center of their table cells */
#projectrow #projectlogo,
#projectrow #projectalign {
    vertical-align: middle;
}

/* Fix: doxygen.css hardcodes 'white' in the box-shadow for div.groupHeader
   (the spacer row that Doxygen generates for anonymous member groups defined
   with @{ @} but no \name). doxygen-awesome.css overrides h2.groupheader but
   not div.groupHeader (capital H). In dark mode the hardcoded white shadows
   appear as visible white squares at the edges of those spacer rows.
   Apply the same page-background + separator-color pattern used for h2.groupheader
   so the separator line renders correctly in both light and dark mode. */
div.groupHeader {
    box-shadow:
        100px 0 var(--page-background-color),
        -100px 0 var(--page-background-color),
        100px 0.75px var(--separator-color),
        -100px 0.75px var(--separator-color),
        500px 0 var(--page-background-color),
        -500px 0 var(--page-background-color),
        500px 0.75px var(--separator-color),
        -500px 0.75px var(--separator-color),
        900px 0 var(--page-background-color),
        -900px 0 var(--page-background-color),
        900px 0.75px var(--separator-color),
        -900px 0.75px var(--separator-color);
    color: var(--page-foreground-color);
}

/* Fix: doxygen.css also hardcodes 'white' in hr { box-shadow }. doxygen-awesome
   overrides hr only inside .contents (via the more-specific .contents hr selector)
   but leaves a bare hr outside .contents unstyled with the white shadow.
   Add box-shadow: none here so bare hr elements do not bleed white in dark mode.
   (.contents hr already has the correct separator-color box-shadow from
   doxygen-awesome.css and is unaffected by this rule.) */
hr {
    box-shadow: none;
}

/* Sidebar-only layout with FULL_SIDEBAR=YES (Doxygen 1.14+):
   #top (logo + search bar) lives INSIDE #side-nav, so #side-nav must start
   at top:0, not top:var(--top-height). The doxygen-awesome-sidebar-only.css
   default of top:var(--top-height) was designed for the old DOM where #top
   was a separate full-width header OUTSIDE #side-nav. Without this fix the
   whole sidebar is pushed down by --top-height pixels, creating a blank gap. */
@media screen and (min-width: 768px) {
    #side-nav {
        top: 0 !important;
    }

    /* In FULL_SIDEBAR mode #top lives inside #side-nav. The sidebar-only CSS sets
       margin-bottom: -var(--top-height) on #top to make #nav-tree start at y=0
       (designed for the old layout where side-nav was already offset by header height).
       With side-nav at top:0 we want #nav-tree to start AFTER the header, so cancel
       the negative margin. JS sets navtreeHeight = windowHeight - headerHeight - 1,
       which then correctly fills from y=120 to y=viewport-bottom. */
    #top {
        margin-bottom: 0 !important;
    }

    /* #nav-tree height = 100vh - --top-height. Set --top-height to the actual
       rendered height of #top so the nav tree fills the remaining space exactly.
       Measure with: document.querySelector('#top').scrollHeight after removing
       the forced height: document.querySelector('#top').style.height='auto' */
    html {
        --top-height: 145px;
    }

    /* #top paints above #nav-tree which shares the same z-plane. */
    #top {
        position: relative;
        z-index: 2;
    }
}