.tm-business-category + .select2-container { width: 100% !important; }
.tm-business-category + .select2-container .select2-selection--single { height: 44px; min-height: 44px; border: 1px solid var(--bs-border-color); border-radius: 12px; background: var(--bs-body-bg); color: var(--bs-body-color); display: flex; align-items: center; }
.tm-business-category + .select2-container .select2-selection__rendered { color: var(--bs-body-color) !important; line-height: 42px; padding-left: 14px; }
.tm-business-category + .select2-container .select2-selection__placeholder { color: var(--bs-secondary-color) !important; }
.tm-business-category + .select2-container .select2-selection__arrow { height: 42px; right: 8px; }
.tm-category-dropdown { border-color: var(--bs-border-color) !important; background: var(--bs-body-bg) !important; color: var(--bs-body-color) !important; border-radius: 12px !important; overflow: hidden; }
.tm-category-dropdown .select2-results__option { color: var(--bs-body-color); }
.tm-category-dropdown .select2-results__group { color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); }
.tm-category-dropdown .select2-search__field { background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color) !important; border-radius: 8px; }
.tm-business-category + .select2-container--focus .select2-selection--single { border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .16); }

/* Keep selected category legible in both themes, including after the menu closes.
   Select2 places its dropdown outside the form, so scope the popup by dropdownCssClass. */
.tm-business-category + .select2-container--default .select2-selection--single,
.select2-container--default .tm-category-selection.select2-selection--single {
  background-color: var(--bs-body-bg, #fff) !important;
  border-color: var(--bs-border-color, #dee2e6) !important;
}
.tm-business-category + .select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .tm-category-selection .select2-selection__rendered {
  color: var(--bs-body-color, #212529) !important;
  -webkit-text-fill-color: var(--bs-body-color, #212529);
}
.select2-container--default .tm-category-dropdown .select2-results__option,
.tm-category-dropdown .select2-results__option {
  background-color: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529) !important;
}
.select2-container--default .tm-category-dropdown .select2-results__option--selected,
.tm-category-dropdown .select2-results__option--selected {
  background-color: var(--bs-tertiary-bg, #e9ecef) !important;
  color: var(--bs-body-color, #212529) !important;
}
.select2-container--default .tm-category-dropdown .select2-results__option--highlighted[aria-selected],
.select2-container--default .tm-category-dropdown .select2-results__option--highlighted.select2-results__option--selected,
.tm-category-dropdown .select2-results__option--highlighted {
  background-color: var(--bs-primary, #0d6efd) !important;
  color: #fff !important;
}
/* Support applications that switch themes via data-bs-theme on html/body. */
[data-bs-theme="dark"] .select2-container--default .tm-category-selection .select2-selection__rendered,
[data-bs-theme="dark"] .tm-business-category + .select2-container .select2-selection__rendered {
  color: var(--bs-body-color, #dee2e6) !important;
  -webkit-text-fill-color: var(--bs-body-color, #dee2e6);
}
[data-bs-theme="dark"] .tm-category-dropdown .select2-results__option--highlighted {
  color: #fff !important;
}
