/*
 * dragonflytheme_dark.css
 * ~~~~~~~~~~~~~~~~~~~~~~~
 *
 * Dark-theme half of the Dragonfly branding. Swaps the navy brand assets for
 * their white-knockout variants, which are otherwise near-invisible against
 * python_docs_theme's dark palette (page #222, sidebar #333, mobile nav #000).
 *
 * WHY THIS IS A SEPARATE FILE, and not an
 * '@media (prefers-color-scheme: dark)' block inside dragonflytheme.css:
 *
 * The theme's Theme selector (Auto / Light / Dark) does not set a class or a
 * data-attribute. themetoggle.js switches themes by rewriting the 'media'
 * attribute of the dark stylesheets themselves -- 'all' for Dark, 'not all' for
 * Light, '(prefers-color-scheme: dark)' for Auto. A plain media query in the
 * main stylesheet therefore only ever tracks the OS setting, and would show the
 * navy logo on a dark page whenever someone picked Dark on a light-mode machine.
 *
 * So this file is linked with the same media attribute and the same id
 * convention as the theme's own dark sheets, and _sphinxTemplates/layout.html
 * ships a few lines of script that keep its media attribute in step with the
 * selector. Adding a rule here means it follows the toggle correctly; adding the
 * same rule to dragonflytheme.css does not.
 *
 * The swap uses the 'content' property on the <img> elements because their 'src'
 * comes from Sphinx (html_logo and the theme's root_icon option) and cannot be
 * varied per colour scheme. If a browser ignores 'content' on a replaced element
 * the navy original simply stays, which is legible-but-dull rather than broken.
 */

/* Square mark in the navigation bar and in the mobile nav header. */
div.related li img,
.nav-content img {
    content: url("../images/dragonfly-mark-reversed.png");
}

/*
 * Wordmark (html_logo) in the sidebar. The '.menu' selector is for the mobile
 * menu, but is inert with the pinned versions -- see the matching comment in
 * dragonflytheme.css for why the theme never renders that logo.
 */
div.sphinxsidebar p.logo img.logo,
.menu p.logo img.logo {
    content: url("../images/dragonfly-logo-reversed.png");
}
