/* TOC Builder by RobertIvan Styles */

.tbrv-container {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    width: fit-content;
    min-width: 250px;
    max-width: 100%;
}

.tbrv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tbrv-title {
    font-weight: bold;
    font-size: 18px;
}

.tbrv-toggle-link {
    font-size: 12px;
    text-decoration: none;
    color: #0073aa;
    cursor: pointer;
}

.tbrv-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tbrv-list ul {
    list-style: none;
    margin-left: 20px;
    padding: 0;
}

.tbrv-list li {
    margin-bottom: 5px;
}

.tbrv-link {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

.tbrv-link:hover,
.tbrv-link.active {
    color: #0073aa;
    font-weight: 500;
}

/* Smooth Scroll Behavior handled by JS, but scroll-margin for sticky headers */
[id] {
    scroll-margin-top: 80px;
    /* Adjust based on theme header */
}

/* Mobile */
@media (max-width: 768px) {
    .tbrv-container {
        width: 100%;
    }
}