/* Document Navigator (TOC) Styles - matching toc.js pattern */
#floating-toc {
    position: fixed;
    top: 120px;
    left: 30px;
    width: 250px;
    background-color: #1a1a1a;
    border: 1px solid #6d105a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

#toc-header {
    background-color: #6d105a;
    color: #ffffff;
    padding: 15px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

#toc-header::after {
    content: '×';
    float: right;
    font-size: 20px;
    display: none;
}

@media (max-width: 992px) {
    #toc-header::after {
        display: block;
    }
}

#toc-content {
    max-height: calc(50vh - 45px);
    overflow-y: auto;
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: #6d105a #1a1a1a;
}

#toc-content::-webkit-scrollbar {
    width: 8px;
}

#toc-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#toc-content::-webkit-scrollbar-thumb {
    background-color: #6d105a;
    border-radius: 4px;
}

#toc-content a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.8;
    font-size: 14px;
}

#toc-content a:hover {
    background-color: rgba(109, 16, 90, 0.3);
    opacity: 1;
    transform: translateX(5px);
}

#toc-content a.active {
    background-color: #6d105a;
    opacity: 1;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile TOC Toggle */
.mobile-toc-toggle {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #6d105a;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.mobile-toc-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    #floating-toc {
        width: 230px;
        font-size: 13px;
    }

    #toc-content {
        max-height: calc(35vh - 45px);
    }
}

@media (max-width: 1200px) {
    #floating-toc {
        left: 10px;
        width: 210px;
    }
}

/* Mobile styles */
@media (max-width: 992px) {
    .mobile-toc-toggle {
        display: block;
    }

    #floating-toc {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border: none;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1002;
    }

    #floating-toc.mobile-open {
        transform: translateX(0);
    }

    #toc-header {
        border-radius: 0;
        padding: 20px;
        font-size: 18px;
    }

    #toc-content {
        max-height: calc(100vh - 80px);
        padding: 20px;
    }

    #toc-content a {
        padding: 12px 16px;
        font-size: 16px;
    }
}
