/* Table of Contents Styles */
/* Using the same color scheme as pagegen.css */
:root {
  --primary-color: #5e95a4;
  --secondary-color: #45b061;
  --accent-color: #17a2b8;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #dee2e6;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --border-radius: 0.375rem;
  --transition: all 0.3s ease;
}

.toc-container {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 10rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    margin-top: 10rem;
}

.toc-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.toc-list a {
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
    font-size: 0.95rem;
    line-height: 1.4;
    border-radius: calc(var(--border-radius) / 2);
    position: relative;
}

.toc-list a:hover {
    color: var(--primary-color);
    background-color: rgba(44, 90, 160, 0.1);
    transform: translateX(4px);
}

/* Indentation for nested headings with color coding */
.toc-list .h1 { 
    font-weight: 600;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
}

.toc-list .h2 { 
    padding-left: 1.5rem; 
    border-left: 2px solid var(--secondary-color);
}

.toc-list .h3 { 
    padding-left: 2.25rem; 
    border-left: 2px solid var(--accent-color);
    color: var(--text-secondary);
}

.toc-list .h4 { 
    padding-left: 3rem; 
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toc-list .h5 { 
    padding-left: 3.75rem; 
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.toc-list .h6 { 
    padding-left: 4.5rem; 
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Active state for current section */
.toc-list a.active {
    color: var(--bg-white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .toc-container {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 1.5rem;
        padding: 1rem;
        margin-top: 0;
        background: var(--bg-white);
        border: 1px solid var(--border-color);
    }
    
    .toc-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .toc-list a {
        font-size: 0.9rem;
        padding: 0.4rem 0.5rem;
    }
    
    /* Reduce indentation on mobile */
    .toc-list .h1 { 
        padding-left: 0.75rem;
        border-left-width: 2px;
    }
    .toc-list .h2 { 
        padding-left: 1rem; 
        border-left-width: 1px;
    }
    .toc-list .h3 { 
        padding-left: 1.5rem; 
        border-left-width: 1px;
    }
    .toc-list .h4 { 
        padding-left: 2rem; 
        font-size: 0.85rem;
    }
    .toc-list .h5 { 
        padding-left: 2.5rem; 
        font-size: 0.8rem;
    }
    .toc-list .h6 { 
        padding-left: 3rem; 
        font-size: 0.75rem;
    }
}

/* Removed #main-content-column scroll styles as we now scroll the whole page */ 