$namespace: re-input-number;

.#{$namespace} {
  padding: .06rem .07rem;
  -webkit-appearance: none;
  outline: none;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 2px;
  resize: none;
  font-size: .12rem;
  transition: all .3s;
  position: relative;
  background-color: transparent;
  z-index: 2;

  &:focus {
    box-shadow: 0 0 4px rgba(#348FEE, 0.8);
    border-color: rgba(#348FEE, 0.8);
  }

  &-wrap {
    position: relative;
    background-color: #fff;
    display: inline-block;
  }

  &-button-wrap {
    position: absolute;
    user-select: none;
    top: 50%;
    transform: translateY(-50%);
    right: .02rem;
  }

  &-button {
    position: relative;
    width: .16rem;
    height: .1rem;
    overflow: hidden;
    background-color: #f1f1f1;
    &.#{$namespace}-hover {
      background-color: #d0d0d0;
    }
    &.#{$namespace}-active {
      background-color: #787878;
      .#{$namespace}-add {
        border-bottom-color: #fff;
      }
      .#{$namespace}-sub {
        border-top-color: #fff;
      }
    }

    &:first-child {
      margin-bottom: .02rem;
    }
  }

  &-add {
    position: absolute;
    top: -.01rem;
    left: .04rem;
    display: block;
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: #505050;
    border-left-color: transparent;
    border-width: .04rem;
    border-style: solid;
    width: 0;
    height: 0;
  }

  &-sub {
    display: block;
    margin: .03rem 0 0 .04rem;
    border-top-color: #505050;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
    border-width: .04rem;
    border-style: solid;
    width: 0;
    height: 0;
  }
}