/* Custom CSS for HITEN documentation */

/* Dark theme color overrides (works across RTD theme) */
:root {
    --pst-color-primary: #4A9EFF;
    --pst-color-secondary: #B0B0B0;
    --pst-color-accent: #FF6B6B;
    --pst-color-info: #4A9EFF;
    --pst-color-success: #4ECDC4;
    --pst-color-warning: #FFE66D;
    --pst-color-danger: #FF6B6B;
    --pst-color-text: #E0E0E0;
    --pst-color-text-muted: #B0B0B0;
    --pst-color-background: #1a1a1a;
    --pst-color-on-background: #2a2a2a;
    --pst-color-surface: #2a2a2a;
    --pst-color-on-surface: #E0E0E0;
}

/* Read the Docs theme variables and components */
/* Sidebar and nav header */
.wy-side-nav-search {
    background: var(--pst-color-background) !important;
}
.wy-side-nav-search .logo, .wy-side-nav-search a, .wy-side-nav-search a:visited {
    color: var(--pst-color-text);
}
.wy-nav-top {
    background: var(--pst-color-background) !important;
}
.wy-nav-side {
    background: var(--pst-color-on-background) !important;
}
.wy-menu-vertical a {
    color: var(--pst-color-text);
}
.wy-menu-vertical a:hover {
    background: var(--pst-color-surface);
}
.wy-menu-vertical .current > a, .wy-menu-vertical .current > a:hover {
    background: var(--pst-color-primary);
    color: #ffffff;
}
.wy-menu-vertical li.toctree-l1.current > a span.toctree-expand {
    color: #ffffff;
}

/* Content area */
.wy-nav-content {
    background: var(--pst-color-background);
}
.wy-nav-content-wrap {
    background: var(--pst-color-background);
}
.rst-content {
    color: var(--pst-color-text);
}
.rst-content a {
    color: var(--pst-color-primary);
}
.rst-content a:hover {
    color: #80baff;
}

/* Search input */
input[type="text"], .wy-side-nav-search input[type="text"] {
    background: var(--pst-color-surface);
    color: var(--pst-color-text);
    border: 1px solid #404040;
}

/* Dark theme body styling */
body {
    background-color: var(--pst-color-background);
    color: var(--pst-color-text);
}

/* Dark theme for code blocks */
.highlight {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 0.375rem;
    padding: 1rem;
    color: #E0E0E0;
}

/* Dark theme for inline code */
code {
    background-color: #2d2d2d;
    color: #4A9EFF;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

/* Dark theme for pre blocks */
pre {
    background-color: #2d2d2d;
    color: #E0E0E0;
    border: 1px solid #404040;
    border-radius: 0.375rem;
}

/* Additional dark theme styling */

/* Math equations */
.math {
    font-size: 1.1em;
}

/* API documentation styling */
.py.class {
    border-left: 4px solid var(--pst-color-primary);
    padding-left: 1rem;
    margin-left: -1rem;
}

.py.function {
    border-left: 4px solid var(--pst-color-success);
    padding-left: 1rem;
    margin-left: -1rem;
}

.py.method {
    border-left: 4px solid var(--pst-color-info);
    padding-left: 1rem;
    margin-left: -1rem;
}

/* Parameter lists */
.field-list dt {
    font-weight: bold;
    color: var(--pst-color-primary);
}

.field-list dd {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

/* Admonitions */
.admonition {
    border-radius: 0.375rem;
    border-left: 4px solid;
}

.admonition.note {
    border-left-color: var(--pst-color-info);
}

.admonition.warning {
    border-left-color: var(--pst-color-warning);
}

.admonition.danger {
    border-left-color: var(--pst-color-danger);
}

/* Dark theme table styling */
table.docutils {
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid #404040;
    border-radius: 0.375rem;
    overflow: hidden;
    background-color: var(--pst-color-surface);
}

table.docutils th {
    background-color: var(--pst-color-primary);
    color: white;
    font-weight: bold;
    padding: 0.75rem;
    text-align: left;
}

table.docutils td {
    padding: 0.75rem;
    border-top: 1px solid #404040;
    color: var(--pst-color-text);
}

table.docutils tr:nth-child(even) {
    background-color: #2d2d2d;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

/* Dark theme footer */
.footer {
    border-top: 1px solid #404040;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    color: var(--pst-color-text-muted);
}

/* Header logo sizing for RTD */
.wy-side-nav-search .logo, .wy-side-nav-search img.logo {
    max-height: 60px;
}

/* Responsive design */
@media (max-width: 768px) {
    .py.class,
    .py.function,
    .py.method {
        margin-left: 0;
        padding-left: 0.5rem;
    }
    
    table.docutils {
        font-size: 0.875rem;
    }
    
    table.docutils th,
    table.docutils td {
        padding: 0.5rem;
    }
}
