/**
 * Select2 clear (×) alignment — dashboard RTL/LTR
 * Fixes floated clear button sitting on its own line or touching label text.
 */

.select2-container--default .select2-selection--single .select2-selection__rendered {
  display: flex !important;
  align-items: center !important;
  flex-direction: row-reverse;
  width: 100%;
  padding-top: 0 !important;
  line-height: 1.45 !important;
  overflow: hidden;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  float: none !important;
  position: static !important;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  line-height: 1;
  margin-top: 0 !important;
  margin-inline-start: 0.35rem;
  padding: 0;
  border: 1px solid #f5c2c7;
  border-radius: 0.35rem;
  background-color: #fde8ea;
  color: #c82333;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  background-color: #f8d7da;
  border-color: #f1aeb5;
  color: #a71d2a;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-top: 0 !important;
  padding: 0 0.35rem;
  border: 1px solid #f5c2c7;
  border-radius: 0.35rem;
  background-color: #fde8ea;
  color: #c82333;
  font-weight: 700;
  opacity: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
  background-color: #f8d7da;
  border-color: #f1aeb5;
  color: #a71d2a;
}

.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__rendered {
  justify-content: flex-end;
  text-align: right;
  padding-left: 2rem !important;
  padding-right: 0.5rem !important;
}

.select2-container--default[dir="ltr"] .select2-selection--single .select2-selection__rendered {
  justify-content: flex-start;
  text-align: left;
  padding-right: 2rem !important;
  padding-left: 0.5rem !important;
}

/* HTML option templates (car dropdowns) */
.select2-container--default .select2-selection--single .select2-selection__rendered .replacement-option {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
