/**
 * Simple Table of Contents Styles
 * Matches the green design from your reference images
 */
.simple-toc-container {
    background-color: #7cb894;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: inherit;
}

.simple-toc-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    background-color: #7cb894;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.simple-toc-header:hover {
    background-color: #6da582;
}

.simple-toc-toggle {
    margin-right: 10px;
    font-size: 12px;
    color: #2d5a3d;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 12px;
    text-align: center;
}

.simple-toc-container.collapsed .simple-toc-toggle {
    transform: rotate(-90deg);
}

.simple-toc-title {
    font-weight: 500;
    font-size: 16px;
    color: #2d5a3d;
    margin: 0;
}

.simple-toc-content {
    background-color: #7cb894;
    padding: 0 20px 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.simple-toc-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.simple-toc-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

/* Ordered list styling */
.simple-toc-list ol {
    list-style-type: decimal;
    padding-left: 20px;
}

/* Unordered list styling */
.simple-toc-list ul {
    list-style-type: disc;
    padding-left: 20px;
}

.simple-toc-list li {
    margin: 8px 0;
    line-height: 1.4;
}

.simple-toc-sublist {
    margin-top: 5px;
    padding-left: 20px !important;
}

.simple-toc-sublist li {
    margin: 5px 0;
}

.simple-toc-link {
    color: #2d5a3d;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    display: inline-block;
    transition: color 0.2s ease;
}

.simple-toc-link:hover {
    color: #1a3d26;
    text-decoration: underline;
}

.simple-toc-link:visited {
    color: #2d5a3d;
}

.simple-toc-link:focus {
    outline: 2px solid #4a7c59;
    outline-offset: 2px;
    border-radius: 2px;
}
/* Custom marker colors */
.simple-toc-list ul li::marker {
    color: #4a7c59;
}

.simple-toc-sublist ul li::marker {
    color: #4a7c59;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .simple-toc-container {
        margin: 15px 0;
    }
    
    .simple-toc-header {
        padding: 12px 15px;
    }
    
    .simple-toc-content {
        padding: 0 15px 12px;
    }
    
    .simple-toc-title {
        font-size: 15px;
    }
    
    .simple-toc-link {
        font-size: 13px;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Add some spacing when jumping to headings */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
    scroll-margin-top: 20px;
}

/* Animation for expanding/collapsing */
@keyframes expandTOC {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

@keyframes collapseTOC {
    from {
        max-height: 1000px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

.simple-toc-content:not(.collapsed) {
    animation: expandTOC 0.3s ease-out;
}

.simple-toc-content.collapsed {
    animation: collapseTOC 0.3s ease-out;
}