@import "../../styles/themes/variable.scss";

@font-face {
  font-family: "xh-iconfont"; /* Project id 4043926 */
  src:
    url('./font/iconfont.woff2?t=1687140360510') format('woff2'),
    url('./font/iconfont.woff?t=1687140360510') format('woff'),
    url('./font/iconfont.ttf?t=1687140360510') format('truetype');
}

#{$xh-prefix}-form-input {
  font-size: 32px;
  display: flex;
  box-sizing: border-box;
  justify-content: space-between;
  background: #fff;
  line-height: 38px;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 28px;
  font-family: PingFangSC-Regular, PingFang SC;
  &.border::after {
    content: " ";
    position: absolute;
    left: 28px;
    bottom: 0;
    width: calc(100% - 56px);
    height: 2px;
    background-color: #EEE;
  }

  &-main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    &-left {
      display: flex;
      align-items: center;
      .label {
        min-width: 128px;
        font-size: 32px;
        font-family: PingFang SC;
        font-weight: 400;
        line-height: 32px;
        color: var(--font-color);
        white-space: nowrap;
      }

      &-label {
        width: 128px;
        text-align: left;
        color: var(--font-color);
        display: flex;
        align-items: center;
        &-icon {
          width: 48px;
          height: 48px;
          margin-left: 8px;
          display: inline-block;
          image {
            width: 100%;
            height: 100%;
          }
          img {
            width: 100%;
            height: 100%;
          }
        }
      }
    }
    &-center {
      display: flex;
      align-items: center;
      width: 56%;
      flex: 1;
      height: 100%;
      margin-left: 30px;
      &-native {
        border: 0;
        display: block;
        font-size: 32px;
        width: 100%;
        outline: 0;
        caret-color: var(--color-primary);
        &::placeholder {
          font-size: 28px;
          color: var(--font-color-tertiary);
          line-height: 1.2;
        }
        &:disabled {
          background-color: transparent;
          color: var(--font-color-secondary);
        }
        &.right {
          text-align: right;
        }
      }
      &-readonly {
        width: 100%;
        &.right {
          text-align: right;
        }
      }
    }
    &-placeholder {
      color: var(--font-color-tertiary);

    }
    &-extra {
      margin-top: 6px;
    }
  }
  &-right {
    display: flex;
    .arrow {
      display: block;
      font-family: 'xh-iconfont';
      -webkit-font-smoothing: antialiased;
      font-size: 22PX;
      color: #c8c8c8;
      &:before {
        content: "\e603";
      }
    }
  }
  &.column {
    .xh-form-input-main {
      flex-direction: column;
      align-items: flex-start;
      margin-left: 0;
      width: 100%;
      &-left {
        &-label {
          width: auto;
          font-size: 24px;
          font-weight: 400;
          color: #666666;
        }
      }
      &-center {
        width: 100%;
        margin-top: 12px;
        margin-left: 0;
        &-native {
          width: 100%;
          font-weight: 400;
          font-size: 28px;
          font-weight: 400;
          color: #333;
          line-height: 1.2;
        }
      }
    }
  }
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: var(--font-color-tertiary);
}

input:-moz-placeholder,
textarea:-moz-placeholder {
  color: var(--font-color-tertiary);
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: var(--font-color-tertiary);
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: var(--font-color-tertiary);
}

input {
  outline: none;
}
