/* ==========================================================
   API Documentation pages (SMS, WhatsApp, WhatsApp onboarding)
   ========================================================== */

.doc-layout {
    padding: 40px 0 60px;
}

/* ---------- Sidebar ---------- */
.doc-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 10px;
    font-size: 14px;
}

.doc-sidebar h6 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8f98;
    margin: 22px 0 8px;
}

.doc-sidebar h6:first-child {
    margin-top: 0;
}

.doc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-sidebar a {
    display: block;
    padding: 5px 12px;
    color: #444;
    border-left: 2px solid #e6e6e6;
    line-height: 1.4;
}

.doc-sidebar a:hover {
    color: var(--accent-color);
}

.doc-sidebar a.active {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 600;
}

.doc-toc-mobile {
    margin-bottom: 24px;
}

.doc-toc-mobile summary {
    cursor: pointer;
    font-weight: 600;
    padding: 12px 16px;
    background: #f6f7f9;
    border-radius: 8px;
}

.doc-toc-mobile .doc-sidebar {
    position: static;
    max-height: none;
    padding: 12px 0 0;
}

/* ---------- Content ---------- */
.doc-content {
    min-width: 0;
}

.doc-content section,
.doc-content .doc-anchor {
    scroll-margin-top: 110px;
}

.doc-content > section {
    padding: 0 0 36px;
    margin-bottom: 36px;
    border-bottom: 1px solid #eee;
}

.doc-content > section:last-child {
    border-bottom: 0;
}

.doc-content h2 {
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 700;
    color: #124265;
    margin-bottom: 16px;
}

.doc-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #124265;
    margin: 32px 0 12px;
}

.doc-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #32353a;
    margin: 22px 0 10px;
}

.doc-content p,
.doc-content li {
    font-size: 16px;
    line-height: 1.75;
    color: #444;
}

.doc-content :not(pre) > code {
    background: #f3f4f6;
    color: #b4461a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    word-break: break-word;
}

.doc-content .dlt-info-box p:last-child {
    margin-bottom: 0;
}

.doc-table td {
    vertical-align: top;
}

.doc-table td:first-child {
    white-space: nowrap;
}

/* ---------- Endpoint line ---------- */
.doc-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f6f7f9;
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 14px 0 18px;
    overflow-x: auto;
}

.doc-endpoint code {
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    background: none;
    padding: 0;
}

.doc-method {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
}

.doc-method-get { background: #009037; }
.doc-method-post { background: var(--accent-color); }
.doc-method-delete { background: #c0392b; }
.doc-method-webhook { background: #124265; }

/* ---------- Code blocks ---------- */
.doc-code {
    background: #1e293b;
    border-radius: 10px;
    margin: 14px 0 22px;
    overflow: hidden;
}

.doc-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px 8px 16px;
    background: #152033;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.doc-code-head .nav {
    gap: 4px;
    flex-wrap: wrap;
}

.doc-tab {
    background: none;
    border: 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

.doc-tab:hover,
.doc-tab.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.doc-copy {
    flex-shrink: 0;
    background: none;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
}

.doc-copy:hover {
    color: #fff;
    border-color: #64748b;
}

.doc-code pre {
    margin: 0;
    padding: 18px 20px;
    color: #e2e8f0;
    font-size: 13.5px;
    line-height: 1.65;
    overflow-x: auto;
    max-height: 520px;
}

/* ---------- Prerequisite / doc cards ---------- */
.doc-checklist {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.doc-checklist li {
    position: relative;
    padding: 14px 16px 14px 52px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff;
}

.doc-checklist li::before {
    content: counter(list-item);
    position: absolute;
    left: 14px;
    top: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-checklist li strong {
    color: #124265;
}

.doc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.doc-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.doc-card h3 {
    font-size: 21px;
    font-weight: 700;
    color: #124265;
    margin: 14px 0 10px;
}

.doc-card p,
.doc-card li {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

.doc-card ul {
    padding-left: 18px;
    margin-bottom: 18px;
}

.doc-card .doc-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    background: var(--accent-color);
}

.doc-card .doc-card-icon.whatsapp {
    background: #25d366;
}

.doc-card .doc-card-prereq {
    font-size: 14px;
    background: #fff8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 18px;
}

.doc-card .doc-card-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.doc-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    background: var(--accent-color);
    color: #fff;
    border: 2px solid var(--accent-color);
}

.doc-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.doc-btn-outline {
    background: transparent;
    color: var(--accent-color);
}

@media (max-width: 991px) {
    .doc-layout {
        padding-top: 24px;
    }

    .doc-code pre {
        font-size: 12.5px;
        padding: 14px;
    }
}
