/* Force dark mode by default */
body {
    --color-background-primary: #1e1e1e;
    --color-background-secondary: #2d2d2d;
    --color-foreground-primary: #e0e0e0;
    --color-foreground-secondary: #b0b0b0;
}

/* Dark mode styles for RTD theme */
.wy-nav-side {
    background: #1e1e1e;
}

.wy-side-nav-search {
    background: #1e1e1e ;
}

.wy-menu-vertical a {
    color: #b0b0b0;
}

.wy-menu-vertical a:hover {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

.wy-menu-vertical li.current a {
    color: #4db8ff;
    border-right: 2px solid #4db8ff;
}

.wy-menu-vertical li.on a,
.wy-menu-vertical li.current > a {
    color: #e0e0e0;
    background: #2d2d2d;
}

.wy-nav-content-wrap {
    background: #2d2d2d;
}

.wy-nav-content {
    background: #1e1e1e;
    color: #e0e0e0;
}

/* Inline code references */
.rst-content code,
.rst-content tt,
.rst-content code.literal {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border: 1px solid #3d3d3d !important;
}

/* Code references in text (like class names) */
.rst-content code.xref,
.rst-content a code {
    background: #2d2d2d !important;
    color: #4ec9b0 !important;
    border: 1px solid #3d3d3d !important;
}

.highlight {
    background: #2d2d2d;
}

/* Tables */
.rst-content table.docutils {
    background: #2d2d2d;
    color: #e0e0e0;
}

.rst-content table.docutils thead {
    background: #3d3d3d;
}

/* Links */
.rst-content a {
    color: #4db8ff;
}

.rst-content a:hover {
    color: #80d4ff;
}

/* Admonitions - proper dark mode styling */
.rst-content .admonition,
.rst-content .note,
.rst-content .warning,
.rst-content .tip,
.rst-content .seealso,
.rst-content .admonition-example {
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
    color: #e0e0e0;
}

.rst-content .admonition-title,
.rst-content .note .admonition-title,
.rst-content .warning .admonition-title,
.rst-content .tip .admonition-title,
.rst-content .seealso .admonition-title {
    background: #3d3d3d;
    color: #e0e0e0;
}

/* Fix "See also" blue background with dark text */
.rst-content .seealso {
    background: #2d2d2d;
}

.rst-content .seealso .admonition-title {
    background: rgba(77, 184, 255, 0.2);
    color: #e0e0e0;
}

/* Citation blocks - dark mode styling */
.rst-content .highlight-default .highlight,
.rst-content .highlight-python .highlight,
.rst-content .highlight pre {
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #3d3d3d;
}

/* Softer syntax highlighting colors */
.highlight .k,  /* keywords */
.highlight .kn, /* keyword namespace */
.highlight .kd  /* keyword declaration */ {
    color: #9cdcfe;
}

.highlight .s,  /* strings */
.highlight .s1, /* single quoted strings */
.highlight .s2  /* double quoted strings */ {
    color: #ce9178;
}

.highlight .n,  /* names */
.highlight .nb, /* builtin names */
.highlight .nc  /* class names */ {
    color: #dcdcaa;
}

.highlight .nn  /* namespace (import paths like unravel.classifiers) */ {
    color: #4ec9b0;
}

.highlight .nf  /* function names */ {
    color: #dcdcaa;
}

.highlight .c,  /* comments */
.highlight .c1, /* single line comments */
.highlight .cm  /* multi-line comments */ {
    color: #6a9955;
}

.highlight .o   /* operators */ {
    color: #d4d4d4;
}

.highlight .p   /* punctuation */ {
    color: #d4d4d4;
}

.highlight .m,  /* numbers */
.highlight .mi, /* integers */
.highlight .mf  /* floats */ {
    color: #b5cea8;
}

/* Class/function reference boxes (dl dt) */
.rst-content dl dt {
    background: #2d2d2d;
    color: #dcdcaa;
    border-left: 3px solid #4db8ff;
}

.rst-content dl dd {
    background: #1e1e1e;
    color: #e0e0e0;
}

/* Parameter/return type styling */
.rst-content .field-list dt {
    background: #2d2d2d;
    color: #9cdcfe;
}

/* Logo styling - replace home icon and project name with just the logo */
.wy-side-nav-search > a img.logo,
.wy-side-nav-search .wy-dropdown > a img.logo {
    max-width: 100%;
    height: auto;
    margin: 0 0 1em 0;
    padding: 0;
    display: block;
}

.wy-side-nav-search > a {
    padding: 0.809em;
    display: block;
}

/* Hide the project name text next to logo */
.wy-side-nav-search > a .icon {
    display: none;
}

/* Make logo the only thing visible - hide text */
.wy-side-nav-search .wy-dropdown > a,
.wy-side-nav-search > a {
    font-size: 0;
    line-height: 0;
}

.wy-side-nav-search > a img.logo {
    font-size: initial;
}

/* Fix the right content area background to match */
.wy-nav-content-wrap {
    background: #1e1e1e;
}

.wy-nav-content {
    background: #1e1e1e;
    color: #e0e0e0;
    max-width: 100%;
}

/* Top nav bar should also be dark */
.wy-nav-top {
    background: #1e1e1e;
    color: #e0e0e0;
}
