/* ═══════════════════════════════════════════════
   Documentation Section Styles
   ═══════════════════════════════════════════════ */

/* ── Hub Page ─────────────────────────────────── */
.docs-hub {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px;
}

.docs-hub-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.docs-hub-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.docs-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(255,255,255,.06);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.docs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
    border-color: var(--accent);
    text-decoration: none;
}

.docs-card-num {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(233, 69, 96, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.docs-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.docs-card p {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Docs Layout (sidebar + content) ──────────── */
.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: calc(100vh - 56px);
}

.docs-sidebar {
    background: var(--surface);
    border-right: 1px solid rgba(255,255,255,.06);
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.docs-sidebar-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 8px;
}

.docs-sidebar-title a {
    color: var(--text-muted);
    text-decoration: none;
}

.docs-sidebar-title a:hover {
    color: var(--text);
}

.docs-nav-section {
    margin-bottom: 4px;
}

.docs-nav-link {
    display: block;
    padding: 6px 16px;
    font-size: .82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    border-left: 3px solid transparent;
}

.docs-nav-link:hover {
    color: var(--text);
    background: rgba(255,255,255,.03);
    text-decoration: none;
}

.docs-nav-link.active {
    color: var(--text);
    border-left-color: var(--accent);
    background: rgba(233, 69, 96, 0.06);
    font-weight: 600;
}

.docs-nav-sub {
    display: none;
}

.docs-nav-section.open .docs-nav-sub {
    display: block;
}

.docs-nav-sub a {
    display: block;
    padding: 4px 16px 4px 28px;
    font-size: .78rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.docs-nav-sub a:hover {
    color: var(--text);
    text-decoration: none;
}

.docs-nav-sub a.active {
    color: var(--accent);
}

/* ── Docs Content Area ────────────────────────── */
.docs-content {
    max-width: 800px;
    padding: 32px 40px;
}

.docs-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.docs-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.docs-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--text);
}

.docs-content h4 {
    font-size: .95rem;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.docs-content p {
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.docs-content ul, .docs-content ol {
    font-size: .9rem;
    line-height: 1.7;
    padding-left: 20px;
    margin-bottom: 12px;
}

.docs-content li {
    margin-bottom: 4px;
}

.docs-content pre {
    background: var(--bg);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 6px;
    padding: 12px 16px;
    overflow-x: auto;
    margin: 12px 0;
}

.docs-content code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: .82rem;
}

.docs-content p code,
.docs-content li code {
    background: rgba(255,255,255,.08);
    padding: 1px 5px;
    border-radius: 3px;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    margin: 12px 0;
}

.docs-content th, .docs-content td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.docs-content th {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .05em;
}

.docs-content .method-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.docs-content .method-get { background: #10b981; color: #000; }
.docs-content .method-post { background: #3b82f6; color: #fff; }
.docs-content .method-ws { background: #8b5cf6; color: #fff; }

/* ── Collapsible Sections ─────────────────────── */
.docs-collapse {
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--surface);
}

.docs-collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.docs-collapse-header:hover {
    background: rgba(255,255,255,.03);
}

.docs-collapse-header h3 {
    margin: 0;
    font-size: .95rem;
}

.docs-collapse-arrow {
    color: var(--text-muted);
    font-size: .8rem;
    transition: transform 0.2s;
}

.docs-collapse.open .docs-collapse-arrow {
    transform: rotate(90deg);
}

.docs-collapse-body {
    display: none;
    padding: 0 16px 16px;
}

.docs-collapse.open .docs-collapse-body {
    display: block;
}

/* ── Breadcrumb ───────────────────────────────── */
.docs-breadcrumb {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.docs-breadcrumb a {
    color: var(--text-muted);
}

.docs-breadcrumb a:hover {
    color: var(--text);
}

/* ── Info boxes ───────────────────────────────── */
.docs-info {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 12px 0;
    font-size: .85rem;
}

.docs-warning {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 12px 0;
    font-size: .85rem;
}

.docs-tip {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid #10b981;
    padding: 12px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 12px 0;
    font-size: .85rem;
}

/* ── Mobile responsive ────────────────────────── */
@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    .docs-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.06);
        padding: 12px 0;
    }
    .docs-content {
        padding: 24px 16px;
    }
    .docs-hub {
        padding: 24px 16px;
    }
    .docs-cards {
        grid-template-columns: 1fr;
    }
}
