.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: $input-padding;
  display: flex;
  line-height: $input-line-height;
  background: $white;
  font-size: $input-font-size;
  box-sizing: border-box;
  &.center {
    align-items: center;
  }
  &.nut-input-border {
    border-bottom: 1px solid $input-border-bottom;
  }

  .input-text::placeholder {
    color: $input-placeholder-color;
  }

  .input-text,
  &__text--readonly {
    width: 90%;
    padding: 0;
    // padding-right: 35px;
    line-height: inherit;
    text-align: left;
    outline: 0 none;
    border: 0;
    text-decoration: none;
    background: transparent;
    resize: none;
  }

  &-label {
    width: 80px;
    overflow: hidden;
    margin-right: 6px;
    text-align: left;
    color: $input-label-color;
    .label-string {
      // overflow: hidden;
      // white-space: nowrap;
      // text-overflow: ellipsis;
    }
  }
  &-value {
    flex: 1;
    vertical-align: middle;
  }
  &-inner {
    position: relative;
    display: flex;
    align-items: center;
  }
  &-box {
    position: relative;
    width: 100%;
  }
  &-disabled-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
  }
  &-error-message {
    color: $input-required-color;
    font-size: 12px;
  }
  &-word-limit {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    color: #808080;
    font-size: 12px;
    // line-height: var(--van-field-word-limit-line-height);
  }
  &-left-icon,
  &-right-icon {
    display: flex;
    align-items: center;
    font-size: 0;
  }
  &-clear,
  &-right-icon {
    margin-left: 4px;
  }
  &-left-icon {
    margin-right: 4px;
  }
  &-clear-box {
    height: 100%;
    .nut-input-clear {
      vertical-align: -2px;
    }
  }
  &-clear {
    width: 16px;
    height: 16px;
    color: #c8c9cc;
    cursor: pointer;
  }
  .nut-button {
    margin-left: 10px;
  }
  &.nut-input-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;
    }
  }
  &-readonly {
    input {
      color: $input-readonly-color;
    }
  }
  &-error,
  &-error::placeholder {
    color: $input-required-color;
    -webkit-text-fill-color: $input-required-color;
  }
}
