/* ============================================================
 * AAanalysis documentation custom styles
 * Built on the Sphinx Read the Docs theme
 * ============================================================ */


/* ------ General Styles ------ */

/* Version text in the sidebar */
.wy-side-nav-search > div.version {
    color: white;
}

/* Highlighted code-block background */
.highlight {
    background: #f7f7f7;
}

/* Inline code */
.rst-content code {
    background-color: #f5f5f5;
    font-family: monospace;
    padding: 2px 2px;
}

/* Links — same colour for default / hover / visited */
a,
a:hover,
a:visited {
    color: #008bfb;
}


/* ------ Layout Styles ------ */

/* Content area: full width with comfortable side padding on desktop */
.wy-nav-content {
    width: 100%;
    padding-left: 45px;
    padding-right: 45px;
}

/* Tighten side padding on phones / narrow tablets */
@media (max-width: 768px) {
    .wy-nav-content {
        padding-left: 3px;
        padding-right: 3px;
    }
}


/* ------ Table Styles ------ */

/* Auto-size tables inside the responsive wrapper */
.wy-table-responsive table {
    table-layout: auto;
    width: 100%;
}

/* Wide tables in body content scroll horizontally on narrow screens */
.rst-content table {
    display: block;
    overflow-x: auto;
    /* white-space: nowrap;  Disabled: caused wide tables to overflow awkwardly */
}


/* ------ Logo Styles ------ */

/* Sidebar logo */
.wy-side-nav-search .wy-dropdown > a img.logo,
.wy-side-nav-search > a img.logo {
    max-width: 80%;
    max-height: 60%;
}


/* ------ Top Bar Styles ------ */

/* Mobile top bar (visible when sidebar collapses) */
.wy-nav-top {
    background: #343131;
}


/* ------ Search Box Styles ------ */

.wy-side-nav-search input[type="text"] {
    border-color: #666666;
}


/* ------ Version Menu Styles ------ */

.rst-versions .rst-current-version {
    color: #d9d9d9;
}


/* ------ Vertical Menu Styles ------ */

.wy-menu-vertical a {
    color: #d9d9d9;
}


/* ------ Admonition / Example Box Styles ------ */

.admonition-examples.admonition {
    background-color: white;
}

/* Centre images inside admonitions and example boxes */
.admonition-examples.admonition img,
.admonition img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;   /* never overflow on small screens */
    height: auto;      /* preserve aspect ratio */
}


/* ------ Parameter List Stacking on Mobile ------ */
/* The RTD theme renders parameter lists as <dl class="field-list simple">,
 * with name and description side-by-side via a grid layout. On narrow
 * screens this gets cramped, so we stack them vertically (similar to
 * scikit-learn's docs). */
@media screen and (max-width: 768px) {
    .wy-nav-content dl.field-list {
        display: block;
    }
    .wy-nav-content dl.field-list > dt {
        float: none;
        width: 100%;
        margin-top: 10px;
        padding-left: 0;
    }
    .wy-nav-content dl.field-list > dd {
        margin-left: 0;
        width: 100%;
    }
}


/* ------ General Mobile Readability ------ */
/* Prevent long inline code, function signatures, and URLs from
 * pushing the layout wider than the viewport on phones. */
@media screen and (max-width: 768px) {
    .rst-content pre,
    .rst-content code {
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }
}

/* ------ Ecosystem Figure Spacing ------ */
/* Equal vertical gap above and below the ecosystem diagram on the index
 * page. Uses margin (gap between boxes), not padding (inside the figure).
 * Scoped via :figclass: ecosystem-figure so other figures are untouched.
 * Covers both docutils outputs: <figure class="..."> and the legacy
 * <div class="figure ...">. */
.rst-content figure.ecosystem-figure,
.rst-content .figure.ecosystem-figure {
    margin-top: 24px;
    margin-bottom: 24px;
}

/* ------ Unreleased development-version banner ------ */
/* Rendered by _templates/layout.html on every page of a non-tag build (the
 * "latest" branch build, a PR preview, or a local build). Sits above the page
 * body, so it must not inherit the indentation the theme gives admonitions
 * nested in content. */
.rst-content .aa-dev-banner,
.aa-dev-banner {
    margin: 0 0 24px 0;
}
