/* ==========================================
   DOCUMENTATION PAGE STYLES
   ========================================== */

.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    padding-top: 70px;
    min-height: 100vh;
}

/* Sidebar Navigation */
.docs-sidebar {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    background: #F9FAFB;
    border-right: 1px solid #E5E7EB;
    padding: var(--spacing-lg);
}

.sidebar-content h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.sidebar-content h3:first-child {
    margin-top: 0;
}

.sidebar-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-md);
}

.sidebar-link {
    display: block;
    padding: 0.625rem var(--spacing-sm);
    color: var(--dark-navy);
    text-decoration: none;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: white;
    color: var(--primary-purple);
}

.sidebar-link.active {
    background: var(--primary-purple);
    color: white;
    font-weight: 600;
}

/* Main Documentation Content */
.docs-main {
    padding: var(--spacing-2xl) var(--spacing-xl);
    max-width: 900px;
}

.docs-content {
    color: var(--dark-navy);
}

.doc-section {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
    border-bottom: 1px solid #E5E7EB;
}

.doc-section:last-child {
    border-bottom: none;
}

.doc-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: var(--spacing-md);
}

.doc-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.doc-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.doc-section p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.doc-section ul,
.doc-section ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.doc-section li {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Info Boxes */
.info-box,
.warning-box {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

.info-box {
    background: #EFF6FF;
    border-left: 4px solid #3B82F6;
}

.warning-box {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
}

.info-icon,
.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box h4,
.warning-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 0.5rem;
}

.info-box code {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Code Blocks */
.code-block {
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: #1E293B;
    border-bottom: 1px solid #334155;
}

.code-header span {
    font-size: 0.875rem;
    color: #94A3B8;
    font-weight: 600;
}

.copy-btn {
    padding: 0.375rem 0.75rem;
    background: #334155;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #475569;
}

.code-block pre {
    margin: 0;
    padding: var(--spacing-md);
    background: #0F172A;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #E2E8F0;
}

/* Inline Code */
code {
    padding: 0.25rem 0.5rem;
    background: #F1F5F9;
    color: #E11D48;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875em;
}

/* API Tables */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.api-table thead {
    background: #F9FAFB;
}

.api-table th {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--dark-navy);
    border-bottom: 2px solid #E5E7EB;
}

.api-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid #E5E7EB;
    font-size: 0.9375rem;
}

.api-table td code {
    background: #F3F4F6;
    color: #6B3FB8;
}

.api-table tbody tr:hover {
    background: #F9FAFB;
}

/* Endpoint Badge */
.endpoint {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm);
    background: #F9FAFB;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-purple);
}

.method {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
}

.method.get {
    background: #DBEAFE;
    color: #1E40AF;
}

.method.post {
    background: #D1FAE5;
    color: #047857;
}

.method.put {
    background: #FEF3C7;
    color: #92400E;
}

.method.delete {
    background: #FEE2E2;
    color: #991B1B;
}

.path {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--dark-navy);
}

/* Tabs */
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    border-bottom: 2px solid #E5E7EB;
}

.tab-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-purple);
}

.tab-btn.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.step {
    display: flex;
    gap: var(--spacing-md);
}

.step-number {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.125rem;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

/* Support Cards */
.support-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.support-card {
    padding: var(--spacing-lg);
    background: #F9FAFB;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.support-card:hover {
    background: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.support-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: var(--spacing-sm);
}

.support-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.support-card a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

.support-card a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
    }
    
    .docs-main {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #F3F4F6;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-actions {
        display: none;
    }
    
    .doc-section h1 {
        font-size: 2rem;
    }
    
    .doc-section h2 {
        font-size: 1.5rem;
    }
    
    .doc-section h3 {
        font-size: 1.25rem;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .support-cards {
        grid-template-columns: 1fr;
    }
    
    .code-block pre {
        font-size: 0.8125rem;
    }
}

/* Scrollbar Styling for Sidebar */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Active Nav Links */
.nav-menu .active {
    color: var(--primary-purple);
    font-weight: 600;
}