/* Shared documentation UI styles used by both documentation sites. */

:root {
    --bg: #f7f8fa;
    --panel: #fff;
    --text: #18212f;
    --muted: #667085;
    --line: #e5e7eb;
    --brand: #165dff;
    --brand2: #0b4ad9;
    --code: #111827;
    --codeText: #e5e7eb;
    --green: #087443;
    --shadow: 0 8px 28px rgba(16,24,40,.06)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif
}

.topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none
}

    .brand small, .brand b {
        display: block
    }

    .brand small {
        color: var(--muted);
        font-size: 11px
    }

.logo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand);
    color: white;
    font-weight: 800
}

#siteTitle {
    font-size: 12px;
    color: var(--muted);
    margin-left: 26px;
}

.top-actions {
    display: flex;
    gap: 12px;
    align-items: center
}

#headerUrl {
    font-size: 12px;
    color: var(--muted)
}

button {
    border: 0;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    padding: 9px 13px;
    font-weight: 650;
    cursor: pointer
}

    button:hover {
        background: var(--brand2)
    }

    button.ghost {
        background: #fff;
        color: var(--text);
        border: 1px solid var(--line)
    }

        button.ghost:hover {
            background: #f4f6f8
        }

.layout {
    display: grid;
    grid-template-columns: 270px minmax(0,1fr);
    max-width: 1500px;
    margin: auto
}

.sidebar {
    min-height: calc(100vh - 64px);
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    background: #fbfcfd
}

.search-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--line);
    background: white;
    border-radius: 8px;
    padding: 0 10px;
    margin-bottom: 18px
}

    .search-wrap input {
        border: 0;
        outline: 0;
        width: 100%;
        padding: 10px 0;
        background: transparent
    }

.nav {
    display: flex;
    width: 100%;
    justify-content: space-between;
    text-align: left;
    background: transparent;
    color: #475467;
    margin: 2px 0;
    padding: 9px 10px
}

    .nav:hover {
        background: #eef4ff;
        color: var(--brand)
    }

    .nav.active {
        background: #eaf1ff;
        color: var(--brand)
    }

    .nav em {
        font-style: normal;
        font-size: 11px;
        color: #98a2b3
    }

.side-note {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding: 18px 10px;
    color: var(--muted)
}

    .side-note b, .side-note code, .side-note small {
        display: block
    }

    .side-note code {
        margin: 5px 0;
        color: var(--text)
    }

    .side-note small {
        font-size: 11px
    }

    .side-note code {
        font-size: 12px
    }

main {
    padding: 38px 52px 70px;
    min-width: 0
}

.hero {
    max-width: 900px;
    margin-bottom: 26px
}

.eyebrow {
    color: var(--brand);
    font-weight: 750;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em
}

.hero h1 {
    font-size: 38px;
    line-height: 1.15;
    margin: 7px 0 12px;
    letter-spacing: -.03em;
}

.hero p {
    font-size: 16px;
    color: var(--muted);
    max-width: 780px;
}

.cards {
    display: flex;
    gap: 15px;
}

.card {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    padding: 20px;
}

.card, .panel, .item {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow);
}

.stat {
    font-size: 30px;
    font-weight: 800;
}

.muted {
    color: var(--muted);
}

.panel {
    padding: 22px;
    margin-top: 16px
}

    .panel h2 {
        margin: 0 0 12px;
        font-size: 18px
    }

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.list {
    display: grid;
    gap: 8px
}

.item {
    padding: 15px 17px;
    cursor: pointer
}

    .item:hover {
        border-color: #bfd0ff;
        box-shadow: 0 8px 24px rgba(22,93,255,.08)
    }

    .item strong {
        font-size: 15px
    }

.tag, .required {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    background: #eef2f6;
    color: #475467;
    margin-left: 7px
}

.required {
    background: #fff0f0;
    color: #b42318
}

.detail-head {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px
}

.back {
    background: transparent;
    color: var(--muted);
    padding: 4px 0
}

    .back:hover {
        background: transparent;
        color: var(--brand)
    }

.op-title h1 {
    margin: 0;
    font-size: 30px
}

.method {
    font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
    color: #475467;
    font-size: 12px
}

.field {
    padding: 12px 0;
    border-bottom: 1px solid var(--line)
}

    .field:last-child {
        border: 0
    }

    .field b {
        font-family: ui-monospace,SFMono-Regular,Menlo,monospace
    }

.field-doc {
    display: block;
    color: var(--muted);
    margin-top: 3px
}

.type-link {
    display: inline-block;
    border: 0;
    background: #eef2f6;
    color: var(--brand);
    border-radius: 999px;
    padding: 2px 7px;
    margin-left: 7px;
    font: 700 11px ui-monospace, monospace;
    cursor: pointer;
}

    .type-link:hover {
        background: #eaf1ff;
        color: var(--brand2);
        text-decoration: underline;
    }

.code {
    position: relative;
    background: var(--code);
    color: var(--codeText);
    border-radius: 9px;
    padding: 17px;
    overflow: auto;
    font: 12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;
    min-height: 70px;
    max-height: 400px;
}

.code-toolbar {
    position: sticky;
    float: right;
    top: 5px;
    right: 5px;
    text-align: right;
}

.copy {
    margin: 0;
    width: auto;
    min-width: 0;
    height: auto;
    display: inline-block;
    background: #293242;
    color: #e5e7eb;
    border: 1px solid #414b5c;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.2;
    padding: 5px 8px;
    font-weight: 650;
}

    .copy:hover {
        background: #3b4658;
    }

.code-content {
    margin: 0;
    padding: 0;
    white-space: pre;
    font: inherit;
    line-height: inherit;
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px
}

    .tabs button {
        background: #eef2f6;
        color: #475467;
        font-size: 12px
    }

        .tabs button.active {
            background: var(--brand);
            color: white
        }


.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px
}


.empty {
    padding: 35px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 10px
}

.change {
    display: flex;
    gap: 18px;
    align-items: center
}

.version {
    font-weight: 800;
    font-size: 20px
}


@media(max-width:900px) {

    .layout {
        grid-template-columns: 1fr
    }

    .sidebar {
        position: static;
        height: auto;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    main {
        padding: 25px 18px
    }

    .cards, .grid {
        grid-template-columns: 1fr
    }

    .topbar {
        padding: 0 15px
    }

    #headerUrlContainer {
        display: none
    }
}

.member-row.clickable {
    cursor: pointer;
}

    .member-row.clickable:hover {
        background: #fbfcff;
    }

code {
    font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
}

.explorer-card {
    cursor: pointer;
}

    .explorer-card:hover {
        border-color: #bfd0ff;
        box-shadow: 0 8px 24px rgba(22,93,255,.08);
    }

.explorer-controls {
    display: grid;
    gap: 14px;
}

.explorer-select-row {
    display: grid;
    grid-template-columns: 70px minmax(0,1fr);
    gap: 12px;
    align-items: center;
}

    .explorer-select-row select {
        width: 100%;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        padding: 10px 12px;
        color: var(--text);
        font: 13px ui-monospace,SFMono-Regular,Menlo,monospace;
    }

.explorer-hint {
    font-size: 12px;
}

.member-results > .member-row:last-child {
    border-bottom: 0;
}

.nav-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 10px 6px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

    .nav-section-title em {
        font-style: normal;
        font-weight: 700;
    }

.api-nav {
    display: grid;
    gap: 2px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 2px;
}

.api-nav-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 7px;
    background: transparent;
    color: #475467;
    text-align: left;
    font-weight: 600;
}

    .api-nav-item span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .api-nav-item em {
        flex: 0 0 auto;
        color: #98a2b3;
        font-size: 10px;
        font-style: normal;
    }

    .api-nav-item:hover,
    .api-nav-item.active {
        background: #eaf1ff;
        color: var(--brand);
    }

.nav-loading {
    padding: 8px 10px;
    color: var(--muted);
    font-size: 12px;
}

.api-controls {
    padding-bottom: 16px;
}

.api-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(720px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 0 11px;
}

    .api-search-wrap span {
        color: #98a2b3;
    }

    .api-search-wrap input {
        width: 100%;
        padding: 11px 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--text);
    }

.member-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
}

.member-tab {
    background: #fff;
    border: 1px solid var(--line);
    color: #475467;
    padding: 7px 11px;
}

    .member-tab span {
        margin-left: 4px;
        color: #98a2b3;
        font-size: 11px;
    }

    .member-tab:hover,
    .member-tab.active {
        background: #eaf1ff;
        border-color: #bfd0ff;
        color: var(--brand);
    }

.results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

    .results-head h2 {
        margin-bottom: 0;
    }

.member-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.member-main {
    min-width: 0;
}

    .member-main.clickable {
        cursor: pointer;
    }

        .member-main.clickable:hover b {
            color: var(--brand);
        }

.member-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.field-doc,
.api-reference {
    display: block;
    margin-top: 4px;
}

.api-reference {
    color: var(--muted);
    font-size: 12px;
}

.inline-usage {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    min-width: 260px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    padding: 6px 7px 6px 10px;
}

    .inline-usage code {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #344054;
        font-size: 11px;
    }

.mini-copy {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding: 5px 8px;
    font-size: 10px;
    background: #fff;
    color: #475467;
    border: 1px solid var(--line);
}

    .mini-copy:hover {
        background: #eef4ff;
        color: var(--brand);
    }

@media(max-width:900px) {
    .explorer-select-row {
        grid-template-columns: 1fr;
    }

    .member-row {
        grid-template-columns: 1fr;
    }

    .inline-usage {
        max-width: 100%;
        min-width: 0;
    }
}
