.form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px 15px;
}

.form-group {
  flex: 1;
  padding: 0 10px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.form-control:focus {
  border-color: #5f64ae;
  outline: none;
}

/* ----- Select2 single‐select styling ----- */
.select2-container--default .select2-selection--single {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  height: 42px; /* match your .form-control height */
  padding: 5px 12px; /* left/right padding */
  padding-right: 2.5rem; /* room for our custom arrow */
  box-sizing: border-box;
  position: relative; /* for the ::after arrow */
}

/* Text inside the single‐select */
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 32px; /* vert‐center text in 42px box */
  color: var(--bs-primary);
  font-size: 14px;
}

/* Placeholder color */
.select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  line-height: 32px;
  color: #aaa;
}

/* Hide the default Select2 arrow */
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  display: none;
}

/* Inject our FontAwesome chevron */
.select2-container--default .select2-selection--single::after {
  content: "\f078"; /* caret‐down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--bs-primary);
  font-size: 0.9em;
}

/* Hide chevron when there’s a selection (to avoid overlap with clear “×”) */
.select2-container--default .select2-selection--single.has-selection::after {
  display: none;
}

/* Optional: change arrow color on hover/focus */
.select2-container--default .select2-selection--single:hover::after,
.select2-container--default .select2-selection--single:focus::after {
  color: #5f64ae;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__clear {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.select2-container .select2-search--dropdown .select2-search__field {
  border: none !important;
}

/* ----- Select2 multiple tags styling ----- */
.select2-container--default .select2-selection--multiple {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 5px;
  min-height: 42px;
}
.select2-container--default
  .select2-selection--multiple
  .select2-selection__choice {
  background: var(--bs-success);
  color: var(--bs-primary);
  border: none;
  border-radius: 3px;
  margin: 2px 4px 2px 0;
  font-weight: 600;
}
.select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove {
  color: var(--bs-primary);
  margin-right: 4px;
  cursor: pointer;
}
.select2-container .select2-search--inline .select2-search__field {
  line-height: 1.5;
  margin-top: 2px;
}

.select2-container--default
  .select2-selection--multiple
  .select2-selection__clear {
  margin-top: 2px;
}

/* 1) make sure both single & multiple selections are position:relative */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  position: relative;
  padding-right: 2.5rem; /* room for icon */
}

/* 2) inject the FA caret-down */
.select2-container--default .select2-selection--single::after,
.select2-container--default .select2-selection--multiple::after {
  content: "\f078"; /* FontAwesome caret-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--bs-primary);
  font-size: 0.9em;
}

/* 3) hide it as soon as we’ve got at least one selection */
.select2-container--default .select2-selection--single.has-selection::after,
.select2-container--default .select2-selection--multiple.has-selection::after {
  display: none;
}

/* 4) optional hover/focus tint */
.select2-container--default .select2-selection--single:hover::after,
.select2-container--default .select2-selection--single:focus::after,
.select2-container--default .select2-selection--multiple:hover::after,
.select2-container--default .select2-selection--multiple:focus::after {
  color: #5f64ae;
}

/* ----- Hide native arrow & make room ----- */
.form-group {
  position: relative;
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}
