/* ============================================================
   ctr_selects.css
   Projektweites Tom-Select-Theme für Single- und Multi-Selects.
   ============================================================ */

.ts-wrapper.form-select,
.ts-wrapper.form-select-sm,
.ts-wrapper.single,
.ts-wrapper.multi {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ts-wrapper .ts-control {
  min-height: 2.375rem;
  border: 1px solid #c7d2e0;
  border-radius: .45rem;
  background: #fff;
  color: #1f2937;
  font-size: .95rem;
  line-height: 1.35;
  padding: .42rem 2rem .42rem .75rem;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.ts-wrapper.form-select-sm .ts-control,
.ts-wrapper .ts-control.form-select-sm {
  min-height: 2rem;
  padding: .28rem 1.75rem .28rem .6rem;
  font-size: .875rem;
}

.ts-wrapper.focus .ts-control,
.ts-wrapper.dropdown-active .ts-control {
  border-color: var(--ctr-primary, #1a365d);
  box-shadow: 0 0 0 .2rem rgba(26, 54, 93, .16);
}

.ts-wrapper.single .ts-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: .75rem;
  width: .55rem;
  height: .55rem;
  border-right: 2px solid #52667f;
  border-bottom: 2px solid #52667f;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.ts-wrapper.single.dropdown-active .ts-control::after {
  transform: translateY(-25%) rotate(225deg);
}

.ts-wrapper .ts-control > input {
  min-width: 7rem;
  color: #1f2937;
}

.ts-wrapper .ts-control > input::placeholder {
  color: #6b7280;
  opacity: 1;
}

.ts-wrapper.multi .ts-control {
  gap: .25rem;
  padding: .32rem .55rem;
}

.ts-wrapper.multi .ts-control .item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: .12rem .18rem .12rem 0;
  padding: .22rem .48rem;
  border: 1px solid rgba(26, 54, 93, .18);
  border-radius: 999px;
  background: #eaf2fb;
  color: #143153;
  font-weight: 600;
  line-height: 1.1;
}

.ts-wrapper.multi .ts-control .item.active {
  background: #dceaf8;
  color: #0f2440;
}

.ts-wrapper.plugin-remove_button .item .remove {
  margin-left: .2rem;
  border-left: 1px solid rgba(20, 49, 83, .2);
  color: #143153;
  font-size: 1rem;
  line-height: 1;
  padding-left: .35rem;
  text-decoration: none;
}

.ts-wrapper.plugin-clear_button .clear-button {
  right: 1.9rem;
  color: #6b7280;
  font-size: 1rem;
  opacity: .85;
}

.ts-dropdown {
  border: 1px solid #c7d2e0;
  border-radius: .45rem;
  box-shadow: 0 .75rem 1.5rem rgba(15, 36, 64, .14);
  overflow: hidden;
  z-index: 1080;
}

.ts-dropdown .dropdown-input-wrap {
  padding: .45rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.ts-dropdown .dropdown-input {
  border: 1px solid #c7d2e0;
  border-radius: .35rem;
  padding: .45rem .6rem;
}

.ts-dropdown .option,
.ts-dropdown .no-results,
.ts-dropdown .create {
  padding: .55rem .75rem;
}

.ts-dropdown .active {
  background: #eef5ff;
  color: #0f2440;
}

.ts-wrapper.disabled .ts-control,
.ts-wrapper.readonly .ts-control {
  background: #eef2f7;
  color: #6b7280;
}

.is-invalid + .ts-wrapper .ts-control,
.ts-wrapper.is-invalid .ts-control,
.was-validated select:invalid + .ts-wrapper .ts-control {
  border-color: #dc3545;
}

.is-invalid + .ts-wrapper.focus .ts-control,
.was-validated select:invalid + .ts-wrapper.focus .ts-control {
  box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .18);
}

.input-group > .ts-wrapper {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 575.98px) {
  .ts-wrapper .ts-control {
    min-height: 2.5rem;
  }
}