/* TOC (Table of Contents) Frontend Styles */
.toc-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 500px;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.toc-header:hover {
    background-color: rgba(0, 115, 170, 0.1);
    border-radius: 4px;
    padding: 8px 10px;
}

.toc-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #0073aa;
    margin: 0;
    display: flex;
    align-items: center;
}

.toc-toggle {
    font-size: 0.9em;
    color: #0073aa;
    transition: transform 0.3s ease;
}

.toc-toggle.open {
    transform: rotate(180deg);
}

.toc-list {
    list-style: none;
    padding: 10px 0 0 0;
    margin: 0;
    border-top: 1px solid #dee2e6;
    transition: all 0.3s ease;
    overflow: hidden;
}

.toc-list li {
    margin: 4px 0;
    padding: 2px 0;
}

.toc-list li.toc-h1 {
    font-weight: 600;
    border-left: 3px solid #0073aa;
    padding-left: 12px;
    margin-left: 0;
}

.toc-list li.toc-h2 {
    font-weight: 500;
    border-left: 2px solid #6c757d;
    padding-left: 12px;
    margin-left: 15px;
    color: #6c757d;
    font-size: 0.95em;
}

.toc-list li.toc-h3 {
    font-weight: 400;
    border-left: 2px solid #adb5bd;
    padding-left: 10px;
    margin-left: 30px;
    color: #868e96;
    font-size: 0.9em;
}

.toc-list a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.4;
}

.toc-list a:hover {
    background-color: rgba(0, 115, 170, 0.1);
    color: #0073aa;
    text-decoration: none;
    transform: translateX(3px);
}

.toc-list li.toc-h1 a:hover {
    transform: translateX(4px);
}

.toc-list li.toc-h2 a:hover {
    transform: translateX(2px);
}

.toc-list li.toc-h3 a:hover {
    transform: translateX(1px);
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Responsive design */
@media (max-width: 768px) {
    .toc-container {
        margin: 15px 0;
        padding: 12px;
        max-width: 100%;
    }
    
    .toc-title {
        font-size: 1em;
    }
    
    .toc-list li.toc-h1,
    .toc-list li.toc-h2,
    .toc-list li.toc-h3 {
        padding-left: 8px;
        margin-left: 5px;
    }
    
    .toc-list li.toc-h2 {
        margin-left: 12px;
        font-size: 0.9em;
    }
    
    .toc-list li.toc-h3 {
        margin-left: 18px;
        font-size: 0.85em;
    }
    
    .toc-list a {
        font-size: 0.85em;
        padding: 3px 6px;
    }
} 