/*
 * Dark-mode bridge for the embedded Doxygen (doxygen-awesome) pages.
 *
 * doxysphinx leaves doxygen-awesome's light variables on the global `html {}`
 * selector but scopes its dark block to the impossible selector
 * `.doxygen-content html.dark-mode`, so the C++ API pages always render with the
 * light palette — white boxes on the dark pydata page.
 *
 * pydata marks dark mode with `html[data-theme="dark"]` (explicit) and
 * `html[data-mode="dark"]` (auto-resolved). Re-declaring doxygen-awesome's dark
 * palette under those selectors makes the variable-driven doxygen styles follow
 * the site theme. These variables only affect doxygen-awesome elements, so other
 * pages are unaffected.
 */
html[data-theme="dark"],
html[data-mode="dark"] {
  color-scheme: dark;

  --primary-color: #1982d2;
  --primary-dark-color: #86a9c4;
  --primary-light-color: #4779ac;

  --box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.30);

  --odd-color: rgba(100, 100, 100, 0.06);

  --menu-selected-background: rgba(0, 0, 0, 0.4);

  --page-background-color: #1C1D1F;
  --page-foreground-color: #d2dbde;
  --page-secondary-foreground-color: #859399;
  --separator-color: #38393b;
  --side-nav-background: #252628;

  --code-background: #2a2c2f;

  --tablehead-background: #2a2c2f;

  --blockquote-background: #222325;
  --blockquote-foreground: #7e8c92;

  --warning-color: #3b2e04;
  --warning-color-dark: #f1b602;
  --warning-color-darker: #ceb670;
  --note-color: #163750;
  --note-color-dark: #1982D2;
  --note-color-darker: #dcf0fa;
  --todo-color: #2a2536;
  --todo-color-dark: #7661b3;
  --todo-color-darker: #ae9ed6;
  --deprecated-color: #2e323b;
  --deprecated-color-dark: #738396;
  --deprecated-color-darker: #abb0bd;
  --bug-color: #2e1917;
  --bug-color-dark: #ad2617;
  --bug-color-darker: #f5b1aa;
  --invariant-color: #303a35;
  --invariant-color-dark: #76ce96;
  --invariant-color-darker: #cceed5;

  --fragment-background: #282c34;
  --fragment-foreground: #dbe4eb;
  --fragment-keyword: #cc99cd;
  --fragment-keywordtype: #ab99cd;
  --fragment-keywordflow: #e08000;
  --fragment-token: #7ec699;
  --fragment-comment: #999999;
  --fragment-link: #98c0e3;
  --fragment-preprocessor: #65cabe;
  --fragment-linenumber-color: #cccccc;
  --fragment-linenumber-background: #35393c;
  --fragment-linenumber-border: #1f1f1f;
}

/*
 * Without the sidebar-only stylesheet the Doxygen project banner (`#titlearea`,
 * the empty "DiFfRG ___" block) shows as a stray left column. Hide it and let
 * the content use the full width.
 */
.doxygen-content #top,
.doxygen-content #titlearea {
  display: none;
}

/* Soften pydata's in-page target highlight (the olive flash on `:target`). */
html[data-theme="dark"] :target,
html[data-mode="dark"] :target {
  background-color: rgba(25, 130, 210, 0.18);
}
