/* dark‐mode Select2 overrides */
.select2-container--bootstrap-5 .select2-selection--single {
  background-color: #2b2e3c !important;
  color:            #ffffff !important;
  border:           1px solid #3a3f58 !important;
  height:           calc(1.5em + .75rem + 2px) !important;
  padding:          .375rem .75rem !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
  background-color: #2b2e3c !important;
  border:           1px solid #3a3f58 !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background-color: #3a3f58 !important;
  color:            #ffffff !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
  background-color: #2b2e3c !important;
  color:            #ffffff !important;
  border:           1px solid #3a3f58 !important;
  min-height:       calc(1.5em + .75rem + 2px);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
  color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background-color: #3a3f58 !important;
  border:           1px solid #4b506a !important;
  color:            #ffffff !important;
}

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

/* Native multi-select styling for dark theme */
.dark-layout select[multiple].form-select {
  min-height: 120px;
  background-color: #2b2e3c;
  color: #ffffff;
  border: 1px solid #3a3f58;
}

.dark-layout select[multiple].form-select option {
  padding: 6px 10px;
  background-color: #2b2e3c;
  color: #ffffff;
}

.dark-layout select[multiple].form-select option:checked {
  background-color: #3b82f6;
  color: #ffffff;
}

/* Choices.js dark theme styling */
.choices-dark .choices__inner {
  background-color: #2b2e3c;
  border: 1px solid #3a3f58;
  color: #ffffff;
  min-height: 44px;
  padding: 5px 7.5px 3.75px;
}

.choices-dark .choices__list--multiple .choices__item {
  background-color: #3b82f6;
  border: 1px solid #2563eb;
  color: #ffffff;
  padding: 4px 10px;
  margin-bottom: 3.75px;
  margin-right: 3.75px;
  border-radius: 4px;
}

.choices-dark .choices__list--multiple .choices__item.is-highlighted {
  background-color: #2563eb;
  border: 1px solid #1d4ed8;
}

.choices-dark .choices__button {
  border-left: 1px solid #1d4ed8;
  background-image: url("data:image/svg+xml,%3Csvg width='21' height='21' viewBox='0 0 21 21' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23FFF' fill-rule='evenodd'%3E%3Cpath d='M2.592.044l18.364 18.364-2.548 2.548L.044 2.592z'/%3E%3Cpath d='M0 18.364L18.364 0l2.548 2.548L2.548 20.912z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.8;
}

.choices-dark .choices__button:hover,
.choices-dark .choices__button:focus {
  opacity: 1;
}

.choices-dark .choices__list--dropdown,
.choices-dark .choices__list[aria-expanded] {
  background-color: #2b2e3c;
  border: 1px solid #3a3f58;
  color: #ffffff;
}

.choices-dark .choices__list--dropdown .choices__item--selectable,
.choices-dark .choices__list[aria-expanded] .choices__item--selectable {
  color: #ffffff;
  padding: 10px;
}

.choices-dark .choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices-dark .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
  background-color: #3a3f58;
}

.choices-dark .choices__input {
  background-color: #2b2e3c;
  color: #ffffff;
}

.choices-dark .choices__input::placeholder {
  color: #9ca3af;
}

/* Deal modal stage pills (colored by stage) */
#qd-stage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 16px 0;
  border-bottom: 1px solid #3a3f58;
  align-items: center;
}

.qd-stage-pill {
  border: 2px solid transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
  white-space: nowrap;
}

.qd-stage-pill:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.qd-stage-pill.active {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.qd-stage-pill:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Kanban card labels container */
.k-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
}

.k-labels .badge {
  font-weight: 500;
  font-size: 10px;
  padding: 3px 8px;
}

/* Deal modal: keep disabled selects readable in dark theme */
.dark-layout #quickDealModal .form-select:disabled,
.dark-layout #quickDealModal .form-control:disabled {
  background-color: #2b2e3c !important;
  color: #cbd5e1 !important;
  border-color: #3a3f58 !important;
  opacity: 0.9;
}

.dark-layout #quickDealModal .form-select:disabled {
  background-image: none;
}