/* RoadCube Public API docs */

body.page-apple.api-docs-page {
    background: #f5f5f7;
}

body.page-apple.api-docs-page .api-hero {
    text-align: left;
    padding: 56px 0 8px;
}

body.page-apple.api-docs-page .api-hero .ap-hero-kicker,
body.page-apple.api-docs-page .api-hero h1 {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

body.page-apple.api-docs-page .api-hero h1 {
    max-width: 14ch;
    font-size: clamp(48px, 6vw, 68px);
}

body.page-apple.api-docs-page .api-hero .ap-hero-lead {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: 38rem;
    font-size: 19px;
}

.api-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 18px;
}

.api-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 980px;
    padding: 7px 8px 7px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    font-size: 13px;
    color: #1d1d1f;
}

.api-meta-chip code {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    background: #f5f5f7;
    border-radius: 980px;
    padding: 4px 8px;
    color: #1d1d1f;
}

.api-meta-label {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6e6e73;
}

.api-inline-copy,
.api-copy-btn {
    border: 0;
    background: #f5f5f7;
    color: #1d1d1f;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    border-radius: 980px;
    padding: 5px 10px;
    cursor: pointer;
}

.api-inline-copy:hover,
.api-copy-btn:hover { background: #e8e8ed; }
.api-copy-btn.is-copied,
.api-inline-copy.is-copied { background: #1d1d1f; color: #fff; }

.api-search {
    position: relative;
    max-width: 520px;
    margin-top: 6px;
}

.api-search-input {
    width: 100%;
    height: 48px;
    border-radius: 14px !important;
    padding: 0 16px 0 42px !important;
    font-size: 15px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.api-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6e6e73;
    pointer-events: none;
}

.api-docs-layout { padding: 28px 0 72px; }

body.page-apple.api-docs-page .api-docs-container {
    width: min(1240px, calc(100% - 40px));
    max-width: 1240px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.api-sidebar { position: sticky; top: 68px; max-height: calc(100vh - 84px); }

.api-sidebar-inner {
    max-height: calc(100vh - 84px);
    overflow: auto;
    padding: 14px 8px 18px 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.api-sidebar-inner::-webkit-scrollbar,
.api-pane pre::-webkit-scrollbar { width: 8px; height: 8px; }
.api-sidebar-inner::-webkit-scrollbar-thumb,
.api-pane pre::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.18); border-radius: 99px; }

.api-toc-top { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }

.api-toc-link,
.api-toc-group-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #1d1d1f;
    font: inherit;
    font-size: 13px;
    line-height: 1.3;
    border-radius: 10px;
    padding: 7px 8px;
    cursor: pointer;
    text-decoration: none;
}

.api-toc-link:hover,
.api-toc-group-btn:hover { background: #f5f5f7; }
.api-toc-link.is-active { background: #f2f7fd; color: #0071e3; }
.api-toc-link-main { font-weight: 560; }

.api-toc-group { margin-top: 4px; }
.api-toc-group-btn { font-weight: 600; justify-content: space-between; }
.api-toc-count {
    font-size: 11px;
    font-weight: 500;
    color: #6e6e73;
    background: #f5f5f7;
    border-radius: 980px;
    padding: 1px 7px;
}
.api-toc-links { display: flex; flex-direction: column; padding: 0 0 6px 4px; }
.api-toc-group.is-collapsed .api-toc-links { display: none; }
.api-toc-method {
    flex: 0 0 auto;
    width: 38px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.api-toc-link .api-method-get { color: #1a7f37; }
.api-toc-link .api-method-post { color: #0071e3; }
.api-toc-link .api-method-put { color: #b86e00; }
.api-toc-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-method-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: #86868b; }
.api-method-dot.api-method-get { background: #1a7f37; }
.api-method-dot.api-method-post { background: #0071e3; }
.api-method-dot.api-method-put { background: #c47d12; }

.api-toc-external {
    display: inline-flex;
    margin: 8px 8px 2px;
    font-size: 13px;
    color: #0071e3 !important;
}

.api-intro-card,
.api-endpoint {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 22px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    padding: 26px 26px 22px;
    margin-bottom: 16px;
}

.api-intro-card h2,
.api-group-title,
.api-endpoint-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #1d1d1f;
}

.api-endpoint-title { font-size: 22px; }
.api-intro-card > p,
.api-endpoint-desc,
.api-group-en {
    margin: 0 0 16px;
    color: #424245;
    font-size: 15px;
    line-height: 1.5;
}
.api-group-en { font-size: 13px; color: #6e6e73; margin-top: -2px; }

.api-group-header { padding: 18px 4px 10px; }
.api-group-title { font-size: 32px; }

.api-steps { display: grid; gap: 12px; margin-top: 8px; }
.api-step {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    align-items: start;
}
.api-step h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.api-step p { margin: 0; color: #424245; font-size: 14px; }
.api-step code,
.api-intro-card code,
.api-param-example code {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12.5px;
    background: #f5f5f7;
    border-radius: 6px;
    padding: 1px 6px;
    color: #1d1d1f;
}
.api-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1d1d1f;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
}

.api-warning {
    background: #fff8eb;
    border: 1px solid #f3ddb0;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 0 0 16px;
    font-size: 14px;
    color: #424245;
    line-height: 1.45;
}
.api-warning strong { color: #1d1d1f; }

.api-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 18px;
}
.api-filter-btn {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #1d1d1f;
    border-radius: 980px;
    padding: 7px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 560;
    cursor: pointer;
}
.api-filter-btn.active { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }

.api-no-results {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    color: #6e6e73;
}

.api-endpoint-route {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    min-width: 0;
}
.api-method {
    flex: 0 0 auto;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 8px;
    padding: 4px 8px;
}
.api-method-get { background: #e7f6ec; color: #137333; }
.api-method-post { background: #e8f2fc; color: #0071e3; }
.api-method-put { background: #fff4e0; color: #9a6200; }
.api-path {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 13.5px;
    background: #f5f5f7;
    border-radius: 8px;
    padding: 5px 8px;
    overflow-wrap: anywhere;
    color: #1d1d1f;
}

.api-subsection-title {
    margin: 18px 0 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #6e6e73;
}
.api-status {
    display: inline-flex;
    margin-left: 6px;
    background: #e7f6ec;
    color: #137333;
    border-radius: 980px;
    padding: 1px 8px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
}

.api-table-wrap { overflow-x: auto; margin-bottom: 8px; }
.api-params-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.api-params-table th {
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6e6e73;
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.api-params-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: top;
    color: #424245;
    line-height: 1.45;
}
.api-param-name {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    background: #f5f5f7;
    border-radius: 6px;
    padding: 2px 6px;
    color: #1d1d1f;
}
.api-param-type {
    display: inline-block;
    margin-left: 6px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    color: #0071e3;
}
.api-param-required { color: #c2410c; font-size: 12px; font-weight: 600; }
.api-param-optional { color: #6e6e73; font-size: 12px; }
.api-param-example { display: block; margin-top: 4px; color: #6e6e73; font-size: 12px; }

.api-endpoint.has-examples {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    column-gap: 22px;
    align-items: start;
}
.api-endpoint.has-examples .api-endpoint-header,
.api-endpoint.has-examples .api-endpoint-body { grid-column: 1; min-width: 0; }
.api-endpoint.has-examples .api-examples {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 72px;
    min-width: 0;
}

.api-examples-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6e6e73;
}

.api-code,
.api-playground {
    background: #1c1c1e;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    margin: 0 0 14px;
}

.api-code-header,
.api-playground-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px 8px 12px;
    background: #2c2c2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-apple.api-docs-page .api-code-label {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #aeaeb2 !important;
    -webkit-text-fill-color: #aeaeb2 !important;
}

.api-endpoint[hidden],
.api-group[hidden],
.api-toc-link[hidden],
.api-toc-group[hidden] { display: none !important; }

.api-code .api-copy-btn,
.api-playground .api-copy-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f7;
}
.api-code .api-copy-btn:hover,
.api-playground .api-copy-btn:hover { background: rgba(255, 255, 255, 0.16); }
.api-code .api-copy-btn.is-copied,
.api-playground .api-copy-btn.is-copied { background: #30d158; color: #052e12; }

.api-lang-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}
.api-lang-tabs button {
    border: 0;
    background: transparent;
    color: #aeaeb2;
    font: inherit;
    font-size: 12px;
    font-weight: 560;
    border-radius: 8px;
    padding: 5px 8px;
    cursor: pointer;
}
.api-lang-tabs button.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

body.page-apple.api-docs-page .api-playground > .api-pane,
body.page-apple.api-docs-page .api-playground > [data-pane] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

body.page-apple.api-docs-page .api-playground > .api-pane.is-active,
body.page-apple.api-docs-page .api-playground > [data-pane].is-active {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
}

.api-code pre,
.api-pane pre {
    margin: 0;
    padding: 16px 16px 18px;
    overflow: auto;
    max-height: 460px;
    background: transparent;
}

body.page-apple.api-docs-page .api-code code,
body.page-apple.api-docs-page .api-pane code {
    display: block;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
    font-size: 12.5px;
    line-height: 1.65;
    color: #f5f5f7 !important;
    -webkit-text-fill-color: #f5f5f7 !important;
    background: transparent !important;
    white-space: pre-wrap;
    word-break: break-word;
    tab-size: 2;
}

body.page-apple.api-docs-page .tok-key { color: #8ec8ff !important; -webkit-text-fill-color: #8ec8ff !important; }
body.page-apple.api-docs-page .tok-str { color: #b6f2c8 !important; -webkit-text-fill-color: #b6f2c8 !important; }
body.page-apple.api-docs-page .tok-num { color: #ffd28a !important; -webkit-text-fill-color: #ffd28a !important; }
body.page-apple.api-docs-page .tok-kw { color: #ffb4a8 !important; -webkit-text-fill-color: #ffb4a8 !important; }
body.page-apple.api-docs-page .tok-flag { color: #d4c4ff !important; -webkit-text-fill-color: #d4c4ff !important; }
body.page-apple.api-docs-page .tok-cmt { color: #8e8e93 !important; -webkit-text-fill-color: #8e8e93 !important; }

.api-help-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }

.api-toc-mobile-btn {
    display: none;
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 75;
    border: 0;
    background: #1d1d1f;
    color: #fff;
    border-radius: 980px;
    padding: 12px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

@media (max-width: 980px) {
    body.page-apple.api-docs-page .api-docs-container {
        grid-template-columns: 1fr;
        width: min(100% - 28px, 1240px);
    }
    .api-sidebar {
        position: fixed;
        inset: 52px 0 0 0;
        z-index: 80;
        max-height: none;
        background: rgba(0, 0, 0, 0.35);
        display: none;
    }
    body.api-nav-open .api-sidebar { display: block; }
    .api-sidebar-inner {
        width: min(340px, 88vw);
        height: 100%;
        max-height: none;
        border-radius: 0 18px 18px 0;
    }
    .api-endpoint.has-examples { grid-template-columns: 1fr; }
    .api-endpoint.has-examples .api-examples {
        grid-column: 1;
        grid-row: auto;
        position: static;
        margin-top: 8px;
    }
    .api-toc-mobile-btn { display: inline-flex; }
    body.page-apple.api-docs-page { padding-bottom: 84px; }
}

@media (max-width: 640px) {
    .api-intro-card,
    .api-endpoint { padding: 18px 14px 16px; border-radius: 18px; }
    .api-endpoint-route { flex-wrap: wrap; }
    .api-lang-tabs button { padding: 5px 6px; font-size: 11px; }
}
