@import 'common/var.scss';

.qf-select {
  /*display: inline-block;*/
  position: relative;
  height: 36px;
  outline: none;

  .qf-select-input {
    display: block;
    position: relative;
    font-size: 14px;
    width: 100%;
    height: 100%;

    input {
      cursor: pointer;
      background-color: #fff;
      outline-style: none;
      outline: 0;
      border-radius: 4px;
      border: 1px solid $--color-border;
      box-sizing: border-box;
      color: $--color-font-light-1;
      display: inline-block;
      font-size: inherit;
      height: 100%;
      line-height: 1;
      outline: none;
      padding: 0 28px 0 12px;
      transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
      width: 100%;

      &:focus {
        border-color: $--color-focus;
      }
    }

    &.is-hover input {
      border-color: $--color-focus;
    }

    .qf-select-input-suffix {
      position: absolute;
      height: 100%;
      width: 24px;
      right: 4px;
      top: 0;
      text-align: center;
      color: #c0c4cc;
      transition: all .3s;
    }

    .qf-select-trigger {
      font-size: 14px;
      display: inline-block;
      transition: transform .3s;
      transform: rotate(0deg);
      line-height: 36px;
      cursor: pointer;
      height: 100%;

      &.is-reverse {
        transform: rotate(180deg);
      }
    }
  }

  .qf-select-popper {
    padding: 12px 0;
    min-width: 80px;

    &.qf-popper[x-placement^=top] {
      margin-bottom: 4px;
    }

    &.qf-popper[x-placement^=bottom] {
      margin-top: 4px;
    }

    .qf-input {
      margin: -4px 12px 4px 12px;
      height: 32px;
      font-size: 12px;
    }

  }

  .qf-select-options {
    overflow: auto;
    list-style: none;
    position: relative;
    margin: 0;
    box-sizing: border-box;
  }

  &.is-disabled {
    .qf-select-input {
      input {
        background-color: #f0f2f5;
      }

      &.is-hover input {
        border-color: $--color-border;
      }
    }

    .qf-select-trigger {
      color: #c0c4cc;
    }
  }

  &.qf-select-small {
    height: 32px;

    .qf-select-input {
      font-size: 13px;

      .qf-select-trigger {
        line-height: 32px;
      }
    }
  }
}
