/* Styling for Wikipedia-esque inline annotations (i.e "citation needed") */
.annotate {
    font-style: italic;
    font-size: 0.8em; /* Slightly smaller */
    vertical-align: super; /* Makes it superscript */
}

/*
   These are some funny CSS hacks required to get the To-Do admonition working
   in sphinx-book-theme.
 */

.admonition.admonition-todo, div.admonition.admonition-todo {
  border-color: #8045e5 !important;
}

html[data-theme="light"] {
  --pst-color-secondary: #8045e5 !important;
}

/*
   When Sphinx theme is in dark mode, apply dark mode to Doxygen content.
   We're basically just making a desperate attempt here to get dark mode to
   work correctly while battling with the CSS from both the Sphinx theme and
   the Doxygen theme
 */

[data-theme="dark"] {
    color-scheme: dark;
    --primary-color: #1982d2;
    --primary-dark-color: #86a9c4;
    --primary-light-color: #4779ac;
    --page-background-color: #1C1D1F;
    --page-foreground-color: #d2dbde;
    --page-secondary-foreground-color: #859399;
    --separator-color: #38393b;
    --fragment-background: #282c34;
    --fragment-foreground: #dbe4eb;
    --code-background: #2a2c2f;

    /* Additional variables for parameters and other documentation elements */
    --param-name-color: #d2dbde;
    --memdoc-background: #252628;
    --memdoc-foreground: #d2dbde;
    --memitem-background: #121212;
}

/* Fix enumerator background color not working in dark mode */
[data-theme="dark"] .doxygen-content .memdoc table.fieldtable th {
    background-color: var(--fragment-background);
}

/* Hide the sidebar toggle button, it's really glitchy */
.header-article-item .sidebar-toggle {
    display: none !important;
}

/* Force dark mode colors for specific Doxygen elements */
[data-theme="dark"] .memitem {
    background-color: var(--memitem-background);
}

[data-theme="dark"] .memdoc {
    background-color: var(--memdoc-background);
    color: var(--memdoc-foreground) !important;
}

[data-theme="dark"] .params .paramname,
[data-theme="dark"] .retval .paramname {
    color: var(--page-foreground-color);
}

/* Remove weird faux <hr> from footer */
footer.bd-footer-content {
    border-top: none;
}

/* Reduce the size of the FlightGear logo */
.navbar-brand img {
    width: 50%;
}
