.mt-select__wrapper {
  position: relative;
  cursor: text;

  &.is-disabled {
    cursor: not-allowed;
  }
}

.mt-select {
  @borderradius: 5px;
  @bordercolor: @blue-2;
  @borderthickness: 2px;

  border-radius: @borderradius;
  background: @blue-1;
  border: @borderthickness solid @bordercolor;
  padding: 2px 45px 2px 3px;
  transition: 50ms;

  &:hover {
    box-shadow: 5px 5px 12.5px -3px fade(@blue-dark, 10%);
  }

  .is-disabled & {
    background: @gray-1;
    border: 2px solid @gray-3;

    &:hover {
      box-shadow: none;
    }
  }

  input {
    border: none;
    outline: none;
    background: @blue-1;
    height: 23px;
    margin-left: 2px;
    font-weight: bold;

    .is-disabled & {
      background: @gray-1;
    }
  }

  .mt-select__values {
    display: flex;
    flex-wrap: wrap;

    &__searchcontainer {
      display: flex;
      overflow: hidden;
      width: 100%;
    }

    &-searchicon {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 17.5px;
      width: 20px;
    }

    &__spinner {
      height: 100%;
      width: 100%;
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

  }

  &__suggestions {
    border-radius: @borderradius;
    border: @borderthickness solid @bordercolor;
    position: absolute !important;
    left: 0;
    box-shadow: 5px 5px 12.5px -3px fade(@black, 10%);
    right: 0;
    z-index: 1000;
    transform: translateY(5px);
    background: @white;
    max-height: 200px;
    overflow-y: auto;
    animation: abc 150ms;

    @keyframes abc {
      from {
        opacity: 0;
        transform: translateY(0);
      }
      to {
        opacity: 1;
      }
    }

    .mt-select-spinner {
      text-align: center !important;
      height: 30px !important;
      &-without-suggestions {
        text-align: center !important;
        top: 10px !important;
      }
    }
  }

  &__empty-message {
    color: @red;
    display: inline-block;
    margin: 3px 0 5px 6px;
  }
}

.mt-select__clear-icon {
  font-size: 14px;
  height: 29px;
  width: 20px;
  text-align: center;
  cursor: pointer;
  position: absolute;
  right: 25px;
  top: 2px;
  padding-top: 3px;
}

.mt-select__open-icon {
  font-size: 14px;
  height: 29px;
  width: 20px;
  text-align: center;
  cursor: pointer;
  position: absolute;
  right: 5px;
  top: 2px;
  overflow: hidden;
  padding-top: 3px;

  .is-disabled & {
    color: @gray-4;
    cursor: not-allowed;
  }
}

.mt-select-selection-multiple {
  margin-right: 3px;
  margin-top: 2px;
  background-color: @blue-dark;
  display: inline-flex;
  align-items: center;
  padding: 0 25px 0 10px;
  .border-radius(2px);
  position: relative;
  height: 23px;
  max-width: 100%;
  box-shadow: 0 0 4px 1px @blue-3;

  .is-disabled & {
    border: 1px solid @gray-4;
    background: @gray-1;
    padding: 0px 5px 0 5px;
    height: 23px;
  }

  &__label {
    display: inline-block;
    font-size: 11px;
    color: @white;
    position: relative;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-x: hidden;

    .is-disabled & {
      color: @gray-6;
    }
  }

  &__remove {
    cursor: pointer;
    display: inline-block;
    font-size: 16px;
    color: @white;
    position: absolute;
    right: 5px;
    top: 0;
    height: 23px;
    .border-radius(0 3px 3px 0);

    .is-disabled & {
      display: none;
    }
  }
}

.mt-select-selection-multiple-additional {
  margin-right: 3px;
  margin-top: 2px;
  background-color: @blue-hover;
  display: inline-flex;
  padding: 5px 5px 0 5px;
  .border-radius(3px);
  position: relative;
  height: 23px;
  border: 1px solid @blue;

  .is-disabled & {
    border: 1px solid @gray-4;
    background: @gray-1;
    height: 21px;
    padding: 4px 5px 3px 5px;
  }

  &__label {
    display: inline-block;
    font-size: 11px;
    position: relative;
    top: -2px;

    .is-disabled & {
      color: @gray-6;
    }
  }
}

.mt-select-selection-single {
  position: absolute;
  left: 7px;
  height: 30px;
  top: 0;
  padding: 6px 0 5px;

  .is-disabled & {
    color: @gray-4;
  }
}

.mt-select-suggestion {
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;

  &__icon {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 16px 16px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid @grey-12;
    position: relative;

    .is-multiple & {
      border-radius: 2px;
    }

    .mark {
      @size: 8px;

      border-radius: 50%;
      height: @size;
      width: @size;
      display: none;
      background: @white;
    }

    &.checked {
      border-color: @white;

      .mark {
        display: block;
      }

      .is-multiple & {
        .mark {
          border-radius: 0px;
        }
      }
    }
  }

  &:hover {
    background: @blue-hover;
  }

  &.is-active {
    background: @blue-hover;
    font-weight: bold;
  }

  &.is-selected {
    background: @blue-dark;
    color: @white;

    &.is-active {
      font-weight: bold;
    }
  }

  &.is-disabled {
    background: @white;
    color: @grey-13;
    cursor: not-allowed;

    .checked {
      border-color: @grey-13;

      .mark {
        background: @grey-13;
      }
    }
  }
}