// stylelint-disable selector-class-pattern

.multiselect,
.multiselect__input,
.multiselect__single {
  @apply text-grey-text text-base;

  font-size: 100%;
  touch-action: manipulation;
}

.multiselect {
  @apply relative block w-full text-left;

  box-sizing: content-box;
  min-height: 40px;
}

.multiselect:focus {
  outline: none;
}

*[dir='rtl'] .multiselect {
  @apply text-right;
}

fieldset[disabled] .multiselect {
  pointer-events: none;
}

.multiselect__spinner {
  position: absolute;
  top: 1px;
  right: 1px;
  display: block;
  width: 48px;
  height: 35px;
  background: #fff;
}

.multiselect__spinner::before,
.multiselect__spinner::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  content: '';
  border-color: #41b883 transparent transparent;
  border-style: solid;
  border-width: 2px;
  border-radius: 100%;
  box-shadow: 0 0 0 1px transparent;
}

.multiselect__spinner::before {
  animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
  animation-iteration-count: infinite;
}

.multiselect__spinner::after {
  animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
  animation-iteration-count: infinite;
}

.multiselect__loading-enter-active,
.multiselect__loading-leave-active {
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

.multiselect__loading-enter,
.multiselect__loading-leave-active {
  opacity: 0;
}

.multiselect * {
  box-sizing: border-box;
}

.multiselect--disabled {
  pointer-events: none;
  background: #ededed;
  opacity: 0.6;
}

.multiselect--active {
  z-index: 50;
}

.multiselect__input,
.multiselect__single {
  @apply bg-grey-darker relative inline-block w-full py-1 pl-2 pr-3 mb-2 align-top border-0 rounded-lg;

  box-sizing: border-box;
  min-height: 20px;
  line-height: 20px;
  transition: border 0.1s ease;
}

.multiselect__single {
  margin-bottom: 8px;
}

.multiselect__tag ~ .multiselect__input,
.multiselect__tag ~ .multiselect__single {
  @apply w-auto;
}

.multiselect__input:hover,
.multiselect__single:hover {
  border-color: #cfcfcf;
}

.multiselect__input:focus,
.multiselect__single:focus {
  border-color: #a8a8a8;
  outline: none;
}

.multiselect__tags {
  @apply block bg-grey-darker border border-black rounded-lg text-sm pb-0 pl-2;

  min-height: 40px;
  padding-top: 6px;
  padding-right: 40px;
}

.multiselect__current {
  @apply block pt-2 pb-0 pl-4 m-0 overflow-hidden whitespace-no-wrap cursor-pointer border rounded;

  box-sizing: border-box;
  min-height: 40px;
  padding-right: 30px;
  line-height: 16px;
  text-decoration: none;
  border-color: #e8e8e8;
}

.multiselect__select {
  @apply absolute block py-1 px-2 m-0 text-center cursor-pointer;

  top: 1px;
  right: 1px;
  box-sizing: border-box;
  width: 40px;
  height: 38px;
  line-height: 30px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.multiselect--disabled .multiselect__current,
.multiselect--disabled .multiselect__select {
  color: #a6a6a6;
  background: #ededed;
}

*[dir='rtl'] .multiselect__tags {
  padding: 8px 8px 0 40px;
}

.multiselect--active:not(.multiselect--above) .multiselect__current,
.multiselect--active:not(.multiselect--above) .multiselect__input,
.multiselect--active:not(.multiselect--above) .multiselect__tags {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.multiselect--active .multiselect__select {
  transform: rotateZ(180deg);
}

.multiselect--above.multiselect--active .multiselect__current,
.multiselect--above.multiselect--active .multiselect__input,
.multiselect--above.multiselect--active .multiselect__tags {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.multiselect__input::placeholder {
  @apply text-grey-text;
}

.multiselect__tags-wrap {
  display: inline;
}

.multiselect__tag {
  @apply relative inline-block bg-primary max-w-full mr-3 overflow-hidden leading-none text-white whitespace-no-wrap rounded;

  padding: 2px 26px 2px 10px;
  text-overflow: ellipsis;
}

.multiselect__tag-icon {
  @apply absolute pin-t pin-r pin-b font-bold text-center cursor-pointer;

  width: 22px;
  margin-left: 7px;
  font-style: initial;
  line-height: 22px;
  transition: all 0.2s ease;
}

.multiselect__tag-icon::after {
  @apply text-base;

  line-height: 24px;
  content: '×';
}

.multiselect__tag-icon:focus,
.multiselect__tag-icon:hover {
  @apply bg-primary-light;
}

.multiselect__tag-icon:focus::after,
.multiselect__tag-icon:hover::after {
  @apply text-white;
}

.multiselect__select::before {
  @apply relative pin-r mt-1 border-solid;

  top: 10%;
  color: #999;
}

.multiselect__placeholder {
  display: inline-block;
  padding-top: 2px;
  margin-bottom: 10px;
  color: #adadad;
}

.multiselect--active .multiselect__placeholder {
  display: none;
}

.multiselect__content-wrapper {
  @apply absolute z-50 block w-full overflow-auto bg-grey-darker border border-black;

  max-height: 240px;
  border-top: none;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  -webkit-overflow-scrolling: touch;
}

.multiselect__content {
  display: inline-block;
  min-width: 100%;
  padding: 0;
  margin: 0;
  vertical-align: top;
  list-style: none;
}

.multiselect--above .multiselect__content-wrapper {
  bottom: 100%;
  border-top: 1px solid #e8e8e8;
  border-bottom: none;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.multiselect__content::-webkit-scrollbar {
  display: none;
}

.multiselect__element {
  display: block;
}

.multiselect__option {
  @apply relative block p-3 whitespace-no-wrap align-middle cursor-pointer;

  min-height: 40px;
  line-height: 16px;
  text-decoration: none;
  text-transform: none;
}

.multiselect__option::after {
  position: absolute;
  top: 0;
  right: 0;
  padding-right: 12px;
  padding-left: 20px;
  font-size: 12px;
  line-height: 45px;
}

.multiselect__option--highlight {
  @apply bg-grey;

  outline: none;
}

.multiselect__option--highlight::after {
  @apply bg-grey;

  content: attr(data-select);
}

.multiselect__option--selected {
  font-weight: bold;
}

.multiselect__option--selected::after {
  @apply text-grey-text;

  content: attr(data-selected);
}

.multiselect__option--selected.multiselect__option--highlight {
  @apply bg-red-light text-white;
}

.multiselect__option--selected.multiselect__option--highlight::after {
  @apply bg-red-light text-white;

  content: attr(data-deselect);
}

.multiselect__option--disabled {
  color: #a6a6a6;
  pointer-events: none;
  cursor: text;
  background: #ededed;
}

.multiselect__option--group {
  color: #35495e;
  background: #ededed;
}

.multiselect__option--group.multiselect__option--highlight {
  color: #fff;
  background: #35495e;
}

.multiselect__option--group.multiselect__option--highlight::after {
  background: #35495e;
}

.multiselect__option--disabled.multiselect__option--highlight {
  background: #dedede;
}

.multiselect__option--group-selected.multiselect__option--highlight {
  color: #fff;
  background: #ff6a6a;
}

.multiselect__option--group-selected.multiselect__option--highlight::after {
  color: #fff;
  content: attr(data-deselect);
  background: #ff6a6a;
}

.multiselect-enter-active,
.multiselect-leave-active {
  transition: all 0.15s ease;
}

.multiselect-enter,
.multiselect-leave-active {
  opacity: 0;
}

.multiselect__strong {
  display: inline-block;
  margin-bottom: 8px;
  line-height: 20px;
  vertical-align: top;
}

*[dir='rtl'] .multiselect__select {
  right: auto;
  left: 1px;
}

*[dir='rtl'] .multiselect__content {
  text-align: right;
}

*[dir='rtl'] .multiselect__option::after {
  right: auto;
  left: 0;
}

*[dir='rtl'] .multiselect__clear {
  right: auto;
  left: 12px;
}

*[dir='rtl'] .multiselect__spinner {
  right: auto;
  left: 1px;
}

@keyframes spinning {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(2turn);
  }
}
