

@listPrefixCls: fxm-list;
@inputPrefixCls: fxm-input;
@keyboardPrefixCls: fxm-number-keyboard;

.fxm-list-item {
  .fxm-input-control {
    .fake-input-container {
      height: 30 * @hd;
      line-height: 30 * @hd;
      position: relative;

      .fake-input {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        margin-right: 5 * @hd;
        text-decoration: rtl;
        text-align: right;
        color: #000;
        font-size: 17 * @hd;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        &.fake-input-disabled {
          color: @color-text-disabled;
        }

        &.focus {
          transition: color .2s;

          &:after {
            content: "";
            position: absolute;
            right: 0;
            top: 10%;
            height: 80%;
            border-right: 1.5 * @hd solid @keyboard-confirm-color;
            animation: keyboard-cursor infinite 1s step-start;
          }
        }
      }

      .fake-input-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        color: @color-text-placeholder;
        text-align: right;
      }
      &-left {
        .fake-input {
          text-align: left;
          &.focus:after {
            position: relative;
          }
        }
        .fake-input-placeholder {
          text-align: left;
        }
      }
    }
  }
}

.fxm-number-keyboard-wrapper {
  &.fxm-number-keyboard-wrapper-hide {
    bottom: -500 * @hd;
  }
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 200 * @hd;
  z-index: 10000;
  font-family: 'PingFang SC';
  background-color: #f6f6f7;
  transition-duration: 0.2s;
  transition-property: transform display;
  transform: translateZ(0);

  table {
    width: 100%;
    padding: 0;
    margin: 0;
    border-collapse: collapse;
    .hairline('top');

    tr {
      width: 100%;
      padding: 0;
      margin: 0;

      .fxm-number-keyboard-item {
        width: 25%;
        padding: 0;
        margin: 0;
        height: 50 * @hd;
        text-align: center;
        &:not(.keyboard-confirm) {
          .hairline('left');
          .hairline('bottom');
        }
        font-size: 25.5 * @hd;
        color: #2a2b2c;
        position: relative;

        &.fxm-number-keyboard-item-active {
          background-color: @fill-tap;
        }

        &.keyboard-confirm {
          color: #fff;
          font-size: 21 * @hd;
          background-color: @keyboard-confirm-color;
          .hairline('bottom');
          &.fxm-number-keyboard-item-active {
            background-color: @keyboard-confirm-tap-color;
          }

          &.fxm-number-keyboard-item-disabled {
            background-color: @keyboard-confirm-tap-color;
            color: rgba(255, 255, 255, 0.45);
          }
        }

        &.keyboard-delete {
          .encoded-svg-background('input_item_kb_backspace');
          background-size: 25.5 * @hd 18.5 * @hd;
          background-position: 50% 50%;
          background-repeat: no-repeat;
        }

        &.keyboard-hide {
          .encoded-svg-background('input_item_kb_hide');
          background-size: 32.5 * @hd 23.5 * @hd;
          background-position: 50% 50%;
          background-repeat: no-repeat;
        }
      }
    }
  }
}

@keyframes keyboard-cursor {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


@listPrefixCls: fxm-list;
@inputPrefixCls: fxm-input;

.fxm-list-item {
  &.fxm-input-item {
    height: @list-item-height;
    padding-left: @h-spacing-lg;
  }

  &:not(:last-child) {
    .fxm-list-line {
      .hairline('bottom');
    }
  }

  .fxm-input-label {
    color: @color-text-base;
    font-size: @font-size-heading;
    margin-left: 0;
    margin-right: @h-spacing-sm;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    padding: 2 * @hd 0;

    &.fxm-input-label-2 {
      width: 2 * @input-label-width;
    }

    &.fxm-input-label-3 {
      width: 3 * @input-label-width;
    }

    &.fxm-input-label-4 {
      width: 4 * @input-label-width;
    }

    &.fxm-input-label-5 {
      width: 5 * @input-label-width;
    }

    &.fxm-input-label-6 {
      width: 6 * @input-label-width;
    }

    &.fxm-input-label-7 {
      width: 7 * @input-label-width;
    }
  }

  .fxm-input-control {
    font-size: @input-font-size;
    flex: 1;

    input {
      color: @color-text-base;
      font-size: @font-size-heading;
      appearance: none;
      width: 100%;
      padding: 2 * @hd 0;
      border: 0;
      background-color: transparent;
      line-height: @line-height-base;
      box-sizing: border-box;

      &::placeholder {
        color: @color-text-placeholder;
        line-height: 1.2;
      }

      &:disabled {
        color: @color-text-disabled;
        background-color: #fff;
      }
    }
  }

  .fxm-input-clear {
    display: none;
    width: @icon-size-sm;
    height: @icon-size-sm;
    border-radius: @radius-circle;
    overflow: hidden;
    font-style: normal;
    color: @fill-base;
    background-color: @input-color-icon;
    background-repeat: no-repeat;
    .encoded-svg-background('input_item_delete');

    background-size: @icon-size-sm auto;
    background-position: 2 * @hd 2 * @hd;

    &-active {
      background-color: @input-color-icon-tap;
    }
  }

  &.fxm-input-focus {
    .fxm-input-clear {
      display: block;
    }
  }

  .fxm-input-extra {
    flex: initial;
    min-width: 0;
    max-height: @icon-size-sm;
    overflow: hidden;
    padding-right: 0;
    line-height: @line-height-base;
    color: @color-text-caption;
    font-size: @font-size-subhead;
    margin-left: @h-spacing-sm;
  }

  &.fxm-input-error {
    .fxm-input-control {
      input {
        color: #f50;
      }
    }

    .fxm-input-error-extra {
      height: @icon-size-sm;
      width: @icon-size-sm;
      margin-left: @v-spacing-sm;
      .encoded-svg-background('error');

      background-size: @icon-size-sm auto;
    }
  }

  &.fxm-input-disabled {
    .fxm-input-label {
      color: @color-text-disabled;
    }
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



