// @import "../_utils.scss";
// @import "./icon.scss";

.#{$steps-prefix-cls} {
  position: relative;
  width: 100%;
  line-height: $steps-line-height;
  font-size: 0;
  
  &-item {
    display: inline-block;
    position: relative;
    vertical-align: top;
    &.#{$steps-prefix-cls}-status-wait {
      .#{$steps-prefix-cls}-head-inner {
        background-color: $steps-item-head-inner-background-color;

        @include theme-background-color($__steps-item-status-wait-head-inner_background-color);
        > .#{$steps-prefix-cls}-icon, span {
          color: $steps-wait-icon-color;

          @include theme-font-color($__steps-item-status-wait-head-inner-icon_font-color);
        }
      }
      .#{$steps-prefix-cls}-title {
        color: $steps-item-title-color;

        @include theme-font-color($__steps-item-status-wait-title_font-color);
      }
      .#{$steps-prefix-cls}-content {
        color: $steps-wait-description-color;

        @include theme-font-color($__steps-item-status-wait-content_font-color);
      }
      .#{$steps-prefix-cls}-tail > i {
        background-color: $steps-wait-tail-color;

        @include theme-background-color($__steps-item-status-wait-tail-i_background-color);
      }
    }


    &.#{$steps-prefix-cls}-status-process {
      .#{$steps-prefix-cls}-head-inner {
        border-color: $primary-color;
        background-color: $primary-color;

        @include theme-border-color($__steps-item-status-process-head-inner_border-color);
        @include theme-background-color($__steps-item-status-process-head-inner_background-color);
        > .#{$steps-prefix-cls}-icon, span {
          color: $steps-item-process-head-inner-color;

          @include theme-font-color($__steps-item-status-process-head-inner-icon_font-color);
          &.#{$steps-prefix-cls}-remark {
            color: $primary-color;

            @include theme-font-color($__steps-item-status-process-head-inner-icon-remark_font-color);
          }
        }
      }
      .#{$steps-prefix-cls}-title {
        @if $--size-switch == no {
          font-size: $font-size-base;
          line-height: $steps-item-process-title-line-height;
        }
        color: $steps-item-process-title-color;
        font-weight: bold;
        letter-spacing: 0;
        text-align: left;

        @include theme-font-color($__steps-item-status-process-title_font-color);
      }
      .#{$steps-prefix-cls}-content {
        color: $steps-item-process-title-color;

        @include theme-font-color($__steps-item-status-process-content_font-color);
      }
      .#{$steps-prefix-cls}-tail > i {
        background-color: $steps-split-color;

        @include theme-background-color($__steps-item-status-process-tail-i_background-color);
      }
    }


    &.#{$steps-prefix-cls}-status-finish {
      .#{$steps-prefix-cls}-head-inner {
        background-color: $steps-item-finish-head-inner-background-color;
        border-color: $primary-color;

        @include theme-background-color($__steps-item-status-finish-head-inner_background-color);
        @include theme-border-color($__steps-item-status-finish-head-inner_border-color);
        > .#{$steps-prefix-cls}-icon, span {
          color: $primary-color;

          @include theme-font-color($__steps-item-status-finish-head-inner-icon_font-color);
        }
      }
      .#{$steps-prefix-cls}-tail > i:after {
        width: 100%;
        background: $primary-color;
        transition: all $transition-time $ease-in-out;
        opacity: 1;

        @include theme-background-color($__steps-item-status-finish-tail-i-after_background);
      }
      .#{$steps-prefix-cls}-title {
        color: $steps-wait-title-color;

        @include theme-font-color($__steps-item-status-finish-title_font-color);
      }
      .#{$steps-prefix-cls}-content {
        color: $steps-wait-description-color;

        @include theme-font-color($__steps-item-status-finish-content_font-color);
      }
    }

    &.#{$steps-prefix-cls}-status-error {
      .#{$steps-prefix-cls}-head-inner {
        background-color: $steps-item-error-head-inner-background-color;
        border-color: $error-color;

        @include theme-background-color($__steps-item-status-error-head-inner_background-color);
        @include theme-border-color($__steps-item-status-error-head-inner_border-color);
        > .#{$steps-prefix-cls}-icon {
          color: $error-color;

          @include theme-font-color($__steps-item-status-error-head-inner-icon_font-color);
        }
      }
      .#{$steps-prefix-cls}-title {
        color: $error-color;
        font-weight: bold;

        @include theme-font-color($__steps-item-status-error-title_font-color);
      }
      .#{$steps-prefix-cls}-content {
        color: $error-color;

        @include theme-font-color($__steps-item-status-error-content_font-color);
      }
      .#{$steps-prefix-cls}-tail > i {
        background-color: $steps-split-color;

        @include theme-background-color($__steps-item-status-error-tail-i_background-color);
      }
    }

    &.#{$steps-prefix-cls}-next-error {
      .#{$steps-prefix-cls}-tail > i,
      .#{$steps-prefix-cls}-tail > i:after {
        background-color: $error-color;

        @include theme-background-color($__steps-item-next-error-tail-i_background-color);
      }
    }

    &.#{$steps-prefix-cls}-custom {
      .#{$steps-prefix-cls}-head-inner {
        background: none;
        border: 0;
        width: auto;
        height: auto;
        text-align: left;

        @include theme-background($__steps-item-custom-head-inner_background);
        > .#{$steps-prefix-cls}-icon {
          left: $steps-custom-head-inner-icon-left;
          font-size: $steps-custom-head-inner-icon-font-size;
          top: $steps-custom-head-inner-icon-top;
          width: $steps-custom-head-inner-icon-width;
          height: $steps-custom-head-inner-icon-height;
        }
      }
      &.#{$steps-prefix-cls}-status-process {
        .#{$steps-prefix-cls}-head-inner > .#{$steps-prefix-cls}-icon {
          color: $primary-color;


          
          @include theme-font-color($__steps-item-status-finish-head-inner-icon_font-color);
          font-weight: bold;
        }
      }
    }
  }

  &-item:last-child &-tail {
    display: none;
  }

  .#{$steps-prefix-cls}-head,
  .#{$steps-prefix-cls}-main {
    position: relative;
    // display: inline-block;
    vertical-align: top;
  }
  .#{$steps-prefix-cls}-head {
    // background: #fff;
  }
  .#{$steps-prefix-cls}-head-inner {
    display: block;
    width: $steps-head-inner-width;
    height: $steps-head-inner-height;
    line-height: $steps-head-inner-line-height;
    margin-right: $steps-head-inner-line-margin-right;
    text-align: center;
    border: 1px solid $steps-head-inner-border-color;
    border-radius: 50%;
    font-size: $steps-head-inner-line-font-size;
    transition: background-color $transition-time $ease-in-out;
    position: relative;

    @include theme-border-color($__steps-head-inner_border-color);
    > .#{$steps-prefix-cls}-icon {
      font-size: $steps-head-inner-icon-font-size;
      line-height: $steps-head-inner-icon-line-height;
      position: relative;
      &.#{$steps-prefix-cls}-remark {
        position: absolute;
        right: $steps-head-inner-icon-remark-right;
        top: $steps-head-inner-icon-remark-top;
        font-size: $steps-head-inner-icon-remark-font-size;
      }

      &.#{$icon-prefix-cls} {
        font-size: 24px;

        &-ios-checkmark-empty,
        &-ios-close-empty {
          font-weight: bold;
        }
      }
    }
  }
  .#{$steps-prefix-cls}-main {
    margin-top: $steps-main-margin-top;
    // display: inline;
    .#{$steps-prefix-cls}-content {
      @if $--size-switch == yes {
        line-height: $--size-font-size-base + $--size-offset-base;
        font-size: $--size-font-size-base;
      } @else {
        font-size: $steps-main-content-font-size;
        line-height: $steps-main-content-line-height;
      }
      font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif;
      color: $steps-main-content-color;
      text-align: left;

      @include theme-font-color($__steps-main-content_font-color);
    }
  }
  .#{$steps-prefix-cls}-custom .#{$steps-prefix-cls}-title {
    margin-top: $steps-custom-title-margin-top;
  }

  .#{$steps-prefix-cls}-title {
    display: inline-block;
    margin-bottom: $steps-title-margin-bottom;
    @if $--size-switch == yes {
      line-height: $--size-font-size-base + $--size-offset-base;
      font-size: $--size-font-size-base;
    } @else {
      padding-right: $steps-title-padding-right;
      font-size: $steps-title-font-size;
    }
    //   font-weight: bold;
    color: $steps-title-color;
    // background: #fff;
    @include theme-font-color($__steps-title_font-color);

    > a:first-child:last-child {
      color: $steps-title-color;

      @include theme-font-color($__steps-title-a-first-child_font-color);
    }
  }
  .#{$steps-prefix-cls}-item-last {
    .#{$steps-prefix-cls}-title {
      padding-right: 0;
      width: 100%;
    }
  }
  // .#{$steps-prefix-cls}-content {
  //     font-size: 12px;
  //     color: #999;
  //     padding-left: 35px;
  // }
  .#{$steps-prefix-cls}-tail {
    width: 100%;
    padding: $steps-tail-padding;
    position: absolute;
    left: $steps-tail-left;
    top: $steps-tail-top;

    > i {
      display: inline-block;
      width: 100%;
      height: 1px;
      vertical-align: top;
      background: $steps-split-color;
      border-radius: 1px;
      position: relative;

      @include theme-background-color($__steps-tail-i_background);

      &::after {
        content: "";
        width: 0;
        height: 100%;
        background: $steps-split-color;
        opacity: 0;
        position: absolute;
        top: 0;

        @include theme-background-color($__steps-tail-i-after_background);
      }
    }
  }

  &.#{$steps-prefix-cls}-small {
    .#{$steps-prefix-cls}-head-inner {
      width: $steps-small-head-inner-width;
      height: $steps-small-head-inner-height;
      line-height: $steps-small-head-inner-height;
      margin-right: $steps-small-head-margin-right;
      text-align: center;
      border-radius: 50%;

      > .#{$steps-prefix-cls}-icon {
        top: 0;
        font-size: $font-size-base;
        line-height: $steps-small-head-inner-height;
      }
    }
    // .#{$steps-prefix-cls}-main {
    // }
    .#{$steps-prefix-cls}-title {
      margin-bottom: $steps-small-title-margin-bottom;
      margin-top: 0;
      color: $steps-small-title-color;
      @if $--size-switch == no {
        font-size: $font-size-small;
        font-weight: bold;
      }

      @include theme-font-color($__steps-small-title_font-color);
    }
    .#{$steps-prefix-cls}-content {
      color: $steps-small-content-color;
      @if $--size-switch == no {
        font-size: $font-size-small;
        padding-left: $steps-small-content-padding-left;
      }

      @include theme-font-color($__steps-small-content_font-color);
    }
    .#{$steps-prefix-cls}-tail {
      top: $steps-small-tail-top;
      padding: $steps-small-tail-padding;

      > i {
        height: 1px;
        width: 100%;
        border-radius: 1px;
      }
    }
    .#{$steps-prefix-cls}-status-finish,
    .#{$steps-prefix-cls}-status-wait {
      .#{$steps-prefix-cls}-title {
        color: $steps-small-title-color;

        @include theme-font-color($__steps-small-status-finish-title_font-color);
      }
    }
  }

  &.#{$steps-prefix-cls}-small .#{$steps-prefix-cls}-item.#{$steps-prefix-cls}-custom .#{$steps-prefix-cls}-head-inner,
  .#{$steps-prefix-cls}-item.#{$steps-prefix-cls}-custom .#{$steps-prefix-cls}-head-inner {
    width: inherit;
    height: inherit;
    line-height: inherit;
    border-radius: 0;
    border: 0;
    background: none;

    @include theme-background($__steps-small-item-custom-head-inner_background);
  }
}

.#{$steps-prefix-cls}-vertical {
  .#{$steps-prefix-cls}-item {
    display: block;
  }

  .#{$steps-prefix-cls}-tail {
    position: absolute;
    left: $steps-vertical-tail-left;
    top: $steps-vertical-tail-top;
    height: 100%;
    width: $steps-vertical-tail-width;
    padding: $steps-vertical-tail-padding;

    > i {
      height: 100%;
      width: 1px;

      &::after {
        height: 0;
        width: 100%;
      }
    }
  }

  .#{$steps-prefix-cls}-status-finish {
    .#{$steps-prefix-cls}-tail > i:after {
      height: 100%;
    }
  }

  .#{$steps-prefix-cls}-head {
    float: left;

    &-inner {
      margin-right: $steps-vertical-head-inner-margin-right;
    }
  }

  .#{$steps-prefix-cls}-main {
    margin-top: $steps-vertical-main-margin-top;
    min-height: $steps-vertical-main-min-height;
    overflow: hidden;
    display: block;
    .#{$steps-prefix-cls}-title {
      @if $--size-switch == no {
        line-height: $steps-vertical-main-title-line-height;
      }
    }
    .#{$steps-prefix-cls}-content {
      @if $--size-switch == no {
        padding-bottom: $steps-vertical-main-content-padding-bottom;
      } @else {
        margin-bottom: $steps-vertical-main-content-padding-bottom;
      }
      padding-left: $steps-vertical-main-content-padding-left;
    }
  }

  .#{$steps-prefix-cls}-custom .#{$steps-prefix-cls}-icon {
    left: 4px;
  }
  &.#{$steps-prefix-cls}-small .#{$steps-prefix-cls}-custom .#{$steps-prefix-cls}-icon {
    left: 0;
  }
}

.#{$steps-prefix-cls}-vertical.#{$steps-prefix-cls}-small {
  .#{$steps-prefix-cls}-tail {
    position: absolute;
    left: $steps-vertical-small-tail-left;
    top: $steps-vertical-small-tail-top;
    padding: $steps-vertical-small-tail-padding;

    > i {
      height: 100%;
    }
  }

  .#{$steps-prefix-cls}-title {
    @if $--size-switch == no {
      line-height: $steps-vertical-small-title-line-height;
    }
  }
}

