/* ============================================================
   FGBMultiSelect — supplemental styles
   ------------------------------------------------------------
   Uses FGB Studio theme variables so the component matches the
   rest of the app in both light and dark mode. The existing
   filter dropdown classes are styled by fgbstudio.css; these
   rules add the new search box, action row, and empty state.
   ============================================================ */

/* Search input at the top of the menu */
.fgb-ms-search-wrapper {
    position: relative;
    padding: 8px;
    border-bottom: 1px solid var(--fgb-border-color);
    background: var(--fgb-bg-secondary);
}

.fgb-ms-search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: var(--fgb-text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.fgb-ms-search {
    width: 100%;
    padding: 6px 10px 6px 32px;
    font-size: 0.85rem;
    border: 1px solid var(--fgb-border-color);
    border-radius: 4px;
    background: var(--fgb-bg-primary);
    color: var(--fgb-text-primary);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .fgb-ms-search::placeholder {
        color: var(--fgb-text-muted);
    }

    .fgb-ms-search:focus {
        border-color: var(--fgb-accent-green);
        box-shadow: 0 0 0 2px var(--fgb-accent-green-hover);
    }

/* Action row: Select All / Clear / count */
.fgb-ms-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--fgb-border-color);
    background: var(--fgb-bg-secondary);
    font-size: 0.78rem;
}

.fgb-ms-action-btn {
    background: none;
    border: 1px solid transparent;
    padding: 3px 10px;
    border-radius: 4px;
    color: var(--fgb-accent-green);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

    .fgb-ms-action-btn:hover {
        background: var(--fgb-accent-green-hover);
        border-color: var(--fgb-accent-green);
    }

    .fgb-ms-action-btn:active {
        background: var(--fgb-accent-green-active);
    }

    .fgb-ms-action-btn:focus-visible {
        outline: 2px solid var(--fgb-accent-green);
        outline-offset: 1px;
    }

.fgb-ms-count {
    margin-left: auto;
    color: var(--fgb-text-muted);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

/* Empty / loading state inside options list */
.filter-dropdown-empty {
    padding: 16px 12px;
    text-align: center;
    color: var(--fgb-text-muted);
    font-size: 0.82rem;
    font-style: italic;
}

/* Menu layout — search/actions stay put while options scroll */
.filter-dropdown-menu {
    display: none;
    flex-direction: column;
    max-height: 360px;
    overflow: hidden;
    background: var(--fgb-bg-secondary);
    border: 1px solid var(--fgb-border-color);
    box-shadow: var(--fgb-shadow-lg);
}

    .filter-dropdown-menu.show {
        display: flex;
    }

.filter-dropdown-options {
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: 260px;
}

    .filter-dropdown-options::-webkit-scrollbar {
        width: 8px;
    }

    .filter-dropdown-options::-webkit-scrollbar-track {
        background: transparent;
    }

    .filter-dropdown-options::-webkit-scrollbar-thumb {
        background: var(--fgb-border-color);
        border-radius: 4px;
    }

        .filter-dropdown-options::-webkit-scrollbar-thumb:hover {
            background: var(--fgb-text-muted);
        }

/* ============================================================
   Accent touches on existing classes
   ============================================================ */

/* Open trigger: green accent ring */
.filter-dropdown-trigger.open {
    border-color: var(--fgb-accent-green);
    box-shadow: 0 0 0 2px var(--fgb-accent-green-hover);
}

/* Hover on an option inside the component menu */
.filter-dropdown-menu .filter-checkbox-option:hover {
    background: var(--fgb-accent-green-hover);
}

/* Checkbox green tint */
.filter-dropdown-menu .filter-checkbox-option input[type="checkbox"] {
    accent-color: var(--fgb-accent-green);
}

/* Chip hover — subtle green tint on the remove button */
.filter-chip .chip-remove:hover {
    background: var(--fgb-accent-green-hover);
    color: var(--fgb-accent-green);
}
