/* Custom CSS for LMITF documentation */

.bd-main .bd-content .bd-article-container {
    max-width: none;
}

.bd-sidebar-primary {
    max-width: 280px;
}

/* Custom colors and styling */
:root {
    --pst-color-primary: #007ACC;
    --pst-color-secondary: #4FC3F7;
}

/* Ensure internal links don't open in new tabs */
a[href^="#"]:not([target]),
a[href^="/"]:not([target]),
a[href*="index.html"]:not([target]),
a[href*=".html"]:not([target]) {
    target: _self !important;
}

/* Only external links should open in new tabs */
a[href^="http"]:not([href*="localhost"]):not([href*="127.0.0.1"]) {
    target: _blank;
    rel: noopener noreferrer;
}

/* Code block styling */
.highlight {
    border-radius: 6px;
    border: 1px solid var(--color-background-border);
}

/* Admonition styling */
.admonition {
    border-radius: 6px;
    border-left: 4px solid var(--color-brand-primary);
}

/* API documentation styling */
.py.class, .py.function, .py.method {
    border-top: 1px solid var(--color-background-border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.py.class:first-child, .py.function:first-child, .py.method:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* Table styling */
table.docutils {
    border-collapse: collapse;
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    overflow: hidden;
}

table.docutils th {
    background-color: var(--color-background-secondary);
    font-weight: 600;
}

table.docutils td, table.docutils th {
    border: 1px solid var(--color-background-border);
    padding: 0.75rem;
}

/* Navigation improvements */
.toctree-l1 > a {
    font-weight: 600;
}

/* Footer styling */
.footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-background-border);
    text-align: center;
    color: var(--color-foreground-muted);
}

/* Fix for sidebar navigation links */
.sidebar-tree a {
    target: _self !important;
}

/* Fix for main content area links */
.main-content a:not([target]) {
    target: _self !important;
}