.table-of-contents {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #0d00a5;
    padding-bottom: 8px;
}

.table-of-contents .toc-content {
    margin: 0;
    padding-left: 0;
    list-style: none;
    counter-reset: toc-counter;
}

.table-of-contents .toc-content li {
    counter-increment: toc-counter;
    margin-bottom: 8px;
    position: relative;
    line-height: 1.5;
    padding-left: 25px;
}

.table-of-contents .toc-content li::before {
    content: counter(toc-counter);
    position: absolute;
    left: 0;
    top: 5px;
    background: #0d00a5;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    text-align: center;
    line-height: 18px;
    font-weight: bold;
}

.table-of-contents .toc-content li a {
    color: #0d00a5;
    text-decoration: none;
    font-weight: 500;
    display: block;
}

.table-of-contents .toc-content li a:hover {
    text-decoration: underline;
    color: #0d00a5;
}

/* Auto-generated TOC specific styles */
.table-of-contents.auto-toc .toc-content li {
    transition: background-color 0.2s ease;
}

.table-of-contents.auto-toc .toc-content li:hover {
    background-color: rgba(0, 124, 186, 0.1);
    border-radius: 4px;
}

/* Empty state styling for editor */
.table-of-contents .toc-empty-state {
    padding: 20px;
    text-align: center;
    background-color: #f0f0f0;
    border-radius: 4px;
    border: 2px dashed #ccc;
}

.table-of-contents .toc-empty-state p {
    margin: 0;
    font-style: italic;
    color: #666;
}

.table-of-contents .toc-empty-state p:last-child {
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

/* Hidden state for frontend when no headings */
.table-of-contents.auto-toc[style*="display: none"] {
    display: none !important;
}

/* Responsive design */
@media (min-width: 768px) {
    .table-of-contents {
        padding: 25px;
    }
}

/* Smooth scroll behavior for the entire page */
html {
    scroll-behavior: smooth;
}