/**
 * Steps Component Style for SaltUI
 * @author muwen.lb
 *
 * Copyright 2018-2019, SaltUI Team.
 * All rights reserved.
 */
.{$prefix}-steps-wrapper {
  position: relative;

  .{$prefix}-steps + .{$prefix}-current-title {
    text-align: center;
  }

  .{$prefix}-steps-vertical + .{$prefix}-current-title {
    position: absolute;
    top: calc(50% - 14px);
    transform: translateY(-50%);
    left: 40px;
  }
}

.{$prefix}-steps {
  .{$prefix}-steps-item {
    position: relative;
    display: inline-block;
    min-height: 40px;
    margin-top: 74px;
    vertical-align: top;

    .{$prefix}-steps-main {
      .{$prefix}-steps-detail-arrow {
        position: absolute;
        top: 45px;
        font-family: kuma;
        font-size: 34px;
        margin-left: -50%;
        left: 13px;

        &::before {
          content: '\e613';
          color: #ccc;
        }

        &::after {
          content: '\e613';
          color: #f2f2f2;
          position: absolute;
          top: 2px;
          left: 0;
        }
      }
    }
  }

  .{$prefix}-steps-item-last {
    .{$prefix}-steps-title {
      padding-right: 0;
    }
  }

  .{$prefix}-steps-tail {
    position: absolute;
    left: 0;
    top: 23px;
    padding: 0 8px 0 39px;
    width: 100%;

    >i {
      display: block;
      width: 100%;
      height: 1px;
      background-color: $normal-alpha-7;
    }
  }

  .{$prefix}-steps-head {
    position: absolute;
    left: 0;
    top: 8px;
    z-index: 1;

    .{$prefix}-steps-icon {
      display: inline-block;
      width: 32px;
      height: 32px;
      border-radius: 16px;
      border: 1px solid $function-green;
      text-align: center;
      line-height: 30px;
      font-size: 16px;
      vertical-align: middle;
    }
  }

  .{$prefix}-steps-main {
    color: $normal-alpha-3;

    .{$prefix}-steps-title {
      white-space: nowrap;
      color: $dark-alpha-2;
    }

    .{$prefix}-steps-description {
      color: $dark-alpha-3;
    }
  }

  &.{$prefix}-steps-type-default {
    .{$prefix}-steps-item {
      &.{$prefix}-steps-no-desc {
        margin-top: 0;
      }
    }

    .{$prefix}-steps-main {
      position: absolute;

      .{$prefix}-steps-title {
        position: relative;
        left: 4px;
        display: inline-block;
        margin-left: -50%;
        margin-top: 56px;
        text-align: left;
        white-space: pre-wrap;
      }

      .{$prefix}-steps-description {
        position: absolute;
        left: -1em;
        bottom: 60px;
        padding: 5px 15px;
        width: 146px;
        height: 60px;
        background-color: white;
        box-shadow: 0 1px 4px 0 rgba(31, 56, 88, 0.15);
        line-height: 2;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        display: -webkit-box;
        border: 1px solid $normal-alpha-6;
        border-radius: 3px;
      }

      .{$prefix}-steps-description-arrow {
        position: absolute;
        bottom: 53px;
        left: 5px;
        border-color: transparent;
        border-style: solid;
        border-width: 7px;
        border-bottom-width: 0;
        border-top-color: $normal-alpha-9;
        content: ' ';
        line-height: 0;
        display: block;

        &:before,
        &:after {
          border-color: transparent;
          border-style: solid;
          border-width: 5px;
          border-bottom-width: 0;
          border-top-color: white;
          content: ' ';
          line-height: 0;
          display: block;
          position: absolute;
          bottom: 4px;
          left: -5px;
        }

        &:before {
          bottom: 3px;
          border-top-color: $normal-alpha-6;
        }
      }
    }
  }

  &.{$prefix}-steps-type-title-on-top {
    .{$prefix}-steps-item {
      margin-top: 28px;
    }

    .{$prefix}-steps-main {
      position: absolute;

      .{$prefix}-steps-title {
        position: relative;
        left: 12px;
        top: -18px;
        display: inline-block;
        margin-left: -50%;
        text-align: center;
      }

      .{$prefix}-steps-description {
        position: absolute;
        left: 12px;
        display: inline-block;
        margin-left: -50px;
        margin-top: 40px;
        width: 100px;
        text-align: center;
      }
    }
  }

  &.{$prefix}-steps-type-long-desc {
    .{$prefix}-steps-item {
      margin-top: 8px;
    }

    .{$prefix}-steps-main {
      padding: 10px 24px 0;
    }

    .{$prefix}-steps-title {
      position: relative;
      padding: 0 8px;
      display: inline-block;
      background-color: #fff;
    }

    .{$prefix}-steps-description {
      padding: 8px;
      min-width: 180px;
    }
  }

  .{$prefix}-steps-status-finish {
    &.{$prefix}-steps-item {
      .{$prefix}-steps-tail {
        i {
          background-color: $function-green;
        }
      }
    }

    .{$prefix}-steps-icon {
      background-color: #fff;
      border-width: 2px;
      line-height: 32px;
    }

    .{$prefix}-icon {
      // vertical-align sub
      // color #fff
    }
  }

  .{$prefix}-steps-status-process {
    .{$prefix}-steps-icon {
      background-color: $function-green;
      color: #fff;
    }
  }

  .{$prefix}-steps-status-wait {
    .{$prefix}-steps-icon {
      background-color: $normal-alpha-9;
      border: 1px dashed $normal-alpha-6;
      color: $normal-alpha-6;
    }

    .{$prefix}-steps-title {
      color: $normal-alpha-5;
    }
  }

  .{$prefix}-steps-status-process {
    .{$prefix}-steps-title {
      color: $dark-alpha-3;
    }
  }

  &.{$prefix}-steps-vertical {
    .{$prefix}-steps-head {
      top: 0;
    }

    .{$prefix}-steps-item {
      display: block;
      margin-top: 0;
      min-height: 66px;

      &.{$prefix}-steps-status-process {
        .{$prefix}-steps-description {
          color: $normal-alpha-3;
        }
      }
    }

    .{$prefix}-steps-tail {
      left: 15px;
      top: 0;
      padding: 38px 0 8px 0;
      width: 0;
      height: 100%;

      i {
        width: 1px;
        height: 100%;
        background-color: $normal-alpha-7;
      }
    }

    .{$prefix}-steps-main {
      padding: 0 0 0 30px;

      .{$prefix}-steps-title {
        margin-left: 10px;
        padding-top: 10px;
      }

      .{$prefix}-steps-description {
        margin-top: 4px;
        margin-left: 10px;
        text-indent: 0;
      }
    }
  }

  .{$prefix}-steps-small {
    margin-left: 20px;

    .{$prefix}-steps-head {
      .{$prefix}-steps-icon {
        font-size: 12px;
      }
    }

    .{$prefix}-steps-tail {
      top: 13px;
    }

    &.{$prefix}-steps-vertical {
      .{$prefix}-steps-tail {
        left: 5px;
        top: 0;
      }
    }

    .{$prefix}-steps-head {
      .{$prefix}-steps-icon {
        width: 12px;
        height: 12px;
        border-radius: 6px;
        line-height: 10px;
      }
    }
  }

  &.{$prefix}-steps-noicon {
    .{$prefix}-steps-head {
      top: 9px;
      left: 0px;

      .{$prefix}-steps-icon {
        width: 12px;
        height: 12px;
        border-radius: 6px;

        &:after {
          content: '';
        }
      }
    }

    .{$prefix}-steps-main {
      .{$prefix}-steps-title {
        margin-top: 32px;
        left: 5px;
      }

      .{$prefix}-steps-description {
        bottom: 46px;
      }

      .{$prefix}-steps-description-arrow {
        bottom: 39px;
        left: -2px;
      }
    }

    .{$prefix}-steps-tail {
      padding: 0 8px 0 20px;
      top: 16px;
    }

    .{$prefix}-steps-status-wait {
      .{$prefix}-steps-icon {
        background-color: $normal-alpha-9;
        border-color: $normal-alpha-9;
      }
    }

    &.{$prefix}-steps-vertical {
      .{$prefix}-steps-head {
        top: -5px;
        left: 10px;
      }

      .{$prefix}-steps-main {
        .{$prefix}-steps-title {
          margin-top: -5px;
        }
      }

      .{$prefix}-steps-tail {
        padding: 15px 0;
        top: 0;
      }
    }

    .{$prefix}-steps-status-finish {
      .{$prefix}-steps-icon {
        background-color: $function-green;
        color: #fff;
      }
    }
  }

  .{$prefix}-steps-detail {
    >.{$prefix}-steps-detail-con {
      display: none;
      margin-top: 74px;
      width: 800px;
      background-color: rgba(242, 242, 242, 1);
      padding: 10px;
      border: 1px solid #ccc;
    }
  }

  .{$prefix}-steps-detail.{$prefix}-steps-detail-current {
    >.{$prefix}-steps-detail-con {
      display: block;
    }
  }
}
