.logo__image {
    transform: scale(.7);
}

/* Show the primary sidebar on the landing page (override hide-on-wide) */
.bd-sidebar-primary.hide-on-wide {
    display: flex !important;
}

/* Sidebar navigation hover styles - gray background only (light mode) */
html[data-theme="light"] .bd-sidebar-primary .toctree-l1 > a:hover,
html[data-theme="light"] .bd-sidebar-primary .toctree-l2 > a:hover,
html[data-theme="light"] .bd-sidebar-primary .toctree-l3 > a:hover,
html[data-theme="light"] .bd-sidebar-primary nav.bd-links a:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-radius: 8px !important;
    color: inherit !important;
    text-decoration: none !important;
}

/* Sidebar navigation hover styles (dark mode) */
html[data-theme="dark"] .bd-sidebar-primary .toctree-l1 > a:hover,
html[data-theme="dark"] .bd-sidebar-primary .toctree-l2 > a:hover,
html[data-theme="dark"] .bd-sidebar-primary .toctree-l3 > a:hover,
html[data-theme="dark"] .bd-sidebar-primary nav.bd-links a:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    color: inherit !important;
    text-decoration: none !important;
}

/* Active/current page styling (light mode) */
html[data-theme="light"] .bd-sidebar-primary .toctree-l1.current.active > a,
html[data-theme="light"] .bd-sidebar-primary .toctree-l2.current > a,
html[data-theme="light"] .bd-sidebar-primary li.current.active > a.reference.internal {
    background-color: rgba(0, 0, 0, 0.06) !important;
    border-radius: 8px !important;
    border-left: none !important;
    color: inherit !important;
}

/* Active/current page styling (dark mode) */
html[data-theme="dark"] .bd-sidebar-primary .toctree-l1.current.active > a,
html[data-theme="dark"] .bd-sidebar-primary .toctree-l2.current > a,
html[data-theme="dark"] .bd-sidebar-primary li.current.active > a.reference.internal {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    border-left: none !important;
    color: inherit !important;
}

/* Override default link colors in sidebar */
.bd-sidebar-primary nav.bd-links a,
.bd-sidebar-primary nav.bd-links a:visited,
.bd-sidebar-primary nav.bd-links a:active,
.bd-sidebar-primary nav.bd-links a:focus {
    color: var(--pst-color-text-base) !important;
    text-decoration: none !important;
    border-left: none !important;
}

.bd-sidebar-primary nav.bd-links a:hover {
    color: var(--pst-color-text-base) !important;
    text-decoration: none !important;
}

/* Remove blue left border (box-shadow) from expanded/active sections */
nav.bd-links .current > a,
nav.bd-links .current > a:focus-visible {
    box-shadow: none !important;
    border-left: none !important;
    color: inherit !important;
    font-weight: inherit !important;
}

/* Light mode color overrides */
:root,
html:not([data-theme]),
html[data-theme="light"] {
    --pst-color-table-row-zebra-high-bg: #fff !important;
    --pst-color-table-row-zebra-low-bg: #f5f5f5 !important;
    --pst-color-table-heading-bg: #f0f0f0 !important;
    --pst-color-table-row-hover-bg: #e8e8e8 !important;
    --pst-color-secondary: #666 !important;
    --pst-color-secondary-bg: #f0f0f0 !important;
    --pst-color-surface: #fcfcfc !important;
    --pst-color-text-muted: #6e6e80 !important;
    --pst-color-inline-code: #9a4a4a !important;
    --pst-color-blockquote-notch: #6e6e80 !important;
}

/* Dark mode color overrides */
html[data-theme="dark"] {
    --pst-color-table-row-zebra-high-bg: #1e1e1e !important;
    --pst-color-table-row-zebra-low-bg: #2a2a2a !important;
    --pst-color-table-heading-bg: #333 !important;
    --pst-color-table-row-hover-bg: #3a3a3a !important;
    --pst-color-secondary: #aaa !important;
    --pst-color-secondary-bg: #333 !important;
    --pst-color-surface: #1e1e1e !important;
    --pst-color-text-muted: #9ca4af !important;
    --pst-color-inline-code: #e8a0a0 !important;
    --pst-color-blockquote-notch: #9ca4af !important;
}

/* Class/function names in API docs */
html[data-theme="light"] .sig-name {
    color: #005B82 !important;
}

html[data-theme="dark"] .sig-name {
    color: #6db3d0 !important;
}

/* Syntax highlighting - literals/numbers use blue-brown for color blindness accessibility */
html[data-theme="light"] .highlight .l,
html[data-theme="light"] .highlight .m,
html[data-theme="light"] .highlight .mb,
html[data-theme="light"] .highlight .mf,
html[data-theme="light"] .highlight .mh,
html[data-theme="light"] .highlight .mi,
html[data-theme="light"] .highlight .mo,
html[data-theme="light"] .highlight .il,
html[data-theme="light"] .highlight .ld,
html[data-theme="light"] .highlight .kt {
    color: #6B5B3D !important;
}

/* Code block border radius */
div.literal-block-wrapper,
div.highlight,
div[class*=highlight-] {
    border-radius: 8px !important;
}

div.literal-block-wrapper div[class*=highlight-] pre,
pre {
    border-radius: 8px !important;
}

/* Direct table styling override (light mode) */
html[data-theme="light"] .table tbody tr:nth-child(odd) {
    background-color: #f5f5f5 !important;
}

html[data-theme="light"] .table tbody tr:nth-child(2n) {
    background-color: #fff !important;
}

html[data-theme="light"] .table thead tr {
    background-color: #f0f0f0 !important;
    border-bottom: 2px solid #ccc !important;
}

html[data-theme="light"] .table tbody tr:hover {
    background-color: #e8e8e8 !important;
}

/* Direct table styling override (dark mode) */
html[data-theme="dark"] .table tbody tr:nth-child(odd) {
    background-color: #2a2a2a !important;
}

html[data-theme="dark"] .table tbody tr:nth-child(2n) {
    background-color: #1e1e1e !important;
}

html[data-theme="dark"] .table thead tr {
    background-color: #333 !important;
    border-bottom: 2px solid #555 !important;
}

html[data-theme="dark"] .table tbody tr:hover {
    background-color: #3a3a3a !important;
}

/* Right sidebar TOC active item - Redis red */
.toc-entry a.nav-link.active {
    box-shadow: inset 1px 0 0 #DC382D !important;
    color: #DC382D !important;
    font-weight: normal !important;
}

/* Right sidebar TOC hover - no underline, subtle color change */
.toc-entry a.nav-link:hover,
.toc-entry a.nav-link.active:hover {
    text-decoration: none !important;
    color: #DC382D !important;
}

/* -- Version switcher ------------------------------------------------------ */
.version-switcher {
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid var(--pst-color-border);
    margin-top: 0.5rem;
}

.version-switcher h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pst-color-text-muted);
    margin: 0.5rem 0 0.4rem;
}

.version-switcher select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--pst-color-border);
    border-radius: 6px;
    background-color: var(--pst-color-surface);
    color: var(--pst-color-text-base);
    cursor: pointer;
    appearance: auto;
}

.version-switcher select:hover {
    border-color: var(--pst-color-text-muted);
}

.version-switcher select:focus {
    outline: 2px solid #DC382D;
    outline-offset: 1px;
}
