.progress-ring {
  position: relative;
  width: 20px;
  height: 20px;

  .progress-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    opacity: 0;
    @include rotate(225deg);
    @include animation(progress-ring-animation 5s infinite);

    &:after {
      content: "\2022";
      position: absolute;
      font-size: 10px;
      color: $color-accent;
    }

    &:nth-child(2) { @include animation-delay(300ms); }
    &:nth-child(3) { @include animation-delay(600ms); }
    &:nth-child(4) { @include animation-delay(900ms); }
    &:nth-child(5) { @include animation-delay(1200ms); }
  }

  &.progress-medium {
    width: 40px;
    height: 40px;
  }

  &.progress-large {
    width: 60px;
    height: 60px;
  }

  &.progress-medium .progress-circle {
    width: 40px;
    height: 40px;
    &:after {
      font-size: 16px;
    }
  }

  &.progress-large .progress-circle {
    width: 60px;
    height: 60px;
    &:after {
      font-size: 20px;
    }
  }
}


@include keyframes(progress-ring-animation) {
  0% {
    @include rotate(225deg);
    opacity: 1;
    @include animation-timing-function(ease-out);
  }

  7% {
    @include rotate(345deg);
    @include animation-timing-function(linear);
  }

  30% {
    @include rotate(455deg);
    @include animation-timing-function(ease-in-out);
  }

  39% {
    @include rotate(690deg);
    @include animation-timing-function(linear);
  }

  70% {
    @include rotate(815deg);
    opacity: 1;
    @include animation-timing-function(ease-out);
  }

  75% {
    @include rotate(945deg);
    @include animation-timing-function(ease-out);
  }

  76% {
    @include rotate(945deg);
    opacity: 0;
  }

  100% {
    @include rotate(945deg);
    opacity: 0;
  }
}
