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

.docs-layout {
    display: flex;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    gap: 3rem;
    position: relative;
}

.docs-sidebar {
    width: 260px;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 2rem 0;
    border-right: 1px solid var(--border);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h4 {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

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

.sidebar-section li {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: block;
    padding: 0.25rem 0;
}

.sidebar-link:hover {
    color: var(--text);
    padding-left: 0.5rem;
}

.sidebar-link.active {
    color: var(--accent);
    font-weight: 500;
    border-left: 2px solid var(--accent);
    padding-left: 0.75rem;
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 0;
}

.docs-section {
    margin-bottom: 2rem;
    scroll-margin-top: 100px;
    padding: 0 !important;
}

.docs-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.docs-section h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
}

.docs-section h4 {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
    color: var(--text);
}

.docs-section p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.docs-section a:not(.sidebar-link) {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.docs-section a:not(.sidebar-link):hover {
    border-bottom-color: var(--accent);
}

.docs-section ul {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 1rem 0 1rem 2rem;
}

.docs-section li {
    margin-bottom: 0.5rem;
}

.docs-section code:not(.code-block code) {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.config-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.config-table th {
    padding: 1rem;
    text-align: left;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.config-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.config-table code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-light);
    font-size: 0.85em;
}

.method-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.method {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.method h4 {
    margin: 0 0 0.75rem 0;
    color: var(--accent);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
}

.method p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.method .code-block {
    margin: 0.5rem 0 0;
}

kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 0.9em;
    color: var(--text);
    box-shadow: 0 2px 0 var(--border);
}

.docs-sidebar::-webkit-scrollbar {
    width: 8px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: var(--bg);
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .docs-layout {
        gap: 2rem;
    }

    .docs-sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
        padding: 0 1rem;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: none;
        padding: 1rem 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .docs-content {
        padding: 1rem 0;
    }

    .docs-section h2 {
        font-size: 1.5rem;
    }

    .config-table {
        font-size: 0.8rem;
    }

    .config-table th,
    .config-table td {
        padding: 0.5rem;
    }
}