/* Style djangodocs console tabs using pydata-sphinx-theme design tokens. This
 * may be loaded before console-tabs.css, so must have higher specificity to
 * override default values from there.
 */
html .console-block {
    --tab-gap: 0.375rem;
    --tab-padding-block: 0.25em;
    --tab-padding-inline: 0.5em;
    --tab-label-size: var(--pst-font-size-milli);
    --tab-label-color: var(--pst-color-text-muted);
    --tab-border-radius: var(--bs-border-radius);
    --tab-border-color: var(--pst-color-border-muted);
    --tab-active-label-color: var(--pst-color-text-base);
    --tab-active-border-color: var(--pst-color-border);
    --tab-active-highlight-color: var(--pst-color-primary);
    --tab-focus-outline: var(--bs-focus-ring-width) solid
        var(--bs-focus-ring-color);

    /* Adapt pydata-sphinx-theme's code blocks for console tabs. */
    section {
        div.highlight,
        div.highlight-console,
        div.highlight-doscon,
        pre {
            margin-block-start: 0;
            border-start-end-radius: 0;
        }
    }
}

/* Keep Read the Docs' preview widgets from covering header and footer. */
body:has(readthedocs-filetreediff:not([hidden])) .bd-header {
    padding-block-start: 2rem;
}
body:has(readthedocs-flyout:not([hidden])) .bd-footer {
    padding-block-end: 6rem;
}
