/* Ensure select2 dropdown is visible above sticky headers, popups, and containers */
.select2-container--open {
    z-index: 9999999 !important;
}

.select2-container .select2-dropdown {
    z-index: 9999999 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
}

/* Ensure the text within select selections and options is fully visible */
.select2-container .select2-selection--single .select2-selection__rendered,
.select2-container .select2-selection--multiple .select2-selection__rendered,
.select2-container .select2-results__option,
.select2-container .select2-search__field {
    color: #222222 !important; /* Dark color for clear contrast */
    font-size: 14px !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: left !important;
}

/* Highlight style when hovering options */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* Fix cases where WooCommerce hidden select elements cause layout shifting or block clicking */
select.wc-enhanced-select,
select.country_to_state,
select.state_select {
    display: none !important;
}

/* Avoid selectWoo search input from collapsing */
.select2-container .select2-search--dropdown .select2-search__field {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10000000 !important;
}
