/**
 * Table of Contents Widget Styles
 */
.widget.widget_ahbvvc_toc_widget .widget-title {
    display: none;
}

/* Add scroll offset for anchor links */
h2.toc-item {
    scroll-margin-top: 460px !important;
}

.ahbvvc-toc {
    /* background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1.5rem; */
}

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

.toc-item {
    margin: 0;
    padding: 0;
}

.toc-link {
    display: block;
    padding: 1rem 0.75rem;
    color: var(--global-palette5);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    /* font-size: 0.95rem; */
    /* line-height: 1.4; */
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.toc-link:hover {
    color: var(--global-palette5) !important;
    background: var(--global-palette8);
    border-left-color: #c62828;
    text-decoration: none !important;
    /* padding-left: 1rem; */
}

.toc-link.active {
    color: #c62828;
    font-weight: 600;
    border-left-color: #c62828;
    background: var(--global-palette8);
}

.toc-empty {
    color: #6c757d;
    font-style: italic;
    padding: 0.5rem 0.75rem;
}

/* Sticky sidebar */
.sidebar-inner-wrap {
    height: 100%;
}

.widget.widget_ahbvvc_toc_widget {
    position: sticky !important;
    top: 10rem !important;
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.ahbvvc-toc {
    position: sticky !important;
    top: 10rem !important;
}

aside#secondary {
    margin-top: 2rem;
}

aside#secondary .widget.widget_ahbvvc_toc_widget {
    /* position: sticky !important;
    top: 10rem !important; */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .widget.widget_ahbvvc_toc_widget,
    .ahbvvc-toc {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}
