/* Optional: Ensure image respects container boundaries */
.output_area.docutils.container img {
    height: auto !important;
    display: block !important;
    object-fit: contain;
}

/* Dark theme tweaking
Apply inversion when the page is in dark mode.
Sphinx-Immaterial sets the active scheme on body[data-md-color-scheme].
*/
/* html[color-scheme="dark"] img[src*=".png"],
body[data-md-color-scheme="slate"] img[src*=".png"] {
    filter: invert(0.82) brightness(0.8) contrast(1.2) !important;
}

html[color-scheme="dark"] img[src*=".svg"],
body[data-md-color-scheme="slate"] img[src*=".svg"] {
    filter: invert(0.82) brightness(0.8) contrast(1.2) !important;
} */

/**
 * Mathematics via MathJax.
 *
 * This is designed for MathJax v3
 * ref: https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax
 */

div.math,
span.math {
    align-items: center;
    display: flex;
    max-width: 100%;
    overflow: hidden;
}

span.math {
    align-items: baseline;
    display: inline-flex;
}

div.math {
    flex-direction: row-reverse;
    gap: 0.5em;
}

div.math span.eqno a.headerlink {
    font-size: 1em;
    position: relative;
}

div.math mjx-container {
    flex-grow: 1;
    overflow: auto;
    padding-bottom: 0.2rem;
}

div.math mjx-container mjx-assistive-mml {
    height: 0;
}

/* Read the Docs-inspired pull-request build notification. */
html[data-docs-version-kind="pull-request"] .md-version {
    display: none;
}

.version-banner[data-version-kind="pull-request"] {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.version-banner__icon {
    display: inline-flex;
    flex: 0 0 auto;
}

.version-banner__icon svg {
    fill: currentcolor;
    height: 2rem;
    width: 2rem;
}

.version-banner__content,
.version-banner__details {
    display: block;
}

.version-banner__content > strong {
    font-size: 0.75rem;
}

.version-banner__details a {
    text-decoration: underline;
    text-underline-offset: 0.1em;
}

.version-banner__button {
    border: 1px solid currentcolor;
    border-radius: 0.15rem;
    display: inline-block;
    font-weight: 700;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    transition:
        background-color 125ms,
        color 125ms;
}

.version-banner__button:focus,
.version-banner__button:hover {
    background-color: var(--md-warning-fg-color);
    color: var(--md-warning-bg-color);
}
