/* Table of Contents Styles */
.toc-wrapper {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 240px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.toc {
    font-size: 0.75rem;
    color: #333;
}

.toc h2 {
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.toc-content {
    margin-left: -20px;
}

.toc-content ul {
    list-style: none;
    padding-left: 20px;
}

.toc-content li {
    margin: 4px 0;
    line-height: 1.3;
}

.toc-content a {
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.75rem;
}

.toc-content a:hover {
    color: #333;
    background: #f5f5f5;
}

.toc-content a.active {
    color: #333;
    background: #f5f5f5;
    font-weight: 500;
}

/* Indent levels */
.toc-content nav > ul > li > ul {
    padding-left: 12px;
}

.toc-content nav > ul > li > ul > li > ul {
    padding-left: 12px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .toc-wrapper {
        display: none;
    }
}

/* Smooth scroll behavior for the whole page */
html {
    scroll-behavior: smooth;
}

/* Scrollbar styling */
.toc-wrapper::-webkit-scrollbar {
    width: 8px;
}

.toc-wrapper::-webkit-scrollbar-track {
    background: #fff;
}

.toc-wrapper::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.toc-wrapper::-webkit-scrollbar-thumb:hover {
    background: #d0d0d0;
} 