$namespace: re-select;

.#{$namespace} {
  &-wrap {
    min-width: 177px;
    background-color: #fff;
    background-clip: padding-box;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  &-title, &-content, &-bottom {
    display: flex;
  }

  &-title {
    padding: .09rem 0;
    background-color: transparent;
    cursor: context-menu;
    border-bottom: 1px solid #D7D7D7;
    font-weight: bold;
    color: #606060;
    font-size: .12rem;
    margin: 0 .1rem;
  }

  &-col {
    font-size: .12rem;
    padding-right: .07rem;
    flex: auto;

    &:last-child {
      padding-right: 0;
    }

    & > li {
      padding: .08rem .11rem;
      cursor: pointer;

      &:hover {
        background-color: #eee;
      }

      &.#{$namespace}-active {
        background-color: #e6f7ff;
      }

      &.#{$namespace}-unselect {
        background-color: transparent;
        cursor: context-menu;
      }
    }
  }

  &-input-group {
    position: relative;
    overflow: hidden;
  }

  &-input-control {
    -webkit-appearance: none;
    outline: none;
    user-select: none;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 2px;
    resize: none;
    transition: all .2s;
    background-color: #fff;
    text-overflow: ellipsis;
    padding: .08rem .28rem .07rem .07rem;
    font-size: .14rem;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    cursor: pointer;

    &.#{$namespace}-focused {
      box-shadow: 0 0 4px rgba(#348FEE, 0.8);
      border-color: rgba(#348FEE, 0.8);
    }

    &.#{$namespace}-empty {
      color: #888;
    }

    &.error {
      background-color: rgb(255, 250, 205);
    }
  }

  &-icon {
    position: absolute;
    right: .21rem;
    top: 50%;
    color: #ccc;
    font-size: 0;
    transform: translate(100%, -50%);
    transition: transform .2s;

    svg {
      font-size: .12rem;
    }
  }

  &-active .#{$namespace}-icon {
    transform: translate(100%, -50%) rotate(180deg);
  }
}

@media only screen and (max-width: 767px) {
  .#{$namespace} {
    &-input-control {
      padding: .1rem .05rem;
      font-size: .14rem;
    }
  }
}