/*
 * Sphinx / Read the Docs theme overrides
 *
 * Use this file to override CSS styles for the documentation theme.
 */

/* Override table width to be 100% instead of auto */
.wy-table-responsive table td,
.wy-table-responsive table th {
    white-space: normal !important;
}

.wy-table-responsive {
    margin-bottom: 24px;
    max-width: 100%;
    overflow: auto;
}

/* Custom table styles */
table.docutils {
    width: 100% !important;
}

/* Fix for sidebar navigation */
.wy-nav-side {
    background: #343131;
}

.wy-side-nav-search {
    background-color: #2980b9;
}

.model-switcher {
    margin: 12px 14px 4px;
    text-align: left;
}

.model-switcher__label {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.model-switcher__select {
    width: 100%;
    height: 34px;
    padding: 6px 28px 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

.model-switcher__select:focus {
    border-color: #fff;
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 1px;
}

/* Custom content width */
.wy-nav-content {
    max-width: 1200px;
    margin: auto;
}

/* Code block improvements */
.rst-content code {
    white-space: pre-wrap;
    padding: 2px 5px;
}

/* Improve note visibility */
.admonition.note {
    background-color: #e7f2fa;
    border-left: 4px solid #2980b9;
}

.admonition.warning {
    background-color: #ffedcc;
    border-left: 4px solid #f0b37e;
}

.admonition.tip {
    background-color: #dbfaf4;
    border-left: 4px solid #1abc9c;
}

.admonition.important {
    background-color: #ffedcc;
    border-left: 4px solid #e67e22;
}

/* Better figure alignment */
.figure.align-center {
    text-align: center;
}

.figure.align-center img {
    margin: 0 auto;
}

/* Custom link colors */
.rst-content a {
    color: #2980b9;
}

.rst-content a:visited {
    color: #9b59b6;
}

.wy-breadcrumbs-aside .pdf-export-link {
    display: inline-block;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #d9d9d9;
    color: #2980b9;
    cursor: pointer;
}

.wy-breadcrumbs-aside .pdf-export-link:hover,
.wy-breadcrumbs-aside .pdf-export-link:focus {
    text-decoration: underline;
}

/* Header improvements */
.rst-content h1 {
    font-size: 2em;
    margin-bottom: 0.5em;
}

.rst-content h2 {
    font-size: 1.75em;
    margin-bottom: 0.5em;
}

.rst-content h3 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

/* List spacing improvements */
.rst-content ul,
.rst-content ol {
    margin-bottom: 1em;
}

/* Print styles */
@page {
    size: A4;
    margin: 12mm 10mm 14mm;
}

@media print {
    html,
    body {
        background: #fff !important;
    }

    body {
        font-size: 11pt;
    }

    .wy-nav-side,
    .wy-nav-top,
    .wy-breadcrumbs,
    .rst-footer-buttons,
    footer,
    .pdf-export-link,
    .headerlink,
    .copybtn {
        display: none;
    }

    .wy-nav-content-wrap {
        margin-left: 0 !important;
        background: #fff !important;
    }

    .wy-nav-content {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .rst-content,
    .wy-table-responsive {
        overflow: visible !important;
        max-width: none !important;
    }

    .wy-table-responsive table,
    table.docutils {
        width: 100% !important;
        table-layout: fixed;
    }

    .wy-table-responsive table td,
    .wy-table-responsive table th,
    table.docutils td,
    table.docutils th {
        white-space: normal !important;
        word-break: break-word;
        font-size: 9pt;
    }

    .rst-content pre,
    .rst-content div[class^="highlight"],
    .rst-content .highlight {
        white-space: pre-wrap !important;
        word-break: break-word;
        overflow: visible !important;
        page-break-inside: avoid;
    }

    .rst-content img,
    .rst-content svg {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }

    .rst-content h1,
    .rst-content h2,
    .rst-content h3,
    .rst-content h4 {
        page-break-after: avoid;
    }

    a[href]:after {
        content: "" !important;
    }
}
