.select2 .selection {
    width: 100% !important;
}

.select2 .selection .select2-selection {
    /* padding: 27px 20px; */
    border-radius: 10px;
}

.select2 .selection .select2-selection.select2-selection--multiple {
    /* padding: 15px 20px; */
    border-radius: 10px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear,
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
    top: 25px !important;
    right: 15px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    border-radius: 10px !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 10px;
    box-sizing: border-box !important;
}

.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--below {
    border-radius: 10px;
    border-top: none !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    margin-top: 0 !important;
}

.select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection {
    border-bottom: none !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--above {
    border-radius: 10px;
    border-bottom: none !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-bottom: 0 !important;
}

.select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection {
    border-top: none !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.select2-container--bootstrap-5 .select2-search--inline .select2-search__field {
    padding: 0 5px;
}










/* customize for modal/single option selcet  */

.select2-container--bootstrap-5 .select2-selection--single {
    /* min-height: 50px !important; */
    /* padding: 0 !important;
        border: 1px solid #ced4da !important; */
    display: flex !important;
    align-items: center !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    /* padding-left: 12px !important; */
    /* padding: 27px 20px !important; */
    padding-right: 40px !important;
    color: #212529 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important;
    line-height: 36px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 8px !important;
    top: 1px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
    right: 30px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 16px !important;
    color: #6c757d !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--single {
    border-color: var(--ColorPrimary) !important;
    box-shadow: 0 0 0 0px var(--ColorPrimary) !important;
}

.select2-container--bootstrap-5 .select2-selection--single[aria-disabled="true"] {
    background-color: #e9ecef !important;
    opacity: 1 !important;
}

.form-control.select2-hidden-accessible+.select2-container {
    /* height: 50px !important; */
}


.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--ColorPrimary) !important;
    border-bottom-color: var(--ColorPrimary) !important;
    box-shadow: 0 0 0 0px var(--ColorPrimary) !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    color: var(--ColorDarkPrimary) !important;
    background-color: var(--ColorLightPrimary) !important;
    border-color: var(--ColorPrimary) !important;
    border-top-color: var(--ColorPrimary) !important;
    border-radius: 10px;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    color: var(--ColorDarkPrimary) !important;
    background-color: var(--ColorLightPrimary) !important;
    border: 1px solid var(--ColorPrimary) !important;
    border-radius: 10px !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted) {
    color: var(--ColorLightPrimary) !important;
    background-color: var(--ColorPrimary) !important;
}

/* =========================================================================
   DARK MODE & UNIFIED THEME STYLES FOR SELECT2 (Bootstrap 5 + Tailwind)
   ========================================================================= */

.select2-container--bootstrap-5 .select2-selection {
    transition: all 0.2s ease-in-out;
}

/* Multi-select selection layout */
.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: 42px !important;
    height: auto !important;
    padding: 5px 8px !important;
    border-radius: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    list-style: none !important;
}

/* Choice badges (Light Mode) */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 3px 8px !important;
    border-radius: 0.5rem !important;
    background-color: rgba(99, 102, 241, 0.12) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    color: #4338ca !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}

/* Choice Remove Button (Light Mode) */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    margin: 0 4px 0 0 !important;
    border: none !important;
    border-radius: 4px !important;
    background-color: rgba(99, 102, 241, 0.18) !important;
    color: #4338ca !important;
    font-size: 11px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

/* =========================================================================
   DARK MODE SELECT2 OVERRIDES
   ========================================================================= */

.dark .select2-container--bootstrap-5 .select2-selection,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

.dark .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #f8fafc !important;
}

.dark .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}

/* Dark Mode Multi-select Choice badges */
.dark .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(99, 102, 241, 0.22) !important;
    border: 1px solid rgba(99, 102, 241, 0.45) !important;
    color: #e0e7ff !important;
}

/* Dark Mode Choice Remove Button */
.dark .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    background-color: rgba(99, 102, 241, 0.35) !important;
    color: #ffffff !important;
}

.dark .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

.dark .select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field {
    color: #f8fafc !important;
}

.dark .select2-container--bootstrap-5 .select2-dropdown,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
    background-color: #0b1329 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

.dark .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

.dark .select2-container--bootstrap-5 .select2-results__option,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option {
    color: #cbd5e1 !important;
}

.dark .select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

.dark .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"],
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.dark .select2-container--bootstrap-5 .select2-selection__clear,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__clear {
    color: #94a3b8 !important;
}

/* Force visibility of selected/active option items in the dropdown list */
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected="true"] {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

.dark .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.dark .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected="true"] {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}