.nut-theme-dark {
  .nut-input {
    background: $dark-background;
    &__label {
      color: $dark-color;
    }
    .input-text,
    &__text--readonly {
      color: $dark-color;
    }
  }
}
input,
textarea {
  font: inherit;
  .nut-placeholder {
    // font: inherit;
  }
}
textarea {
  .nut-placeholder {
    // padding: 0 2px;
    // font: inherit;
  }
}
.nut-input {
  position: relative;
  width: 100%;
  padding: 10px 25px;
  display: flex;
  line-height: 20px;
  background: $white;
  font-size: $input-font-size;
  box-sizing: border-box;
  &.center {
    align-items: center;
  }
  &--border {
    border-bottom: 1px solid $input-border-bottom;
  }

  .input-text,
  &__text--readonly {
    width: 100%;
    padding: 0;
    // padding-right: 35px;
    line-height: inherit;
    text-align: left;
    outline: 0 none;
    border: 0;
    text-decoration: none;
    background: transparent;
    resize: none;
    flex: 1;
  }
  .input-text {
    font-size: $input-font-size;
    // height: auto;
    // min-height: auto;
  }
  &__label {
    width: 80px;
    overflow: hidden;
    margin-right: 6px;
    text-align: left;
  }
  &-value {
    flex: 1;
    vertical-align: middle;
  }
  &-inner {
    position: relative;
    display: flex;
    align-items: center;
  }
  &-box {
    position: relative;
    width: 100%;
    display: flex;
    flex: 1;
  }
  &-disabled-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
  }
  &-word-limit {
    display: flex;
    justify-content: flex-end;
    color: #808080;
    font-size: 12px;
    padding: 0 10px;
    // margin-top: -50%;
    // line-height: var(--van-field-word-limit-line-height);
  }
  &-left-box,
  &-right-box {
    display: flex;
    align-items: center;
    font-size: 0;
  }
  &-right-box {
    margin-left: 4px;
  }
  &-left-box {
    margin-right: 4px;
  }
  &-clear-box {
    height: 100%;
    display: flex;
    align-items: center;
    // .nut-input-clear {
    //   vertical-align: -2px;
    // }
  }
  &-clear {
    width: 16px;
    height: 16px;
    color: #c8c9cc;
    cursor: pointer;
    margin: 0 4px;
  }
  &--required {
    &::before {
      position: absolute;
      left: 14px;
      color: $input-required-color;
      content: '*';
    }
  }
  &--disabled {
    color: $input-disabled-color !important;
    input:disabled {
      background: none;
      color: $input-disabled-color;
      cursor: not-allowed;
      opacity: 1;
      -webkit-text-fill-color: $input-disabled-color;
    }
  }
  &--error,
  &--error::placeholder {
    color: $input-required-color;
    -webkit-text-fill-color: $input-required-color;
  }
}

.nut-form-item {
  .nut-input {
    padding: 0px;
    margin: 0px;
    line-height: var(--nut-cell-line-height);
  }
}
