/* Select2 theme aligned with Junisignal shadcn tokens */

.select2-container--default .select2-selection--single {
  height: 2.5rem;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--background));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: hsl(var(--foreground));
  line-height: 2.375rem;
  padding-left: 0.75rem;
  padding-right: 2rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: hsl(var(--muted-foreground));
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 2.375rem;
  right: 0.5rem;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: hsl(var(--ring));
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25);
}

.select2-dropdown {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--popover));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  z-index: 60;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0.5rem 0.75rem;
}

.select2-container--default .select2-results__option {
  color: hsl(var(--foreground));
  padding: 0.5rem 0.75rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.select2-container--default .select2-results__option--selected {
  background-color: hsl(var(--primary) / 0.12);
  color: hsl(var(--foreground));
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: hsl(var(--muted-foreground)) transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent hsl(var(--muted-foreground)) transparent;
}

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