/* WMC Sticky Table of Contents */
.wmc-toc-bar {
    position: fixed;
    top: var(--wmc-toc-top, 60px);
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(255, 255, 255, var(--wmc-toc-bg-opacity, 0.95));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: var(--wmc-toc-border-color, transparent) 1px solid;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.wmc-toc-bar.wmc-toc-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* When .jump element exists, offset accounts for jump bar height (~46px) */
body.wmc-has-jump .wmc-toc-bar {
    top: calc(var(--wmc-toc-top, 60px) + 46px);
}

.wmc-toc-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
}

.wmc-toc-inner::-webkit-scrollbar {
    display: none;
}

.wmc-toc-pill {
    flex: 0 0 auto;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    color: #333;
    background: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wmc-toc-pill:hover {
    background: #e0e0e0;
    color: #111;
    text-decoration: none;
}

.wmc-toc-pill.wmc-toc-active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Mobile adjustments */
@media (max-width: 800px) {
    .wmc-toc-pill {
        font-size: 12px;
        padding: 5px 12px;
    }

    .wmc-toc-inner {
        height: 40px;
        gap: 6px;
    }
}
