@import '../style/var';
.vm-step {
  flex: 1;
  text-align: center;
  position: relative;
  min-width: 50px;
  font-size: @step-size;

  &:not([class*="text-"]) {
    color: #aaa;
  }

  [class*="icon"], .num {
    display: block;
    font-size: @step-size;
    line-height: 32px;
  }

  &::before, &::after {
    content: "";
    display: block;
    position: absolute;
    height: 0px;
    width: calc(100% - 40px);
    border-bottom: 1PX solid #ccc;
    left: calc(0px - (100% - 40px) / 2);
    top: @step-size / 2 + 10px;
    z-index: 0;
  }

  &::after {
    border-bottom: 1PX solid currentColor;
    width: 0px;
    transition: all 0.3s ease-in-out 0s;
  }

  &[class*="text-"]::after {
    width: calc(100% - 40px);
    color: currentColor;
  }

  &:first-child {
    &::before, &::after {
      display: none;
    }
  }

  .num {
    width: @step-size;
    height: @step-size;
    border-radius: 50%;
    line-height: @step-size;
    margin: 10px auto;
    font-size: 12px;
    border: 1PX solid currentColor;
    position: relative;
    overflow: hidden;

    &::before, &::after {
      content: attr(data-index);
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      margin: auto;
      transition: all 0.3s ease-in-out 0s;
      transform: translateY(0);
    }
    &::after {
      transform: translateY(@step-size);
      color: #fff;
      transition: all 0.3s ease-in-out 0s;
    }
  }

  &[class*="text-"] .num {
    background-color: currentColor;
    &::before {
      transform: translateY(-@step-size);
      color: #fff;
    }

    &::after {
      content: "\e645";
      font-family: 'vm-icon';
      color: #fff;
      transform: translateY(0);
    }

    &.err::after {
      content: "\e646";
    }
  }
}
