@inputCls: ~'@{comps-prefix}-input';

.@{inputCls} {
  position: relative;
  &-inner {
    border-bottom: 1px solid @input-inner-border-bottom-color;
    display: flex;
    box-sizing: border-box;
    align-items: center;
    padding-right: @input-inner-padding-right;
    position: relative;
  }
  &-mode-default &-inner {
    padding-top: @input-inner-padding-top;
    padding-bottom: @input-inner-padding-bottom;
  }
  &-mode-to-top &-inner {
    height: 46px;
  }
  &-mode-to-top {
    margin-top: 20px;
  }
  &-mode-to-top&&-focused &-inner,
  &-mode-to-top&:not(&-empty) &-inner,
  &-mode-to-top&-error-at-placeholder&-error &-inner {
    padding-top: 20px;
  }
  &-mode-to-top&&-focused &-label,
  &-mode-to-top&:not(&-empty) &-label,
  &-mode-to-top&-error-at-placeholder&-error &-label {
    position: absolute;
    top: 5px;
    font-size: 12px;
    color: #bdbdbd;
  }
  &-mode-to-top&:not(&-focused) &-input::-webkit-input-placeholder {
    color: transparent;
  }
  &-mode-to-top &-prepend {
    display: none;
  }
  &-mode-to-top&&-focused &-prepend,
  &-mode-to-top&:not(&-empty) &-prepend {
    display: block;
  }
  &-mode-to-top &-label {
    font-size: 16px;
    color: #bdbdbd;
    position: absolute;
  }
  &-mode-to-top &-input {
    font-size: 16px;
    line-height: 21px;
    color: #181c48;
  }
  &-mode-default &-label {
    font-size: @input-label-font-size;
    color: @input-label-color;
    line-height: 20px;
  }
  &-mode-default&-text-left &-label {
    margin-right: @input-label-margin-right;
  }
  &-mode-default &-input {
    font-size: @input-input-font-size;
    line-height: 20px;
    color: @input-input-color;
  }
  &-show-edit &-input {
    font-size: @input-edit-input-font-size;
    line-height: @input-edit-input-line-height;
    font-weight: @input-edit-input-font-weight;
  }
  &-show-edit &-error-tip {
    padding-top: 5px;
    line-height: 17px;
  }
  &-show-edit &-inner {
    padding-top: @input-edit-inner-padding-top;
    padding-bottom: @input-edit-inner-padding-bottom;
  }
  &-label-right &-label {
    text-align: right;
    padding-right: 10px;
  }
  &-label-top {
    padding-top: 14px;
  }
  &-label-top &-label {
    position: absolute;
    top: 0;
    z-index: 1;
  }
  &-label {
    line-height: 1;
    box-sizing: border-box;
    margin-right: 10px;
    transition: all 0.3s ease-out;
  }
  &-prepend,
  &-append {
    font-size: 16px;
    color: #acb4c0;
    position: relative;
  }
  &-prepend {
    padding-right: 5px;
  }
  &-append {
    padding-left: 5px;
  }
  &-content {
    box-sizing: border-box;
    line-height: 1;
    display: flex;
    flex: 1;
    align-items: center;
    position: relative;
  }
  &-input {
    outline: none;
    appearance: none;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    border: none;
    box-sizing: border-box;
    flex: 1;
    width: 100%;
    background-color: transparent;
    z-index: 2;
    min-height: 20px;
    word-break: break-all;
    letter-spacing: 0;
    font-family: "PingFangSC-Regular PingFang SC", arial, sans-serif;
    z-index: 2;
    &[readonly],
    &[disabled] {
      color: @input-input-disabled-color;
    }
    &::placeholder {
      color: @input-input-placeholder-color;
    }
  }
  .input-edit {
    position: absolute;
    top: 0;
    left: 0;
    width: auto !important;
    z-index: 1;
    display: flex;
    align-items: center;
    .placeholder {
      letter-spacing: 0;
      opacity: 0;
      font-family: "PingFangSC-Regular PingFang SC", arial, sans-serif;
    }
    .edit-icon {
      font-size: @input-edit-icon-size;
      color: #212121;
      margin-left: @input-edit-icon-margin-left;
      position: relative;
      top: @input-edit-icon-top;
    }
  }
  &-text-right &-input {
    text-align: right;
  }
  &-text-right&-show-clear &-input {
    padding-right: 20px;
  }
  &-text-center &-input {
    text-align: center;
  }
  &-show-clear &-input {
    padding-right: 20px;
  }
  &-unit {
    font-size: 14px;
    line-height: 1;
    color: @text-color;
    padding-left: 5px;
    white-space: nowrap;
  }
  &-clear {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    display: flex;
    align-items: center;
    z-index: 2;
    font-size: @input-clear-icon-size;
    color: @input-clear-icon-color;
    cursor: pointer;
  }
  &-error &-inner {
    border-color: @input-inner-error-bottom-color;
  }
  &-error&-mode-default &-inner {
    margin-bottom: 20px;
  }
  &-error-tip {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    line-height: 17px;
    padding-top: 4px;
    font-size: @input-error-tip-font-size;
    color: @input-error-tip-color;
    z-index: 1;
  }
  &-error-tip2 {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    line-height: 1px;
    font-size: @input-error-tip-font-size;
    color: @input-error-tip-color;
    z-index: 1;
    transform: translateY(-50%);
    box-sizing: border-box;
  }
  &-text-right &-error-tip2 {
    text-align: right;
  }
  &-error-at-placeholder&-error input,
  &-error-at-placeholder&-error input::placeholder {
    color: transparent;
  }
  &-hidden {
    display: none;
  }
  &-email-panel {
    padding: 5px 15px;
  }
  &-email-panel--item {
    line-height: 30px;
    font-size: 14px;
    color: @text-color;
    font {
      color: #4084e8;
    }
  }
}
