$mainColor: #4b7df6;
$lineColor: #dee3f7;

.vue-approval-progress,
.vue-approval-progress * {
  margin: 0;
  padding: 0;
  list-style: none;
}
.vue-approval-progress {
  position: relative;
  min-width: 460px;
  padding: 20px 20px 0;
  box-sizing: border-box;
  white-space: normal !important;

  .stepList {
    float: left;
    width: 100%;

    &:first-child {
      .markInfo:before {
        display: none;
      }
    }

    .markInfo {
      float: left;
      width: 100%;
      text-align: left;
      margin-bottom: 20px;
      position: relative;
      line-height: normal;

      &:before {
        content: "";
        display: inline-block;
        width: 100%;
        border-top: 1px dashed #e6ebf9;
        position: absolute;
        left: 0;
        top: 50%;
      }

      .msg {
        display: inline;
        padding-right: 10px;
        color: #ffae3c;
        font-size: 14px;
        background: #fff;
        font-weight: 500;
        position: relative;
        z-index: 2;
      }
    }

    .stepItem {
      float: left;
      width: 100%;
      position: relative;
      // padding-bottom: 30px;
      padding-bottom: 20px;
      background: #fff;

      // &:not(:last-child) {
      //   &::after {
      //     content: "";
      //     position: absolute;
      //     width: 2px;
      //     height: calc(100% - 48px);
      //     top: 42px;
      //     left: 15px;
      //     background: $lineColor;
      //     z-index: 1;
      //   }
      // }
      &:not(:last-child) {
        &::after {
          content: "";
          position: absolute;
          width: 2px;
          height: calc(100% - 40px);
          top: 36px;
          left: 15px;
          background: $lineColor;
          z-index: 1;
        }
      }
      .itemBox {
        float: left;
        width: 100%;
        text-align: left;
        z-index: 2;
        position: relative;

        .iconBox {
          float: left;
          width: 32px;
          height: 32px;
          border-radius: 50%;
          border: 1px solid rgba(75, 125, 246, 0.8);
          text-align: center;
          background: rgba(75, 125, 246, 0.15);
          position: relative;
          box-sizing: border-box;

          i {
            font-size: 18px;
            color: $mainColor;
            line-height: 30px;
          }
          .imgBox {
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0;
            top: 0;
            background-color: #fff;
            border-radius: 50%;
            overflow: hidden;

            @for $i from 1 through 20 {
              &:nth-child(#{$i}) {
                margin-left: #{$i * 8-8}px;
              }
            }
            img {
              width: 100%;
              height: 100%;
            }
          }
          .iconLabel {
            display: inline-block;
            width: 100%;
            font-size: 18px;
            color: $mainColor;
            line-height: 32px;
            font-weight: bold;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
          }
        }
        .isImg {
          border: none;

          .imgBox {
            border: 1px solid #f8f9fd;
            box-sizing: border-box;
            box-shadow: 0px 1px 3px #cacedb;
            z-index: 2;
          }
        }
        .r {
          float: left;
          width: calc(100% - 32px);
          padding: 0 12px;
          box-sizing: border-box;

          h2 {
            width: 100%;
            margin-top: 8px;
            margin-bottom: 10px;
            font-size: 14px;
            font-weight: 400;
            color: #333333;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            line-height: normal;
          }
          .isFinished {
            margin-top: 8px;
            font-weight: normal;
          }
          .userInfoBox {
            float: left;
            width: 100%;
            font-size: 14px;
            color: #333333;
            line-height: normal;

            &+.userInfoBox{
              margin-top: 14px;
            }
            &:first-child {
              margin-top: 8px;
            }
            .nameBox {
              float: left;
              // width: 100%;
              white-space: nowrap;
              text-overflow: ellipsis;
              overflow: hidden;

              .prefix {
                padding-right: 10px;
                margin-right: 10px;
                border-right: 1px solid #A8A8A8;
              }
              .post {
                font-size: 12px;
                color: #999999;
                margin-left: 10px;
              }
              .name{
                font-weight: 500;
              }
              i {
                color: $mainColor;
                font-size: 14px;
                margin-left: 10px;
              }
              .state {
                font-size: 14px;
                color: #07c264;
                margin-left: 12px;
                font-weight: 500;
                float: right;
              }
            }
            .time {
              width: 100%;
              float: right;
              font-size: 12px;
              color: #999999;
              white-space: nowrap;
              margin-top: 10px;
            }
          }
          .sameLineTime {
            .nameBox {
              width: calc(100% - 134px); //more 20px gap

              .state {
                float: none;
              }
            }
            .time {
              width: 134px;
              margin-top: 0;
              text-align: right;
            }
          }
          .content {
            float: left;
            width: 100%;
            font-size: 12px;
            margin-top: 14px;
            color: #8b8e94;
            position: relative;
            word-break: break-all;

            .prefix {
              float: left;
              width: 60px;
              line-height: 20px;
              color: #424675;
              font-weight: 500;
            }
            .main {
              float: left;
              line-height: 20px;
              width: calc(100% - 60px);
              color: #424675;
              font-weight: normal;
            }
            .showBtn {
              cursor: pointer;
              color: $mainColor;
              position: absolute;
              right: 0;
              bottom: 0;
              z-index: 2;
              line-height: 20px;
            }
          }
          .contentVisible {
            // padding-bottom: 20px;
            // border-bottom: 1px dashed #e6ebf9;

            // .showBtn {
            //   bottom: 20px;
            // }
          }
        }

        @for $i from 2 through 20 {
          .r#{$i} {
            padding-left: #{$i * 8+4}px; //12-8=4
          }
        }

        //group
        & + .itemBox {
          margin-top: 12px;

          // .r h2 {
          //   display: none;
          // }
          // .iconBox {
          //   width: 10px;
          //   height: 10px;
          //   margin: 12px 13px 0 13px;
          //   border-radius: 50%;
          //   background: $lineColor;
          //   border-color: $lineColor;
          //   box-sizing: content-box;
          //   border: none;

          //   &::before {
          //     content: "";
          //     position: absolute;
          //     width: 2px;
          //     height: 4px;
          //     bottom: 100%;
          //     left: 17px;
          //     background: #fff;
          //     z-index: 1;
          //   }

          //   i {
          //     display: none;
          //   }
          // }
        }
      }

      $disabledC: #c1c3cb;
      .disabled {
        .r {
          color: $disabledC !important;

          .userInfoBox,
          h2,
          .time,
          .state,
          .post {
            color: $disabledC !important;
          }
          .prefix {
            border-color: $disabledC !important;
          }
        }
        .iconBox {
          border-color: $disabledC !important;

          .imgBox{
            &::after{
              content: "";
              position: absolute;
              left: 0;
              right: 0;
              top: 0;
              bottom: 0;
              background-color: rgba(216, 216, 216, 0.7);
            }
          }

          i {
            color: $disabledC !important;
          }
        }
      }
    }

    .mulStep {
      .itemBox {
        &:first-child {
          .content{
            margin-bottom: 8px;
          }
        }
        &:nth-child(2) {
          margin-top: 4px;
        }
        &:nth-child(n + 2) {
          padding-left: 44px;
          box-sizing: border-box;
        }
        &:not(:last-child) {
          .content {
            padding-bottom: 12px;
            // padding-bottom: 20px;
            border-bottom: 1px dashed #e6ebf9;

            .showBtn {
              bottom: 20px;
            }
          }
        }
      }
      .noMsg {
        .userInfoBox:last-child {
          // padding-bottom: 30px;
          // margin-bottom: 10px;
          // border-bottom: 1px dashed #e6ebf9;
        }
      }
    }
  }
}
