/* ── CustomMultiSelect Component ─────────────────────────────── */

.custom-select-wrapper {
    position: relative;
    min-width: 250px;
}

.custom-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #2d3748;
    text-align: left;
    gap: 6px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.custom-select-button:hover {
    border-color: #3182ce;
}

.custom-select-button:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.custom-select-button[aria-expanded="true"] .select-arrow,
.custom-select-button.open .select-arrow {
    transform: rotate(180deg);
}

.selected-chips {
    flex: 1;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    overflow: hidden;
}

.jurisdiction-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #3182ce;
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.chip-remove:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.select-arrow {
    color: #718096;
    margin-left: 8px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    max-height: 450px;
    overflow: hidden;
}

.custom-select-dropdown.open,
.custom-select-dropdown.show {
    display: block;
}

.select-search {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.select-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.select-search-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.1);
}

.select-options {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}

.state-group-header {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f7fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.select-option {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    position: relative;
}

.select-option:hover {
    background-color: #f7fafc;
}

.select-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.select-option .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.select-option input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #3182ce;
    border-color: #3182ce;
}

.select-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.select-option .option-label {
    font-size: 14px;
    color: #2d3748;
    flex: 1;
}

.select-option.indent {
    padding-left: 32px;
}

.select-custom-footer {
    flex-shrink: 0;
    margin-top: auto;
}
