/* Custom CSS for Treadmill Documentation */

/* Improve code block styling - Light theme */
.highlight {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 1em 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.highlight pre {
    background: transparent !important;
    padding: 1.2rem;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.6;
    color: #212529 !important;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Override syntax highlighting colors for light theme */
.highlight .k { color: #0066cc !important; font-weight: bold; }  /* Keywords */
.highlight .s, .highlight .s1, .highlight .s2 { color: #008000 !important; }  /* Strings */
.highlight .c, .highlight .c1 { color: #6a737d !important; font-style: italic; }  /* Comments */
.highlight .n { color: #333333 !important; }  /* Names */
.highlight .nb { color: #795da3 !important; }  /* Built-ins */
.highlight .nf { color: #6f42c1 !important; }  /* Function names */
.highlight .nc { color: #d73a49 !important; font-weight: bold; }  /* Class names */
.highlight .mi, .highlight .mf { color: #005cc5 !important; }  /* Numbers */
.highlight .o { color: #d73a49 !important; }  /* Operators */
.highlight .p { color: #586069 !important; }  /* Punctuation */
.highlight .bp { color: #795da3 !important; }  /* Built-in pseudo */
.highlight .kn, .highlight .kd { color: #0066cc !important; font-weight: bold; }  /* Import/def keywords */

/* Style for inline code */
code {
    background-color: #f1f3f4 !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e83e8c !important;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    border: 1px solid #e1e8ed;
}

/* Improve table styling */
.rst-content table.docutils {
    border-collapse: collapse;
    margin: 1em 0;
    border: 1px solid #ddd;
}

.rst-content table.docutils th,
.rst-content table.docutils td {
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.rst-content table.docutils th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* Style for admonitions (notes, warnings, etc.) */
.rst-content .admonition {
    margin: 1em 0;
    padding: 1rem;
    border-left: 4px solid;
    border-radius: 4px;
}

.rst-content .admonition.note {
    background-color: #e7f3ff;
    border-left-color: #2196F3;
}

.rst-content .admonition.warning {
    background-color: #fff8e1;
    border-left-color: #ff9800;
}

.rst-content .admonition.tip {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
}

/* Improve navigation styling */
.wy-menu-vertical li.current a {
    border-right: 3px solid #2196F3;
}

.wy-menu-vertical li.toctree-l1.current > a {
    background-color: #e7f3ff;
}

/* Style for API documentation */
.rst-content dl:not(.docutils) dt {
    background: #f8f9fa;
    border-left: 3px solid #2196F3;
    padding: 0.5rem;
    margin-top: 1rem;
    font-weight: bold;
}

/* Improve heading styling */
.rst-content h1 {
    border-bottom: 2px solid #2196F3;
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
}

.rst-content h2 {
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 0.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Style for badges and inline elements */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    background-color: #6c757d;
    color: #fff;
}

/* Responsive improvements */
@media screen and (max-width: 768px) {
    .highlight pre {
        font-size: 0.8em;
        overflow-x: auto;
    }
    
    .rst-content table.docutils {
        font-size: 0.9em;
    }
}

/* Additional code block improvements */
.highlight .hll { background-color: #ffffcc !important; }  /* Highlighted line */
.highlight .err { color: #a61717 !important; background-color: #e3d2d2 !important; }  /* Error */

/* Console/bash code blocks styling */
.highlight-bash .highlight,
.highlight-console .highlight,
.highlight-shell .highlight {
    background: #f6f8fa !important;
    border-left: 4px solid #0366d6 !important;
}

/* Python code blocks with special styling */
.highlight-python .highlight {
    background: #f6f8fa !important;
    border-left: 4px solid #28a745 !important;
} 