/* Fix visual para Select2 con Bootstrap 5 */
.select2-container .select2-selection,
.select2-container .select2-selection--single {
  display: contents !important;
  min-height: 38px;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  background-color: #fff;
  box-shadow: none;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  display: flex;
  align-items: center;
}

.select2-container .select2-selection:focus,
.select2-container .select2-selection--single:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

.select2-container .select2-selection__rendered {
  line-height: 1.5;
  padding-left: 0;
  padding-right: 0;
  color: #212529;
  background-color: transparent;
}

.select2-container .select2-selection__arrow {
  height: 38px;
  right: 10px;
  top: 0;
  display: flex;
  align-items: center;
}

.select2-container .select2-dropdown {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
  background-color: #fff;
}

.select2-container .select2-results__option--highlighted {
  background-color: #0d6efd;
  color: #fff;
}

.select2-container .select2-results__option[aria-selected=true] {
  background-color: #e9ecef;
  color: #212529;
}

.select2-container .select2-selection__clear {
  font-size: 1.2rem;
  color: #6c757d;
  margin-right: 0.5rem;
  margin-left: 0.2rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.select2-container .select2-selection__clear:hover {
  opacity: 1;
  color: #dc3545;
}
.select2-container {
  width: 100% !important;
}
.select2-container--bootstrap-5 .select2-selection {
  min-height: 38px;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  background-color: #fff;
  box-shadow: none;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  display: flex;
  align-items: center;
}

.select2-container--bootstrap-5 .select2-selection:focus,
.select2-container--bootstrap-5 .select2-selection--single:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

.select2-container--bootstrap-5 .select2-selection__rendered {
  line-height: 1.5;
  padding-left: 0;
  padding-right: 0;
  color: #212529;
  background-color: transparent;
}

.select2-container--bootstrap-5 .select2-selection__arrow {
  height: 38px;
  right: 10px;
  top: 0;
  display: flex;
  align-items: center;
}

.select2-container--bootstrap-5 .select2-dropdown {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background-color: #0d6efd;
  color: #fff;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected=true] {
  background-color: #e9ecef;
  color: #212529;
}

.select2-container--bootstrap-5 .select2-selection--single {
  display: flex;
  align-items: center;
  height: 38px;
  min-height: 38px;
  padding: 0;
  background-color: #fff;
  border: none;
  box-shadow: none;
}

.select2-container--bootstrap-5 {
  width: 100% !important;
}

/* Ajuste para el botón de limpiar (clear) */
.select2-container--bootstrap-5 .select2-selection__clear {
  font-size: 1.2rem;
  color: #6c757d;
  margin-right: 0.5rem;
  margin-left: 0.2rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.select2-container--bootstrap-5 .select2-selection__clear:hover {
  opacity: 1;
  color: #dc3545;
}

/* Ajuste para el dropdown para que se vea como Bootstrap */
.select2-container--bootstrap-5 .select2-dropdown {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
  background-color: #fff;
}
