/* Custom CSS for notebook downloads */

/* Custom header font sizes */
h1 {
    font-size: 2.2em !important;
    margin-bottom: 0.8em !important;
}

h2 {
    font-size: 1.8em !important;
    margin-bottom: 0.7em !important;
    margin-top: 1.2em !important;
}

h3 {
    font-size: 1.5em !important;
    margin-bottom: 0.6em !important;
    margin-top: 1em !important;
}

h4 {
    font-size: 1.3em !important;
    margin-bottom: 0.5em !important;
    margin-top: 0.8em !important;
}

h5 {
    font-size: 1.1em !important;
    margin-bottom: 0.4em !important;
    margin-top: 0.6em !important;
}

h6 {
    font-size: 1em !important;
    margin-bottom: 0.3em !important;
    margin-top: 0.5em !important;
}

/* Ensure headers are readable and well-spaced */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    line-height: 1.3;
    font-weight: 600;
}

.sphx-glr-download {
    margin: 10px 0;
}

.sphx-glr-download-python,
.sphx-glr-download-jupyter {
    display: inline-block;
    margin: 5px 10px 5px 0;
}

.sphx-glr-download a {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #495057;
    display: inline-block;
    padding: 0.375rem 0.75rem;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: all 0.15s ease-in-out;
}

/* Notebook output styling and length control */
.nbsphinx .nbsphinx-code-cell {
    margin: 1em 0;
}

/* Make text outputs scrollable with a max height.
   Targets stream outputs (print statements), text outputs, and highlighted output blocks.
   Does NOT constrain image outputs. */
.nboutput pre,
.nboutput .highlight pre,
.nboutput .output_subarea.output_stream pre,
.nboutput .output_subarea.output_text pre,
.nboutput .output_subarea.output_stderr pre {
    max-height: 300px;
    overflow-y: auto;
    resize: vertical;
}

/* Hide stderr outputs */
.nbsphinx .nboutput .stderr,
.nboutput .output_subarea.output_stderr {
    display: none;
}

/* Style for large dataframe/table outputs */
.nbsphinx .nboutput table {
    max-height: 300px;
    overflow-y: auto;
    display: block;
}

.sphx-glr-download a:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    text-decoration: none;
}

.sphx-glr-download-python a {
    background: #f8f9fa;
    border-color: #28a745;
    color: #28a745;
}

.sphx-glr-download-python a:hover {
    background: #28a745;
    color: white;
}

.sphx-glr-download-jupyter a {
    background: #f8f9fa;
    border-color: #fd7e14;
    color: #fd7e14;
}

.sphx-glr-download-jupyter a:hover {
    background: #fd7e14;
    color: white;
}

/* Notebook info styling */
.nbinfo {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
}

.nbinfo p {
    margin: 0.5rem 0;
}
