@import "select2/src/scss/core.scss";

/* See https://github.com/apalfrey/select2-bootstrap-5-theme/issues/75 */
$s2bs5-border-color: $border-color;
@import "select2-bootstrap-5-theme/src/include-all";

/* Hide selected options in choices */
.select2-results__option[aria-selected="true"] {
  display: none;
}

.select2-container--bootstrap-5 {
  .select2-selection {
    // Fix misaligned clear button
    &--single .select2-selection__clear {
      position: absolute;
    }

    &__choice__remove {
      cursor: pointer;
    }

    &.select2-selection--multiple {
      padding: 1rem;

      .select2-selection__rendered {
        display: flex;
      }
    }
  }
  &.select2-container--open .select2-selection {
    box-shadow: none;
  }

  .select2-results__option--highlighted {
    filter: brightness(0.8);
  }
}
