/* ============================================================================
   Custom Set Filter — AG Grid Community Edition
   Theme: ag-theme-balham-dark
   ============================================================================ */

.ag-theme-balham-dark .ag-set-filter {
    width: 220px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 12px;
    color: #F5F5F5;
    background-color: #2d3436;
}

/* ── Search box ─────────────────────────────────────────────────────────── */

.ag-theme-balham-dark .ag-set-filter-search {
    padding: 6px;
    border-bottom: 1px solid #424242;
}

.ag-theme-balham-dark .ag-set-filter-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid #424242;
    border-radius: 3px;
    background-color: #1c1f20;
    color: #F5F5F5;
    font-size: 12px;
    outline: none;
}

.ag-theme-balham-dark .ag-set-filter-search-input::placeholder {
    color: #808080;
}

.ag-theme-balham-dark .ag-set-filter-search-input:focus {
    border-color: #00bcd4;
}

/* ── Scrollable list ────────────────────────────────────────────────────── */

.ag-theme-balham-dark .ag-set-filter-list-viewport {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: 260px;
    padding: 2px 0;
}

/* ── Individual row ─────────────────────────────────────────────────────── */

.ag-theme-balham-dark .ag-set-filter-item {
    display: flex;
    align-items: center;
    padding: 3px 8px;
    cursor: pointer;
    user-select: none;
}

.ag-theme-balham-dark .ag-set-filter-item:hover {
    background-color: #3d4749;
}

/* ── (Select All) separator ─────────────────────────────────────────────── */

.ag-theme-balham-dark .ag-set-filter-select-all {
    border-bottom: 1px solid #424242;
    padding-bottom: 4px;
    margin-bottom: 2px;
}

.ag-theme-balham-dark .ag-set-filter-select-all .ag-set-filter-label {
    font-style: italic;
    color: #b0bec5;
}

/* ── Custom checkbox ────────────────────────────────────────────────────── */

.ag-theme-balham-dark .ag-set-filter-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid #607d8b;
    border-radius: 2px;
    background-color: transparent;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    margin: 0;
    transition: background-color 0.12s, border-color 0.12s;
}

.ag-theme-balham-dark .ag-set-filter-checkbox:checked {
    background-color: #00bcd4;
    border-color: #00bcd4;
}

.ag-theme-balham-dark .ag-set-filter-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ag-theme-balham-dark .ag-set-filter-checkbox:indeterminate {
    background-color: #00bcd4;
    border-color: #00bcd4;
}

.ag-theme-balham-dark .ag-set-filter-checkbox:indeterminate::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 8px;
    height: 2px;
    background-color: #fff;
}

/* ── Label text ─────────────────────────────────────────────────────────── */

.ag-theme-balham-dark .ag-set-filter-label {
    margin-left: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */

.ag-theme-balham-dark .ag-set-filter-list-viewport::-webkit-scrollbar {
    width: 8px;
}

.ag-theme-balham-dark .ag-set-filter-list-viewport::-webkit-scrollbar-track {
    background: #2d3436;
}

.ag-theme-balham-dark .ag-set-filter-list-viewport::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.ag-theme-balham-dark .ag-set-filter-list-viewport::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}
