@import '../icon/icon.scss';
.nut-theme-dark {
  .nut-input {
    background: $dark4;
    &-label {
      color: $dark1;
      .label-string {
        color: $dark1;
      }
    }
    .input-text,
    &__text--readonly {
      color: $dark1;
    }
    &-left-icon,
    &-right-icon {
      i {
        color: $dark1;
      }
    }
    &-inner {
      .nut-input-clear {
        color: $dark1;
      }
    }
  }
}
input,
textarea {
  font: inherit;
}

.nut-input {
  position: relative;
  width: 100%;
  padding: $input-padding;
  display: flex;
  line-height: 24px;
  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 {
    width: 230px;
    color: $gray1;
    flex: 1;
    padding: 0 10px;
    padding-right: 35px;
    outline: 0 none;
    border: 0;
    text-decoration: none;
  }
  .label-string {
    color: $gray1;
  }
  &__clear {
    width: 16px;
    height: 16px;
    position: absolute;
    right: 15px;
  }
  &__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;
    }
  }
  &__require {
    color: $primary-color;
    display: inline-block;
    margin-right: 5px;
  }

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

  &-label {
    width: 80px;
    overflow: hidden;
    margin-right: 6px;
    text-align: left;
  }
  &-value {
    flex: 1;
    vertical-align: middle;
  }
  &-right-mark {
    .nut-input-main-con {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .nut-input-inner {
      flex: 1;
    }
    .nut-input-button,
    .nut-input-right-icon {
      width: auto;
    }
  }
  &-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;
  }
  &-left-icon,
  &-right-icon {
    display: flex;
    align-items: center;
    font-size: 0;
    i {
      color: $gray1;
    }
  }
  &-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;
    }
  }
  &-error,
  &-error::placeholder {
    color: $input-required-color;
    -webkit-text-fill-color: $input-required-color;
  }
}
