/* ============================================
   DOCS PAGE STYLES
   ============================================ */

/* Layout */
.docs-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 73px; /* navbar height */
}

/* Sidebar */
.docs-sidebar {
    position: fixed;
    top: 73px;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 24px 0;
    z-index: 100;
}

.docs-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.docs-sidebar-header h3 {
    font-size: 16px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

/* Sidebar Navigation */
.docs-nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.docs-nav-section h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    padding: 12px 12px 6px;
}

.docs-nav-link {
    display: block;
    padding: 6px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.docs-nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 217, 255, 0.05);
}

.docs-nav-link.active {
    color: var(--primary);
    background: rgba(0, 217, 255, 0.1);
    font-weight: 500;
}

/* Mobile menu toggle */
.docs-menu-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    background: var(--primary);
    color: var(--bg-darker);
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    align-items: center;
    gap: 8px;
}

.docs-menu-toggle svg {
    flex-shrink: 0;
}

/* Main Content */
.docs-content {
    flex: 1;
    margin-left: 280px;
    min-width: 0;
}

.docs-content-inner {
    max-width: 840px;
    margin: 0 auto;
    padding: 40px 40px 80px;
}

/* Section Styling */
.docs-section {
    margin-bottom: 48px;
    scroll-margin-top: 90px;
}

.docs-section h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.docs-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.docs-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.docs-section ul,
.docs-section ol {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    padding-left: 24px;
}

.docs-section li {
    margin-bottom: 6px;
}

.docs-section li ul,
.docs-section li ol {
    margin-top: 6px;
    margin-bottom: 0;
}

.docs-section a {
    color: var(--primary);
    text-decoration: none;
}

.docs-section a:hover {
    text-decoration: underline;
}

/* Inline code */
.docs-section code {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Code block */
.docs-code-block {
    display: block;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 12px 0 16px;
    color: var(--text-secondary);
}

/* Cards */
.docs-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin: 16px 0 24px;
    overflow-x: auto;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.docs-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(0, 217, 255, 0.05);
    border-bottom: 1px solid var(--border);
}

.docs-table td {
    padding: 10px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.docs-table td strong {
    color: var(--text-primary);
}

/* Callouts */
.docs-callout {
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.docs-callout strong {
    color: var(--text-primary);
}

.docs-callout.info {
    background: rgba(0, 217, 255, 0.06);
    border-left: 3px solid var(--primary);
}

.docs-callout.warning {
    background: rgba(255, 193, 7, 0.06);
    border-left: 3px solid #FFC107;
}

/* Example blocks */
.docs-example {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0 24px;
}

.docs-example-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 10px;
}

.docs-example ul {
    margin-bottom: 0;
}

.docs-example em {
    color: var(--text-primary);
    font-style: italic;
}

/* Badge */
.docs-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
}

.docs-badge.pro {
    background: rgba(0, 217, 255, 0.15);
    color: var(--primary);
}

/* FAQ items */
.docs-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 12px;
}

.docs-faq-item h3 {
    font-size: 16px;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.docs-faq-item p,
.docs-faq-item ul {
    margin-bottom: 0;
    font-size: 14px;
}

.docs-faq-item ul {
    padding-left: 20px;
}

/* Footer */
.docs-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.docs-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.docs-footer a {
    color: var(--primary);
    text-decoration: none;
}

.docs-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 500;
    }

    .docs-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .docs-sidebar-close {
        display: block;
    }

    .docs-menu-toggle {
        display: flex;
    }

    .docs-content {
        margin-left: 0;
    }

    .docs-content-inner {
        padding: 32px 24px 80px;
    }
}

@media (max-width: 768px) {
    .docs-layout {
        padding-top: 65px;
    }

    .docs-sidebar {
        top: 65px;
        width: 260px;
    }

    .docs-content-inner {
        padding: 24px 16px 80px;
    }

    .docs-section h1 {
        font-size: 28px;
    }

    .docs-section h2 {
        font-size: 20px;
    }

    .docs-table {
        font-size: 13px;
    }

    .docs-table th,
    .docs-table td {
        padding: 8px 10px;
    }

    .docs-faq-item {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .docs-content-inner {
        padding: 20px 12px 80px;
    }

    .docs-section h1 {
        font-size: 24px;
    }

    .docs-card {
        border-radius: 8px;
    }

    .docs-menu-toggle {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Scrollbar styling for sidebar */
.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
