/* ================================================================
   API DOCUMENTATION — PAGE CSS
   ERGE ASIA Design System · Prefix: apidoc-
   Uses core.css variables: --teal-*, --gray-*, --r-*, --sh-*, --ease
   ================================================================ */

/* ===== HERO (FAQ-style teal gradient centered) ===== */
.section {
    padding:50px 0;
}
.apidoc-hero-wrap {
    position: relative;
    margin-bottom: 0;
}
.apidoc-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(170deg, var(--teal-500) 0%, var(--teal-600) 40%, var(--teal-700) 100%);
    padding: 56px 24px 48px;
}
.apidoc-hero-bg {
    position: absolute; inset: 0; overflow: hidden;
    pointer-events: none; z-index: 0;
}
.apidoc-orb {
    position: absolute; border-radius: 50%;
    opacity: 0.06; filter: blur(60px);
    animation: apidocFloat 16s ease-in-out infinite;
}
.apidoc-orb-1 { width: 400px; height: 400px; background: #fff; top: -120px; right: -100px; }
.apidoc-orb-2 { width: 260px; height: 260px; background: #fff; bottom: -80px; left: 3%; animation-delay: -6s; }
.apidoc-orb-3 { width: 180px; height: 180px; background: #fff; top: 25%; left: 50%; animation-delay: -10s; }
@keyframes apidocFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-14px) scale(1.03); }
}

.apidoc-hero-inner {
    position: relative; z-index: 2;
    max-width: 620px; margin: 0 auto;
    text-align: center;
}
.apidoc-hero-icon {
    width: 52px; height: 52px; border-radius: 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 22px; color: #fff;
}
.apidoc-hero-eyebrow {
    font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin: 0 0 12px;
}
.apidoc-hero-title {
    color: #fff; font-size: 32px; font-weight: 800;
    margin: 0 0 12px; line-height: 1.25;
}
.apidoc-hero-desc {
    color: rgba(255,255,255,0.7); font-size: 14px;
    margin: 0 0 24px; line-height: 1.7;
    max-width: 520px; margin-left: auto; margin-right: auto;
}

.apidoc-base-url {
    display: inline-flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px; padding: 10px 18px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.apidoc-base-url-label {
    font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.6);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.apidoc-base-url-value {
    font-family: 'SFMono-Regular', 'Menlo', monospace;
    font-size: 13px; color: #fff; font-weight: 600;
}

.apidoc-feat-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px; padding: 5px 14px;
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85);
}
.apidoc-feat-badge i { color: rgba(255,255,255,0.6); font-size: 11px; }


/* ===== STEP CARDS ===== */
.apidoc-step-card {
    background: var(--white); border-radius: var(--r-lg);
    padding: 24px 20px; text-align: center;
    border: 1.5px solid rgba(0,0,0,0.04);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 4px 16px rgba(0,0,0,0.03);
    transition: var(--ease); position: relative; height: 100%;
}
.apidoc-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(44,197,189,0.12);
    border-color: rgba(44,197,189,0.15);
}
.apidoc-step-num {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    color: white; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.apidoc-step-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    display: flex; align-items: center; justify-content: center;
    margin: 8px auto 14px; box-shadow: 0 4px 12px rgba(44,197,189,0.25);
}
.apidoc-step-icon i { font-size: 16px; color: white; }
.apidoc-step-card h6 { font-size: 14px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.apidoc-step-card p { font-size: 12px; color: var(--gray-500); line-height: 1.5; margin: 0; }


/* ===== AUTH CARD ===== */
.apidoc-auth-card {
    background: var(--white); border-radius: var(--r-xl);
    padding: 36px; border: 1.5px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.apidoc-auth-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px; box-shadow: 0 4px 12px rgba(44,197,189,0.25);
}
.apidoc-auth-icon i { font-size: 20px; color: white; }
.apidoc-auth-card h4 { font-size: 20px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.apidoc-auth-card > .row > div:first-child > p { font-size: 14px; color: var(--gray-500); line-height: 1.7; margin-bottom: 16px; }


/* ===== CODE BLOCKS ===== */
.apidoc-code-block {
    background: #0f172a; border-radius: var(--r-md); overflow: hidden;
}
.apidoc-code-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.apidoc-code-lang {
    font-family: 'SFMono-Regular', monospace;
    font-size: 11px; color: var(--teal-400); font-weight: 600;
}
.apidoc-copy-btn {
    background: rgba(255,255,255,0.08); border: none;
    color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 6px; cursor: pointer;
    transition: var(--ease); font-family: inherit;
}
.apidoc-copy-btn:hover { background: rgba(255,255,255,0.15); color: white; }
.apidoc-code-body {
    padding: 16px 20px; margin: 0;
    font-family: 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
    font-size: 12.5px; line-height: 1.7;
    color: #e2e8f0; white-space: pre; overflow-x: auto;
}
.hl-str { color: #6EE7B7; }
.hl-key { color: #93C5FD; }


/* ===== NOTES ===== */
.apidoc-note {
    padding: 12px 16px; border-radius: var(--r-sm);
    font-size: 13px; display: flex; align-items: flex-start; gap: 10px;
    margin: 12px 0; line-height: 1.6;
}
.apidoc-note i { margin-top: 2px; flex-shrink: 0; }
.apidoc-note-info { background: #eff6ff; border-left: 3px solid #3B82F6; color: #1e40af; }
.apidoc-note-warn { background: #fffbeb; border-left: 3px solid #F59E0B; color: #92400e; }
.apidoc-note-success { background: #ecfdf5; border-left: 3px solid #10B981; color: #065f46; }


/* ===== ENDPOINT CARDS (Bootstrap Accordion) ===== */
.apidoc-ep-card {
    background: var(--white); border-radius: var(--r-md) !important;
    border: 1.5px solid var(--gray-200) !important;
    margin-bottom: 12px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: var(--ease);
}
.apidoc-ep-card:hover { box-shadow: var(--sh-sm); }

.apidoc-ep-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; cursor: pointer;
    user-select: none; transition: background 0.2s;
}
.apidoc-ep-header:hover { background: var(--gray-50); }

.apidoc-method {
    font-family: 'SFMono-Regular', monospace;
    font-size: 10px; font-weight: 800;
    padding: 3px 8px; border-radius: 5px;
    letter-spacing: 0.5px; min-width: 38px; text-align: center;
    text-transform: uppercase;
}
.apidoc-method-get { background: #ecfdf5; color: #059669; }
.apidoc-method-post { background: #eff6ff; color: #2563EB; }

.apidoc-ep-path {
    font-family: 'SFMono-Regular', monospace;
    font-size: 13.5px; font-weight: 600; color: var(--gray-900);
    background: none; padding: 0;
}

.apidoc-public-badge {
    font-size: 10px; font-weight: 700;
    background: #ecfdf5; color: #059669;
    padding: 2px 8px; border-radius: 4px;
}

.apidoc-ep-label {
    margin-left: auto; font-size: 13px;
    color: var(--gray-500); font-weight: 500;
}

.apidoc-ep-chevron {
    color: var(--gray-300); font-size: 12px;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    margin-left: 8px;
}
.apidoc-ep-header[aria-expanded="true"] .apidoc-ep-chevron {
    transform: rotate(180deg);
}

.apidoc-ep-body {
    padding: 4px 20px 24px;
    border-top: 1px solid var(--gray-200);
}

.apidoc-ep-subhead {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--gray-900); margin: 20px 0 10px;
    display: flex; align-items: center; gap: 8px;
}
.apidoc-ep-subhead::before {
    content: ''; width: 3px; height: 12px;
    background: var(--teal-500); border-radius: 2px;
}


/* ===== PARAM TABLE ===== */
.apidoc-param-table {
    font-size: 13px; margin-bottom: 0;
}
.apidoc-param-table thead th {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--gray-500); background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 8px 10px;
}
.apidoc-param-table td {
    padding: 8px 10px; border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.apidoc-param-table code {
    font-family: 'SFMono-Regular', monospace;
    font-size: 12px; background: var(--teal-50);
    color: var(--teal-700); padding: 1px 6px;
    border-radius: 4px; font-weight: 600;
}
.apidoc-type {
    font-size: 11px; color: var(--gray-500);
    font-family: 'SFMono-Regular', monospace;
}


/* ===== CATEGORY CARDS ===== */
.apidoc-cat-card {
    background: var(--white); border-radius: var(--r-md);
    padding: 20px; display: flex; align-items: flex-start; gap: 14px;
    border: 1.5px solid rgba(0,0,0,0.04);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: var(--ease); height: 100%;
}
.apidoc-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
}
.apidoc-cat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 16px;
}


/* ===== STATUS TABLE ===== */
.apidoc-status-table { font-size: 13px; }
.apidoc-status-table thead th {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--gray-500); background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    padding: 10px 12px;
}
.apidoc-status-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
}
.apidoc-sc {
    font-family: 'SFMono-Regular', monospace;
    font-size: 11.5px; font-weight: 700;
    color: var(--teal-700); background: var(--teal-50);
    padding: 2px 8px; border-radius: 4px;
}


/* ===== ERROR CARDS ===== */
.apidoc-error-card {
    background: var(--white); border-radius: var(--r-md);
    padding: 16px; text-align: center;
    border: 1.5px solid rgba(0,0,0,0.04);
    display: flex; flex-direction: column; gap: 6px;
    align-items: center; height: 100%;
    transition: var(--ease);
}
.apidoc-error-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-sm);
}


/* ===== CTA ===== */
.apidoc-cta {
    background: linear-gradient(135deg, var(--teal-500) 0%, var(--teal-700) 100%);
    border-radius: var(--r-xl); padding: 56px 40px;
    text-align: center; position: relative; overflow: hidden;
}
.apidoc-cta-bg {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.apidoc-cta-icon {
    width: 60px; height: 60px; border-radius: 18px;
    background: rgba(255,255,255,0.15); margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
}
.apidoc-cta-icon i { font-size: 24px; color: white; }
.apidoc-cta h3 { font-size: 26px; font-weight: 800; color: white; margin-bottom: 10px; }
.apidoc-cta p { font-size: 15px; color: rgba(255,255,255,0.8); margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }


/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .apidoc-hero-title { font-size: 26px; }
    .apidoc-auth-card { padding: 24px; }
    .apidoc-cta { padding: 40px 24px; }
}
@media (max-width: 575.98px) {
    .section {
        padding:20px 0;
    }
    .apidoc-hero { padding: 40px 16px 36px; }
    .apidoc-hero-title { font-size: 22px; }
    .apidoc-hero-desc { font-size: 13px; }
    .apidoc-base-url { flex-direction: column; gap: 4px; padding: 10px 14px; }
    .apidoc-base-url-value { font-size: 11px; word-break: break-all; }
    .apidoc-ep-header { padding: 12px 14px; gap: 8px; flex-wrap: wrap; }
    .apidoc-ep-path { font-size: 12px; }
    .apidoc-ep-body { padding: 4px 14px 20px; }
    .apidoc-step-card { padding: 20px 14px; }
    .apidoc-auth-card { padding: 20px 16px; }
    .apidoc-code-body { font-size: 11px; padding: 12px 14px; }
    .apidoc-cta { padding: 32px 16px; }
    .apidoc-cta h3 { font-size: 20px; }
}