@import "../../Form/style/common.scss";
.select {
  position: relative;
  width: 100%;
  height: 32px;
  font-size: 14px;
  border: 1px solid $borderColor;
  background-color: #fff;
  color: #6d6d75;
  &.mini {
    height: 26px;
    .Select-control {
      .Select-input {
        line-height: 22px;
        font-size: 12px;
      }
    }
    .Select-placeholder {
      font-size: 12px;
      line-height: 24px;
    }
    .del-icon {
      width: 14px;
      height: 14px;
    }
    .multi-select-value {
      height: 22px;
    }
  }
  .Select-control {
    padding-left: 10px;
    width: 100%;
    position: relative;
    display: flex;
    height: 100%;
    cursor: pointer;
  }
  &.multi {
    height: auto;
    min-height: 32px;
    &.mini {
      min-height: 26px;
    }
    .Select-control {
      padding-left: 2px;
    }
  }
  &.background {
    background-color: $input-bg-color;
  }

  .Select-value-zone {
    flex: 1;
    height: 100%;
    overflow: hidden;
  }
  .Select-placeholder {
    position: absolute;
    top: 0;
    left: 10px;
    line-height: 30px;
    color: $font-color-low;
  }
  .Select-input {
    position: relative;
    line-height: 28px;
    padding: 1px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    input {
      padding: 0;
      box-sizing: content-box;
      width: 5px;
      background: none transparent;
      border: 0 none;
      box-shadow: none;
      cursor: default;
      display: inline-block;
      margin: 0;
      outline: none;
      line-height: 17px;
    }
  }
  .Select-clear-zone {
    line-height: 0;
    color: #999;
    cursor: pointer;
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    flex: 0 0 17px;
    width: 17px;
  }
  .del-icon {
    width: 16px;
    height: 16px;
    fill: #a4a4ae;
    vertical-align: middle;
    &:hover {
      fill: #6d6d75;
    }
  }
  .Select-arrow-zone {
    cursor: pointer;
    display: flex;
    position: relative;
    flex: 0 0 26px;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    padding-top: 2px;
  }
  .select-single-value {
    position: absolute;
    width: 100%;
  }
  .drop-down-icon {
    stroke: #a4a4ae;
    fill: none;
    width: 12px;
    &.mini {
      width: 10px;
    }
  }
  &.is-open {
    @include focusStyle();
    .drop-down-icon {
      stroke: $primaryBlueColor;
    }
  }
  &.no-arrow {
    .Select-arrow-zone {
      display: none;
    }
    .Select-clear-zone {
      padding-right: 10px;
      flex: 0 0 27px;
      width: 27px;
    }
  }
  &.white {
    .Select-control {
      background-color: #fff;
    }
    .Select-option {
      background-color: #fff;
      color: $font-color-normal;
    }
  }
  &.disabled {
    @include disabledStyle();
    .Select-input {
      @include disabledStyle();
    }
    .Select-clear-zone {
      display: none;
    }
    .Select-arrow-zone {
      @include disabledStyle();
    }
    .Select-placeholder {
      @include disabledStyle();
    }
  }
  &.error {
    @include errorStyle();
  }
}
.select-no-result {
  color: $font-color-normal;
  line-height: 30px;
  padding-left: 10px;
}
.select-option-wrap,
.multi-input-tip {
  display: none;
  width: 100%;
  margin-top: -1px;
  background: #ffffff;
  box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  color: $font-color-normal;
  z-index: 100;
  border: 1px solid $basic-border-color;
  border-radius: 2px;
  max-height: 150px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px;
  &.show {
    display: block;
  }
}
.multi-input-tip {
  position: fixed;
}
.select-option-wrap {
  position: absolute;
  &.inline {
    top: 100%;
    margin-top: 2px;
    left: 0;
    width: 100%;
  }
}
.multi-input-tip {
  display: block;
  line-height: 30px;
  padding-left: 10px;
  background-color: $subBlueColor;
  color: #fff;
}
.select-option-content {
  list-style: none;
  margin: 0;
  padding: 0;
}
.select-option-item {
  height: 30px;
  line-height: 30px;
  padding-left: 9px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  &.active {
    color: $subBlueColor;
  }
  &.focus {
    background-color: $subBlueColor;
    color: #fff;
    &.disabled {
      @include disabledStyle();
      background-color: transparent;
    }
  }
  &.disabled {
    @include disabledStyle();
    background-color: #f9f9f9;
  }
}
.mini {
  .select-option-item {
    height: 27px;
    line-height: 27px;
    font-size: 12px;
  }
}
.mini {
  .multi-select-value {
    font-size: 12px;
  }
}
.multi-select-value {
  display: inline-flex;
  align-items: center;
  border: 1px solid $primaryBlueColor;
  background-color: $primaryBlueColor;
  border-radius: 2px;
  color: #fff;
  padding: 5px;
  font-size: 14px;
  margin-right: 5px;
  line-height: 16px;
  height: 26px;
  .multi-item-del-icon {
    width: 8px;
    height: 8px;
    margin-left: 5px;
    margin-top: 4px;
    stroke: #fff;
  }
  &:hover {
    cursor: default;
  }
  &.disabled {
    background-color: #444;
    border-color: #444;
    cursor: not-allowed;
    .multi-item-del-icon {
      display: none;
    }
  }
}
.delete-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  line-height: 11px;
  font-size: 13px;
  text-align: center;
  &:hover {
    cursor: pointer;
  }
}
