/* Style Python API subpackage/submodule lists to match C++ autosummary cards */
.content section#subpackages .toctree-wrapper,
.content section#submodules .toctree-wrapper,
.content section[id^="module-"] .toctree-wrapper {
    border: 1px solid var(--toc-border, #e1e4e5);
    border-radius: 4px;
    background-color: #fff;
    margin: 24px 0;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Reset list styling so items render like autosummary rows */
.content section#subpackages .toctree-wrapper ul,
.content section#submodules .toctree-wrapper ul,
.content section[id^="module-"] .toctree-wrapper ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content section#subpackages .toctree-wrapper li,
.content section#submodules .toctree-wrapper li,
.content section[id^="module-"] .toctree-wrapper li {
    margin: 0;
    border-bottom: 1px solid #f1f1f1;
}

.content section#subpackages .toctree-wrapper li:last-child,
.content section#submodules .toctree-wrapper li:last-child,
.content section[id^="module-"] .toctree-wrapper li:last-child {
    border-bottom: none;
}

/* Alternate row background for readability */
.content section#subpackages .toctree-wrapper li:nth-child(even),
.content section#submodules .toctree-wrapper li:nth-child(even),
.content section[id^="module-"] .toctree-wrapper li:nth-child(even) {
    background-color: #f9f9f9;
}

.content section#subpackages .toctree-wrapper li > ul,
.content section#submodules .toctree-wrapper li > ul,
.content section[id^="module-"] .toctree-wrapper li > ul {
    background-color: inherit;
}

.content section#subpackages .toctree-wrapper li.toctree-l1 > ul > li,
.content section#submodules .toctree-wrapper li.toctree-l1 > ul > li,
.content section[id^="module-"] .toctree-wrapper li.toctree-l1 > ul > li {
    background-color: #fff;
}

.content section#subpackages .toctree-wrapper li.toctree-l1 > ul > li:nth-child(odd),
.content section#submodules .toctree-wrapper li.toctree-l1 > ul > li:nth-child(odd),
.content section[id^="module-"] .toctree-wrapper li.toctree-l1 > ul > li:nth-child(odd) {
    background-color: #f9f9f9;
}

.content section#subpackages .toctree-wrapper li.toctree-l1 > ul > li:nth-child(even),
.content section#submodules .toctree-wrapper li.toctree-l1 > ul > li:nth-child(even),
.content section[id^="module-"] .toctree-wrapper li.toctree-l1 > ul > li:nth-child(even) {
    background-color: #fff;
}

/* Main link styling */
.content section#subpackages .toctree-wrapper a,
.content section#submodules .toctree-wrapper a,
.content section[id^="module-"] .toctree-wrapper a {
    display: block;
    padding: 8px 14px;
    background-color: inherit;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.content section#subpackages .toctree-wrapper a:hover,
.content section#submodules .toctree-wrapper a:hover,
.content section[id^="module-"] .toctree-wrapper a:hover {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* Python landing page (`ouster.sdk`) subpackages should read like API refs. */
body[data-page-name$="python/api_python/ouster.sdk"] .content section#subpackages .toctree-wrapper li.toctree-l1 > a,
body[data-page-name$="python/api_python/ouster.sdk"] .content section#subpackages .toctree-wrapper li.toctree-l1 > a.reference.internal {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.86rem;
    line-height: 1.45;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    margin: 6px 10px;
    padding: 0.35em 0.55em;
}

body[data-page-name$="python/api_python/ouster.sdk"] .content section#subpackages .toctree-wrapper li.toctree-l1 > a,
body[data-page-name$="python/api_python/ouster.sdk"] .content section#subpackages .toctree-wrapper li.toctree-l1 > a.reference.internal,
body[data-page-name$="python/api_python/ouster.sdk"] .content section#subpackages .toctree-wrapper li.toctree-l1 > a .pre {
    text-decoration: underline;
    text-decoration-color: currentColor;
}

body[data-page-name$="python/api_python/ouster.sdk"] .content section#subpackages .toctree-wrapper li.toctree-l1 > a:hover,
body[data-page-name$="python/api_python/ouster.sdk"] .content section#subpackages .toctree-wrapper li.toctree-l1 > a.reference.internal:hover {
    background-color: #eef4ff;
    border-color: #d3e0ff;
    color: #1f4fa0;
}

/* Indentation for nested levels */
.content section#subpackages .toctree-wrapper ul ul a,
.content section#submodules .toctree-wrapper ul ul a,
.content section[id^="module-"] .toctree-wrapper ul ul a {
    padding-left: 32px;
}

.content section#subpackages .toctree-wrapper ul ul ul a,
.content section#submodules .toctree-wrapper ul ul ul a,
.content section[id^="module-"] .toctree-wrapper ul ul ul a {
    padding-left: 50px;
}

.content section#subpackages .toctree-wrapper ul ul ul ul a,
.content section#submodules .toctree-wrapper ul ul ul ul a,
.content section[id^="module-"] .toctree-wrapper ul ul ul ul a {
    padding-left: 68px;
}

.content section#subpackages .toctree-wrapper li.toctree-l3 > ul > li,
.content section#submodules .toctree-wrapper li.toctree-l3 > ul > li,
.content section[id^="module-"] .toctree-wrapper li.toctree-l3 > ul > li {
    background-color: #fff;
}

.content section#subpackages .toctree-wrapper li.toctree-l3 > ul > li:nth-child(odd),
.content section#submodules .toctree-wrapper li.toctree-l3 > ul > li:nth-child(odd),
.content section[id^="module-"] .toctree-wrapper li.toctree-l3 > ul > li:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Code blocks inside links should match autosummary code badges */
.content section#subpackages .toctree-wrapper code,
.content section#submodules .toctree-wrapper code,
.content section[id^="module-"] .toctree-wrapper code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    color: #2c3e50;
    font-size: 13px;
    padding: 0.2em 0.4em;
    white-space: normal;
}

/* Keep the bullet triangles hidden when collapsible JS runs */
.content section#subpackages .toctree-wrapper .toctree-expand,
.content section#submodules .toctree-wrapper .toctree-expand,
.content section[id^="module-"] .toctree-wrapper .toctree-expand {
    display: none;
}

/* ------------------------------------------------------------------
 * Python package landing summaries (#classes, #functions, #submodules)
 * Match C++ namespace autosummary table styling.
 * ------------------------------------------------------------------ */
body[data-page-name^="python/api_python/"] .content section#classes > ul.simple,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple,
body[data-page-name^="_modules/"] .content section#classes > ul.simple,
body[data-page-name^="_modules/"] .content section#functions > ul.simple,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple {
    border: 1px solid var(--toc-border, #e1e4e5);
    border-radius: 4px;
    background-color: #fff;
    margin: 24px 0;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    list-style: none;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li,
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li,
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li {
    margin: 0;
    border-bottom: 1px solid #f1f1f1;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li:last-child,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li:last-child,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li:last-child,
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li:last-child,
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li:last-child,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li:last-child {
    border-bottom: none;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li:nth-child(even),
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li:nth-child(even),
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li:nth-child(even),
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li:nth-child(even),
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li:nth-child(even),
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li:nth-child(even) {
    background-color: #f9f9f9;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li:nth-child(odd),
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li:nth-child(odd),
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li:nth-child(odd),
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li:nth-child(odd),
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li:nth-child(odd),
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li:nth-child(odd) {
    background-color: #fff;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li > p,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li > p,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li > p,
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li > p,
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li > p,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li > p {
    margin: 0;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li > p > a,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li > p > a,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li > p > a,
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li > p > a,
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li > p > a,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li > p > a {
    display: block;
    padding: 8px 14px;
    background-color: inherit;
    text-decoration: underline;
    color: inherit;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Preserve underline when link text is wrapped in code/span.pre. */
body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li > p > a code,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li > p > a code,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li > p > a code,
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li > p > a code,
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li > p > a code,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li > p > a code,
body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li > p > a .pre,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li > p > a .pre,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li > p > a .pre,
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li > p > a .pre,
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li > p > a .pre,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li > p > a .pre {
    text-decoration: inherit;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple > li > p > a:hover,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple > li > p > a:hover,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple > li > p > a:hover,
body[data-page-name^="_modules/"] .content section#classes > ul.simple > li > p > a:hover,
body[data-page-name^="_modules/"] .content section#functions > ul.simple > li > p > a:hover,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple > li > p > a:hover {
    background-color: #e3f2fd;
    color: #1565c0;
}

body[data-page-name^="python/api_python/"] .content section#classes > ul.simple code,
body[data-page-name^="python/api_python/"] .content section#functions > ul.simple code,
body[data-page-name^="python/api_python/"] .content section#submodules > ul.simple code,
body[data-page-name^="_modules/"] .content section#classes > ul.simple code,
body[data-page-name^="_modules/"] .content section#functions > ul.simple code,
body[data-page-name^="_modules/"] .content section#submodules > ul.simple code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    color: #2c3e50;
    font-size: 13px;
    padding: 0.2em 0.4em;
    white-space: normal;
}
