/**
 * TOC Panel Styles - Windows 95 Retro
 * Slide-in Table of Contents popup for jumping between headings
 */

.toc-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.toc-panel {
    position: fixed;
    top: 0;
    left: -340px;
    width: 340px;
    height: 100vh;
    background: var(--win95-gray, #c0c0c0);
    border-right: 2px solid;
    border-right-color: var(--win95-white, #ffffff) var(--win95-gray-dark, #808080);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: left 0.15s ease-out;
}

.toc-panel.open {
    left: 0;
}

.toc-panel-header {
    padding: 3px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--win95-blue, #000080);
    color: white;
    height: 23px;
    flex-shrink: 0;
}

.toc-panel-header h2 {
    margin: 0;
    font-size: 11px;
    font-weight: bold;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Tahoma, Arial, sans-serif;
}

.toc-panel-close {
    background: var(--win95-gray, #c0c0c0);
    border: 2px solid;
    border-color: var(--win95-white, #ffffff) var(--win95-gray-dark, #808080)
                  var(--win95-gray-dark, #808080) var(--win95-white, #ffffff);
    color: var(--win95-black, #000000);
    font-size: 11px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: bold;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Tahoma, Arial, sans-serif;
}

.toc-panel-close:active {
    border-color: var(--win95-gray-dark, #808080) var(--win95-white, #ffffff)
                  var(--win95-white, #ffffff) var(--win95-gray-dark, #808080);
}

.toc-panel-content {
    flex: 1;
    overflow-y: auto;
    background: var(--win95-white, #ffffff);
    margin: 6px;
    border: 2px solid;
    border-color: var(--win95-gray-dark, #808080) var(--win95-white, #ffffff)
                  var(--win95-white, #ffffff) var(--win95-gray-dark, #808080);
}

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

.toc-panel-empty {
    padding: 12px;
    font-size: 11px;
    color: var(--win95-gray-dark, #808080);
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Tahoma, Arial, sans-serif;
}

.toc-panel-link {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 4px 10px;
    font-size: 11px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Tahoma, Arial, sans-serif;
    color: var(--win95-black, #000000);
    cursor: pointer;
}

.toc-panel-link:hover {
    background: var(--win95-blue, #000080);
    color: var(--win95-white, #ffffff);
}

.toc-level-0 .toc-panel-link { padding-left: 10px; font-weight: bold; }
.toc-level-1 .toc-panel-link { padding-left: 24px; }
.toc-level-2 .toc-panel-link { padding-left: 38px; }
.toc-level-3 .toc-panel-link { padding-left: 52px; }
.toc-level-4 .toc-panel-link { padding-left: 66px; }
.toc-level-5 .toc-panel-link { padding-left: 80px; }
