/* /api-docs: reference layout on top of the guides.css article styles. */
.tb-api-docs {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    max-width: 1180px;
}

.tb-api-docs__toc {
    position: sticky;
    top: 90px;
    font-size: 0.9rem;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.tb-api-docs__toc-title {
    margin: 0 0 8px;
    font-weight: 700;
}

.tb-api-docs__toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tb-api-docs__toc li {
    margin: 0 0 6px;
}

.tb-api-docs__toc-l3 {
    padding-left: 14px;
    font-size: 0.85rem;
}

.tb-api-docs__toc a {
    color: var(--tb-primary, #235F67);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tb-api-docs__toc a:hover {
    text-decoration: underline;
}

.tb-api-docs__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 0 0 20px;
}

.tb-api-docs__actions .tb-api-docs__note {
    margin: 0;
}

.tb-api-docs__body pre {
    background: #0f1f24;
    color: #e8f1f2;
    border-radius: 12px;
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.5;
    margin: 0 0 16px;
}

.tb-api-docs__body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.tb-api-docs__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
}

.tb-api-docs__body th,
.tb-api-docs__body td {
    border: 1px solid var(--landing-border, #e3e8ef);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.tb-api-docs__body th {
    background: rgba(35, 95, 103, 0.06);
}

.tb-api-docs__body h2 {
    margin-top: 36px;
    scroll-margin-top: 90px;
}

.tb-api-docs__body h3 {
    margin-top: 26px;
    scroll-margin-top: 90px;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .tb-api-docs {
        grid-template-columns: minmax(0, 1fr);
    }

    .tb-api-docs__toc {
        position: static;
        max-height: none;
    }
}
