.nut-step {
  flex-grow: 0;
  flex-shrink: 0;
  flex: 1;
  text-align: $steps-text-align;
  font-size: 0;

  &-head {
    position: relative;
    display: flex;
    justify-content: $steps-head-justify-content;
    margin-bottom: $steps-base-icon-margin-bottom;
  }

  // 计算方法：left = calc(50% + (100% - $steps-base-line-width) / 2)
  // 如 width=70%时，left=65%; width=100%,left=50%;
  &-line {
    position: absolute;
    top: calc($steps-base-icon-height / 2 - $steps-base-line-height / 2);
    left: $steps-base-line-left;
    height: $steps-base-line-height;
    width: $steps-base-line-width;
    background: $steps-base-line-background;
  }

  &-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: $steps-base-icon-width;
    height: $steps-base-icon-height;
    line-height: $steps-base-icon-line-height;
    font-size: $steps-base-icon-font-size;
    background-color: $steps-wait-icon-bg-color;
    border-color: $steps-wait-icon-bg-color;
    color: $steps-wait-icon-color;
    z-index: 1;

    .nut-icon {
      width: 100%;
      height: 100%;
    }

    &.is-text {
      border-radius: 50%;
      border-width: 1px;
      border-style: solid;
    }

    &.is-icon {
      border-radius: 50%;
      border-width: 1px;
      border-style: solid;
    }
  }

  &-main {
    display: inline-block;
    padding: $steps-main-padding;
    text-align: $steps-main-text-align;

    .nut-step-description {
      //color: $title-color;
    }
  }

  &-title {
    display: block;
    margin-bottom: $steps-base-title-margin-bottom;
    font-size: $steps-base-title-font-size;
    line-height: $steps-base-title-line-height;
    color: $steps-base-title-color;
  }

  &-description {
    display: block;
    font-size: $steps-base-description-font-size;
    height: $steps-base-description-height;
    line-height: $steps-base-description-line-height;
    color: $steps-base-content-color;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  &:last-child {
    .nut-step-line {
      display: none;
    }
  }

  &.nut-step-process {
    .nut-step-icon {
      background-color: $steps-process-icon-bg-color;
      border-color: $steps-process-icon-bg-color;
      color: $steps-process-icon-color;
    }

    .nut-step-title {
      //color: $steps-process-title-color;
      font-size: $steps-process-title-font-size;
      font-weight: $steps-process-title-font-weight;
    }
  }

  &.nut-step-wait {
    .nut-step-title {
      color: $steps-wait-title-color;
    }

    .nut-step-description {
      //color: $steps-wait-content-color;
    }
  }

  &.nut-step-finish {
    .nut-step-icon {
      background-color: $steps-finish-icon-bg-color;
      border-color: $steps-finish-icon-bg-color;
      color: $steps-finish-icon-color;
    }
    .nut-step-icon.is-icon {
      background-color: $steps-finish-has-icon-bg-color;
      border-color: $steps-finish-has-icon-bg-color;
      color: transparent;
    }

    .nut-step-line {
      background: $steps-finish-line-background;
    }

    .nut-step-title {
      color: $steps-finish-title-color;
    }
  }
}

.nut-steps-dot {
  .nut-step-head {
    margin: $steps-dot-head-margin;
    //margin-top: 7px;
    //margin-bottom: 0;
  }

  .nut-step-line {
    top: 7px;
  }

  .nut-step-icon {
    width: $steps-dot-icon-width;
    height: $steps-dot-icon-height;
    border: $steps-dot-icon-border;
    border-radius: 50%;
    box-sizing: content-box;
  }

  .nut-step-wait {
    .nut-step-title {
      color: $steps-wait-title-color;
    }

    .nut-step-description {
      //color: $steps-wait-content-color;
    }
  }

  .nut-step-finish {
    .nut-step-icon {
      position: relative;
      background-color: $steps-process-icon-bg-color;

    }
  }

  .nut-step-process {
    .nut-step-icon {
      position: relative;
      background-color: $steps-process-icon-bg-color;

      &:before {
        content: '';
        display: inline-block;
        position: absolute;
        left: 50%;
        top: 50%;
        margin-left: -6px;
        margin-top: -6px;
        width: 12px;
        height: 12px;
        background-color: $steps-dot-icon-finish-bg-color;
        border-radius: 50%;
      }
      &:after {
        content: '';
        display: inline-block;
        position: absolute;
        left: 50%;
        top: 50%;
        margin-left: -4px;
        margin-top: -4px;
        width: $steps-dot-icon-width;
        height: $steps-dot-icon-height;
        border: $steps-dot-icon-border;
        background-color: $steps-process-icon-bg-color;
        border-radius: 50%;
      }
    }
  }
}

.nut-steps-horizontal {
  &.nut-steps-dot {
    .nut-step-line {
      top: 50%;
      bottom: -50%;
      transform: translateY(-50%);
    }
  }
}

.nut-steps-vertical {
  .nut-step {
    display: flex;
    height: 33.34%;
  }

  .nut-step-line {
    display: inline-block;
    top: calc($steps-base-icon-width / 2);
    left: calc(50% - $steps-base-line-height / 2);
    height: $steps-base-line-width;
    width: $steps-base-line-height;
  }

  &.nut-steps-dot {
    .nut-step-line {
      top: calc($steps-dot-icon-width / 2);
    }
  }



  .nut-step-main {
    display: inline-block;
    padding: $steps-vertical-main-padding;
    text-align: left;

    .nut-step-description {
      //color: $steps-base-content-color;
    }
  }
}
