@import './button.scss';
@import "../../styles/themes/variable.scss";

#{$xh-prefix}-progress {
  width: 100%;
  &.dots {
    .progress {
      height: 4px;
    }
    padding: 36px 0;
  }
  .progress {
    height: 100%;
    width: 100%;
    position: relative;
    border-radius: 8px;
    background-color: #f0f0f0;
    &.solid {
      height: 8px;
    }
    &-bar{
      position: absolute;
      background-color: var(--color-primary);
      width: 50%;
      height: 100%;
      border-radius: 8px;
      z-index: 2;
      transition: width .6s;
      &.solid:after {
        content: "";
        position: absolute;
        right: -8px;
        width: 16px;
        height: 16px;
        background-color: var(--color-primary);
        border-radius: 50%;
        top: 50%;
        transform: translateY(-50%);
      }
      &-text {
        font-size: 20px;
        font-family: PingFangSC-Regular, PingFang SC;
        color: #999999;
        display: block;
        width: 60px;
        text-align: center;
        position: absolute;
        right: -30px;
        top: calc(100% + 8px);
      }
      &.dots {
        background-color: transparent;
        &:before {
          content: "";
          display: block;
          width: 16px;
          height: 16px;
          border: 2px solid #DDD;
          border-radius: 50%;
          background-color: #FFF;
          position: absolute;
          right: -8px;
          top: 50%;
          transform: translateY(-50%);
        }

        &.h5:after {
          font-size: 20px;
          content: attr(data-progress) '%';
          font-family: PingFangSC-Regular, PingFang SC;
          color: #999999;
          display: block;
          width: 60px;
          text-align: center;
          position: absolute;
          right: -30px;
          top: calc(100% + 8px);
        }
      }
      &-percent {
        display: block;
        content: attr(data-progress) "%";
        position: absolute;
        top: 50%;
        width: 36px;
        text-align: center;
        transform: translateY(-50%);
        font-size: 20px;
        line-height: 100%;
        width: 48px;
        right: 0;
        color: #FFF;
        &.solid {
          top: calc(100% + 24px);
          right: -15px;
        }
      }
    }
    &-cover{
      position: absolute;
      height: 100%;
      transition: width .6s;
      background-color: var(--color-primary);
      z-index: 1;
    }
  }
}
