/* Generic collapsible section component */

.collapsible-section {
    position: relative;
}

/* Fade-out gradient at bottom of collapsed line-based sections */
.collapsible-section.cs-collapsed[data-max-lines]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

/* Hidden items in item-based sections */
.cs-hidden-item {
    display: none !important;
}

/* Section header: label + toggle button on the same line */
.cs-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.cs-section-label {
    font-size: 13px;
}

.cs-section-header .cs-toggle-btn {
    margin: 0;
}

/* Toggle button */
.cs-toggle-btn {
    display: inline-block;
    margin: 2px 0 6px 0;
    padding: 1px 6px;
    font-size: 11px;
    color: #417690;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f8f8f8;
}

.cs-toggle-btn:hover {
    background: #e8e8e8;
    border-color: #417690;
    text-decoration: none;
    color: #417690;
}

/* Header toggle link (legacy) */
.cs-header-toggle {
    font-size: 11px;
    font-weight: normal;
    color: #417690;
    cursor: pointer;
    text-decoration: none;
}

.cs-header-toggle:hover {
    text-decoration: underline;
}

/* Header toggle button — inline with column title, same style as per-row toggle */
#result_list thead th div.text:has(.cs-header-toggle-btn) {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-header-toggle-btn {
    font-weight: normal;
    white-space: nowrap;
}
