//
// input-control
//

.#{$input-prefix-cls}-control {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-height: $input-height;
  padding-right: $input-padding-x;
  padding-left: $input-padding-x;
  font-size: $input-font-size;
  line-height: $input-height - $border-width*2;
  color: $gray-9;
  background-color: $white;
  border: $border-width solid transparent;
  border-radius: $border-radius;

  input,
  textarea {
    width: 100%;
    font-size: inherit;
    font-weight: 600;
    //line-height: $input-height - $border-width*2;
    color: inherit;

    &::placeholder {
      color: $gray-11;
    }
  }

  /* 用于解决picker中type等于button中样式 */
  input[type="button"] {
    border: 0 none;
    background: #fff;
    outline: none;
  }

  textarea{
    padding: ($list-item-height - $textarea-line-height)/2 0 ($list-item-height - $textarea-line-height)/2 0;
    font-weight: 400;
    line-height: $textarea-line-height;
  }

  .textarea-count {
    position: absolute;
    right: $textarea-count-position;
    bottom: $textarea-count-position;
    font-size: .28rem;
    color: $gray-11;

    span{
      color: $gray-9;
    }
  }

  // 清除图标
  .#{$input-prefix-cls}-control__clear {
    display: none;
    font-size: $input-clear-icon-font-size;
    color: $gray-11;
    @extend %aid-icon;

    &::before{
      content: "\F2B0";
    }
  }

  &--clear {
    .#{$input-prefix-cls}-control__clear {
      display: block;
    }
  }

  &--focus {
    border-color: $brand-primary;
  }

  // 输入框内容水平居右
  &--text-right {
    input {
      text-align: right;
    }
  }

  // 列表下的 input-control
  .#{$list-prefix-cls}__item & {
    min-height: $list-item-height;
    padding: 0;
    border: none;
    border-radius: 0;
  }

  // 弹出框下的 input-control
  .#{$modal-prefix-cls} & {
    min-height: $input-modal-height;
    padding-right: $input-modal-padding-x;
    padding-left: $input-modal-padding-x;
    margin-top: $input-modal-margin-top;
    font-size: $input-modal-font-size;
    line-height: $input-modal-height - $border-width-sm*2;
    border: $border-width-sm solid $gray-12;

    input {
      font-weight: 400;
      line-height: $input-modal-height - $border-width-sm*2;
    }
  }

  @include status-disabled;
}

