@stepScope: ~'@{prefixCls}Step';
.@{stepScope} {
  position: relative;
  flex-shrink: 1;
  cursor: pointer;
  &-head {
    position: relative;
    width: 100%;
    &.is-process {
      color: @steps-process-color;
    }
    &.is-wait {
      color: @steps-wait-color;
      i.sc-ui {
        // box-shadow: @error-shadow;
        border-radius: 50%;
        background-color: @steps-wait-color;
        &::before {
          color: @white-color;
          line-height: 26px;
        }
      }
      border-radius: 50%;
    }
    &.is-finish {
      color: @steps-finish-color;
    }
    &.is-error {
      color: @steps-error-color;
      .scStep-icon {
        border: none;
        font-size: 26px;
        position: relative;
        width: 32px;
        height: 32px;
        i.sc-ui {
          box-shadow: @error-shadow;
          border-radius: 50%;
          background-color: @steps-error-color;
          &::before {
            color: @white-color;
            line-height: 26px;
          }
        }
        border-radius: 50%;
      }
    }
    &.is-success, &.is-process {
      color: @steps-success-color;
      .scStep-icon {
        position: relative;
        border: none;
        font-size: 26px;
        width: 32px;
        height: 32px;
        i.sc-ui {
          box-shadow: @primary-shadow;
          border-radius: 50%;
          background-color: @btn-light-color;
          &::before {
            color: @white-color;
            line-height: 26px;
          }
        }
        border-radius: 50%;
        background: transparent;
      }
    }
    &:not(.is-wait):not(.is-finish) {
      .scStep-icon {
        background: @bg-color;
        box-shadow: @shadow-outset-tabs-active-color;
      }
    }
  }

  &-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    font-size: 14px;
    box-sizing: border-box;
    background: @bg-color;
    transition: 0.15s ease-out;
    &.is-text {
      border-radius: 50%;
      border-color: inherit;
    }
    &.is-icon {
      width: 40px;
      font-size: 26px;
    }
    .@{stepScope}__icon-inner {
      width: 26px;
      height: 26px;
    }
    .sc-ui {
      position: absolute;
      z-index: 2;
      font-size: 10px;
    }
  }

  &-line {
    position: absolute;
    border-color: @border-color-base;
    background-color: @border-color-base;
  }

  &:last-of-type {
    .scStep-line {
      display: none;
    }
  }

  &-line-inner {
    display: block;
    border-width: 1px;
    border-style: solid;
    border-color: inherit;
    transition: 0.15s ease-out;
    box-sizing: border-box;
    width: 0;
    height: 0;
  }

  &__icon-inner {
    display: inline-block;
    user-select: none;
    text-align: center;
    font-weight: bold;
    line-height: 1;
    color: inherit;
    &.is-status {
      transform: translateY(1px);
    }
  }

  &-main {
    white-space: normal;
    text-align: left;
  }

  &-title {
    font-size: 14px;
    line-height: 38px;

    &.is-process {
      color: @steps-process-color;
      font-weight: 500;
    }
    &.is-wait {
      color: @steps-wait-txt-color;
    }
    &.is-finish {
      color: @steps-finish-color;
    }
    &.is-error {
      // color: @steps-error-color;
    }
    &.is-success {
      font-weight: 400;
      color: @steps-success-color;
    }
  }

  &-description {
    padding-right: 10%;
    // margin-top: -5px;
    font-size: 12px;
    line-height: 20px;
    font-weight: normal;
    color: @text-color;
    &.is-process {
      color: @steps-process-color;
    }
    &.is-wait {
      color: @steps-wait-color;
    }
    &.is-finish {
      color: @steps-finish-color;
    }
  }

  &.is-center {
    .scStep-head {
      text-align: center;
    }
    .scStep-main {
      text-align: center;
    }
    .scStep-description {
      padding-left: 20%;
      padding-right: 20%;
    }
    .scStep-line {
      left: 50%;
      right: -50%;
    }
  }
  &.simple {
    flex-basis: auto!important;
    padding-left: 28px;
    .scStep-arrow {
      padding-left: 28px;
    }
    &:first-child {
      padding-left: 0;
    }
  }
  &.simple, &.is-horizontal, &.is-horizontal{
    display: flex;
    align-items: center;

    .scStep-head {
      width: auto;
      font-size: 0;
      padding-right: 8px;
      &.is-success, &.is-process {
        .scStep-icon {
          position: relative;
          i.sc-ui {
            box-shadow: @primary-shadow;
            border-radius: 50%;
          }
          border-radius: 20px;
        }
      }
      &.is-error {
        .scStep-icon {
          position: relative;
          i.sc-ui {
            box-shadow: @error-shadow;
            border-radius: 50%;
          }
          border-radius: 20px;
        }
      }
    }

    .scStep-icon {
      width: 32px;
      height: 32px;
      font-size: 26px;
      vertical-align: middle;
    }

    .scStep-icon-inner {
      &[class*='#{$namespace}-icon']:not(.is-status) {
        font-size: 18px;
      }

      &.is-status {
        transform: scale(0.8) translateY(1px);
      }
    }
    .scStep-icon.is-text {
      border: none;
    }

    .scStep-main {
      position: relative;
      display: flex;
      align-items: stretch;
      flex-grow: 1;
    }
    .scStep-title {
      font-size: 14px;
      font-weight: 400;
      line-height: 26px;
      &.is-success {
        color: @steps-process-color;
      }
      &.is-error {
        color: @steps-process-color;
      }
    }
    .scStep:not(:last-of-type) {
      .scStep-title {
        max-width: 50%;
        word-break: break-all;
      }
    }
    .scStep-arrow {
      flex-grow: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      i {
        color: @text-color-secondary;
      }
    }
    &:last-of-type {
      .scStep-arrow {
        display: none;
      }
    }
  }
  // .@{stepScope}-head:not(.is-success):not(.is-wait) {
  //   .@{stepScope}__icon-inner {
  //     font-size: 26px;
  //   }
  // }
  &.is-horizontal, &.is-vertical {
    .scStep-main {
      .scStep-arrow {
        position: relative;
      }
      .scStep-line {
        width: calc(100% - 32px);
        background: @border-color-base;
        border-color: @border-color-base;
        height: 2px;
      }
    }
    .scStep-head:not(.is-error):not(.is-success):not(.is-wait) {
      .scStep-icon:not(.is-icon) {
        font-size: 16px;
        position: relative;
        border-radius: 20px;
        width: 32px;
        height: 32px;
        color: @bg-color;
        .@{stepScope}__icon-inner {
          width: 26px;
          height: 26px;
          background: @steps-success-color;
          box-shadow: @primary-shadow;
          border-radius: 50%;
          line-height: 26px;
          font-size: 16px;
        }
      }
    }
    .scStep-head {
      &.is-wait {
        .scStep-title {
          font-weight: 300;
        }
        .scStep-icon:not(.is-icon) {
          font-size: 16px;
          border-radius: 50%;
          color: @bg-color;
          .@{stepScope}__icon-inner {
            width: 26px;
            height: 26px;
            background: @steps-wait-color;
            border-radius: 50%;
            line-height: 26px;
            font-size: 16px;
          }
        }
      }
    }
  }
  &.is-vertical {
    display: flex;
    .scStep-head {
      flex-grow: 0;
      width: 32px;
    }
    .scStep-main {
      padding-left: 10px;
      flex-grow: 1;
    }
    .scStep-title {
      line-height: 24px;
    }
    .scStep-description {
      color: @text-color;
    }
    .scStep-line {
      width: 2px;
      top: 40px;
      bottom: 16px;
      left: 15px;
      background: @text-color-secondary;
      border-color: @text-color-secondary;
    }
    .scStep-icon {
      &.is-icon {
        width: 24px;
      }
    }
  }
}