/* CSS to fix mermaid diagrams colors in dark mode */
/* Source: https://github.com/mgaitan/sphinxcontrib-mermaid/issues/205 */

body[data-theme="light"] .mermaid-container {
    background-color: #fafafa;
}

body[data-theme="light"] pre.mermaid svg path {
    stroke: black !important;
}

body[data-theme="dark"] .mermaid-container {
    background-color: #222;
}

body[data-theme="dark"] pre.mermaid svg path {
    stroke: white !important;
}

@media (prefers-color-scheme: dark) {
    .mermaid-container {
        background-color: #222;
    }

    pre.mermaid svg path {
        stroke: white !important;
    }
}

@media (prefers-color-scheme: light) {
    .mermaid-container {
        background-color: #fafafa;
    }

    body[data-theme="dark"] pre.mermaid svg path {
        stroke: black !important;
    }
}