/* API reference page. The other pages are fixed-height editors with their own
   scroll areas; this one scrolls as a document, with the header kept on top. */

body.api-docs {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: auto;
    background: #fff;
}

body.api-docs > header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Scalar's sticky sidebar starts below our header. */
body.api-docs {
    --scalar-custom-header-height: 48px;
    --scalar-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --scalar-font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.light-mode {
    --scalar-color-accent: #4f84c4;
}

.api-fallback {
    max-width: 640px;
    margin: 48px auto;
    padding: 0 16px;
    font-size: 15px;
    line-height: 1.5;
}

.api-fallback a { color: #4f84c4; }

/* Phones: five tabs do not fit next to the logo; drop the wordmark and let
   the tabs scroll instead of widening the page. */
@media (max-width: 700px) {
    body.api-docs > header { gap: 12px; }
    body.api-docs > header h1 { display: none; }
    body.api-docs .nav-tabs {
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }
    body.api-docs .nav-tab { padding: 0 10px; }
}
