/* ==========================================================================
   API DOCUMENTATION / CLIENT INTEGRATION GUIDE STYLING (Stripe / GitHub Style)
   ========================================================================== */

.api-docs-section {
    position: relative;
    background: #f8fafc;
}

.api-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
}

.api-sidebar__title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 16px;
    padding-left: 8px;
}

.api-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.api-nav__item {
    margin-bottom: 4px;
}

.api-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}

.api-nav__link i {
    width: 20px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.api-nav__link:hover,
.api-nav__link.active {
    background: #f0fdf4;
    color: #047857;
}

.api-nav__link:hover i,
.api-nav__link.active i {
    color: #047857;
}

.api-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
    scroll-margin-top: 100px;
}

.api-card__header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 22px;
}

.api-card__title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-card__desc {
    font-size: 15px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Quick Metrics Strip */
.api-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.api-meta-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
}

.api-meta-card__label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.api-meta-card__value {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* HTTP Method Badges */
.api-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1.2;
    font-family: monospace;
}

.api-badge--get {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.api-badge--post {
    background: rgba(37, 211, 102, 0.15);
    color: #047857;
    border: 1px solid rgba(37, 211, 102, 0.35);
}

.api-badge--put {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.api-badge--delete {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Endpoints Table */
.api-table-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.api-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.api-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.api-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.api-table tr:last-child td {
    border-bottom: none;
}

.api-route-code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    color: #0f172a;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
}

/* Code Snippet Box (Dark Theme like Postman/Stripe) */
.code-box {
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    margin: 18px 0;
    border: 1px solid #1e293b;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.code-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.code-box__lang {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-box__lang i {
    color: #25d366;
}

.code-box__copy {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.code-box__copy:hover {
    background: #25d366;
    color: #064e3b;
    border-color: #25d366;
}

.code-box pre {
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Tabbed Code Box for Multi-Language SDKs */
.code-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 0 10px;
    gap: 4px;
}

.code-tabs-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.code-tabs-btn:hover {
    color: #f1f5f9;
}

.code-tabs-btn.active {
    color: #25d366;
    border-bottom-color: #25d366;
}

.code-tab-pane {
    display: none;
}

.code-tab-pane.active {
    display: block;
}

/* Callout Alert */
.api-alert {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.6;
}

.api-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.api-alert--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.api-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.api-alert i {
    font-size: 18px;
    margin-top: 2px;
}

/* Endpoint Item Accordion / Block */
.endpoint-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.endpoint-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.endpoint-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.endpoint-item__route {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.endpoint-item__title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* Header Integration Dropdown Menu Enhancement */
.nav-menu .dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    padding: 8px 0 !important;
    min-width: 210px !important;
    background: #ffffff !important;
}

.nav-menu .dropdown-menu__link {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    padding: 9px 18px !important;
    transition: all 0.2s ease !important;
    display: flex;
    align-items: center;
}

.nav-menu .dropdown-menu__link:hover,
.nav-menu .dropdown-menu__link:focus {
    background-color: #f0fdf4 !important;
    color: #047857 !important;
    padding-left: 22px !important;
}
