
@import url(../var.less);
@import url(../mixins/utils.less);
@import url(../mixins/mixins.less);

@progress-prefix: ~'@{prefix}progress';

.@{progress-prefix} {
  .reset-component;

  display: inline-block;

  &-line {
    position: relative;
    width: 100%;
    font-size: @font-size-base;
  }

  &-small&-line,
  &-small&-line &-text .anticon {
    font-size: @font-size-auxiliary;
  }

  &-outer {
    box-sizing: border-box;
    display: inline-block;
    width: 100%;
    margin-right: 0;
    padding-right: 0;
    .@{progress-prefix}-show-info & {
      margin-right: ~'calc(-2em - 8px)';
      padding-right: ~'calc(2em + 8px)';
    }
  }

  &-inner {
    position: relative;
    display: inline-block;
    width: 100%;
    overflow: hidden;
    vertical-align: middle;
    background-color: @progress-remaining-color;
    border-radius: @progress-radius;
  }

  &-circle-trail {
    stroke: @progress-remaining-color;
  }

  &-circle-path {
    animation: ~'@{prefix}-progress-appear' 0.3s;
  }

  &-inner:not(.@{prefix}-progress-circle-gradient) {
    .@{prefix}-progress-circle-path {
      stroke: @progress-default-color;
    }
  }

  &-success-bg,
  &-bg {
    position: relative;
    background-color: @progress-default-color;
    border-radius: @progress-radius;
    transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;
  }

  &-success-bg {
    position: absolute;
    top: 0;
    left: 0;
    background-color: @success-color;
  }

  &-text {
    display: inline-block;
    width: 2em;
    margin-left: 8px;
    color: @primary-text-color;
    font-size: 1em;
    line-height: 1;
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
    word-break: normal;
    .anticon {
      font-size: @font-size-base;
    }
    .w-icon-close-circle,.w-icon-check-circle{
      font-size: 16 / 12em;
    }
    .w-icon-close-mark,.w-icon-check{
      font-size: 20 / 12em;
    }
  }

  &-status-active {
    .@{progress-prefix}-bg::before {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      background: #fff;
      border-radius: 10px;
      opacity: 0;
      animation: ~'@{prefix}-progress-active' 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;
      content: '';
    }
  }

  &-status-exception {
    .@{progress-prefix}-bg {
      background-color: @danger-color;
    }
    .@{progress-prefix}-text {
      color: @danger-color;
    }
  }

  &-status-exception &-inner:not(.@{progress-prefix}-circle-gradient) {
    .@{progress-prefix}-circle-path {
      stroke: @danger-color;
    }
  }

  &-status-success {
    .@{progress-prefix}-bg {
      background-color: @success-color;
    }
    .@{progress-prefix}-text {
      color: @success-color;
    }
  }

  &-status-success &-inner:not(.@{progress-prefix}-circle-gradient) {
    .@{progress-prefix}-circle-path {
      stroke: @success-color;
    }
  }

  &-circle &-inner {
    position: relative;
    line-height: 1;
    background-color: transparent;
  }

  &-circle &-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    margin: 0;
    padding: 0;
    color: @progress-text-color;
    line-height: 1;
    white-space: normal;
    text-align: center;
    transform: translate(-50%, -50%);

    .anticon {
      font-size: @font-size-base;
    }
  }

  &-circle&-status-exception {
    .@{progress-prefix}-text {
      color: @danger-color;
    }
  }
  &-circle&-status-success {
    .@{progress-prefix}-text {
      color: @success-color;
    }
  }
}


