/* ===== 开放 API 开发者文档 — 移动端 ===== */

.oad-page {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    min-height: calc(100vh - 48px);
    background: var(--bg-light);
}

/* ── 概览 ── */
.oad-overview {
    background: var(--bg-white);
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.oad-title {
    font-size: 18px;
    font-weight: 600;
    color: #1D2129;
    margin: 0;
    line-height: 1.35;
}

/* ── 吸底创建 Key（全页唯一主按钮） ── */
.oad-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.oad-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: var(--primary-color);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.oad-cta:active {
    background: var(--primary-dark);
}

/* ── Sticky 锚点：复用 .chart-type-links / .chart-type-link，仅补 sticky 与横滑 ── */
.oad-mobnav {
    position: sticky;
    top: var(--header-height, 48px);
    z-index: 20;
    padding-left: 12px;
    padding-right: 12px;
    background: var(--bg-white);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.oad-mobnav::-webkit-scrollbar {
    display: none;
}

.oad-mobnav .chart-type-link {
    text-decoration: none;
}

.oad-mobnav .chart-type-link.active {
    font-weight: 600;
}

/* ── 内容区块 ── */
.oad-main {
    padding: 0;
}

.oad-sec {
    scroll-margin-top: 100px;
}

/* 全屏铺满：去左右边框与圆角，块间以浅底背景分隔 */
.oad-block {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 14px 16px;
    margin-bottom: 10px;
}

.oad-h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1D2129;
    margin: 0 0 12px;
}

.oad-h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1D2129;
    margin: 14px 0 8px;
}

.oad-block p,
.oad-block li {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.75;
    margin: 6px 0;
}

.oad-block code {
    color: #BA2A20;
    border-radius: var(--border-radius-sm);
    padding: 1px 5px;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
    word-break: break-all;
}

/* ── 快速开始步骤 ── */
.oad-step {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.oad-step:last-child {
    border-bottom: none;
}

.oad-step-n {
    flex: 0 0 26px;
    font-size: 24px;
    font-weight: 600;
    color: #C9CDD4;
    line-height: 1;
    font-family: var(--font-ui);
}

.oad-step-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1D2129;
    margin: 0 0 4px;
}

.oad-step-body p {
    margin: 0 0 6px;
}

.oad-step-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    font-size: 13px;
    color: var(--color-link);
    text-decoration: none;
}

.oad-step-link:active {
    color: var(--primary-color);
}

/* ── 接入方式 Tab：复用全站切换器 .chart-type-links / .chart-type-link（见 UI 规范 §14/§17.3），仅补一处底部间距 ── */
.oad-tabs {
    margin-bottom: 12px;
}

.oad-panel {
    display: none;
}

.oad-panel.active {
    display: block;
}

.oad-btn-dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: var(--primary-color);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.oad-btn-dl:active {
    background: var(--primary-dark);
}

/* ── 折叠 ── */
.oad-collapse {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-white);
    margin-bottom: 8px;
}

.oad-collapse-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.oad-collapse-hd:active {
    background: var(--bg-gray-th-2);
}

.oad-collapse-hd h3,
.oad-collapse-hd h2 {
    margin: 0;
    font-size: 14px;
    color: #1D2129;
    flex: 1;
    min-width: 0;
}

.oad-collapse-hd .oad-ep-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.oad-collapse-hd .iconfont {
    font-size: 12px;
    color: var(--text-light);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.oad-collapse.open > .oad-collapse-hd .iconfont {
    transform: rotate(180deg);
}

.oad-collapse-bd {
    display: none;
    padding: 0 12px 12px;
    border-top: 1px solid var(--border-color);
}

.oad-collapse.open > .oad-collapse-bd {
    display: block;
}

.oad-collapse-bd > p:first-child {
    margin-top: 12px;
}

/* ── 代码块 ── */
.oad-code {
    position: relative;
    background: var(--bg-gray-th-2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 14px;
    padding-right: 58px;
    font-size: 12px;
    line-height: 1.65;
    overflow-x: auto;
    margin: 8px 0 12px;
    white-space: pre;
    font-family: Consolas, Monaco, monospace;
    color: #2D3748;
    -webkit-overflow-scrolling: touch;
}

.oad-copy {
    position: absolute;
    top: 6px;
    right: 6px;
    min-height: 28px;
    min-width: 40px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 2px 8px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.oad-copy:active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ── 接口徽章 ── */
.oad-method {
    font-size: 11px;
    font-weight: 600;
    color: #0A7C4E;
    border-radius: var(--border-radius-sm);
    padding: 2px 6px;
    font-family: var(--font-ui);
    flex-shrink: 0;
}

.oad-ep-path {
    font-size: 12px;
    font-weight: 600;
    color: #1D2129;
    font-family: Consolas, Monaco, monospace;
    word-break: break-all;
}

.oad-badge-free {
    font-size: 11px;
    color: #0A7C4E;
    border-radius: var(--border-radius-sm);
    padding: 2px 7px;
    flex-shrink: 0;
}

.oad-badge-paid {
    font-size: 11px;
    color: #BA2A20;
    border-radius: var(--border-radius-sm);
    padding: 2px 7px;
    flex-shrink: 0;
}

.oad-scroll {
    overflow-x: auto;
    margin: 8px 0 12px;
    -webkit-overflow-scrolling: touch;
}

.oad-scroll .data-table {
    min-width: 280px;
}

.oad-tip {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    font-size: 12px;
    color: #92400E;
    margin: 10px 0 0;
    line-height: 1.7;
}
