/*
 *  Usage:
 *
      <div class="xt_woofc-spinner-wave">
        <div class="xt_woofc-spinner-rect xt_woofc-spinner-rect1"></div>
        <div class="xt_woofc-spinner-rect xt_woofc-spinner-rect2"></div>
        <div class="xt_woofc-spinner-rect xt_woofc-spinner-rect3"></div>
        <div class="xt_woofc-spinner-rect xt_woofc-spinner-rect4"></div>
        <div class="xt_woofc-spinner-rect xt_woofc-spinner-rect5"></div>
      </div>
 *
 */
@import "../variables";

.xt_woofc-spinner-wave {
  $rectCount: 5;
  $animationDuration: 1.2s;
  $delayRange: 0.4s;

  margin: $spinkit-spinner-margin;
  width: $spinkit-spinner-size * 1.25;
  height: $spinkit-spinner-size;
  text-align: center;
  font-size: 10px;

  .xt_woofc-spinner-rect {
    background-color: $spinkit-spinner-color;
    height: 100%;
    width: 6px;
    display: inline-block;
    animation: xt_woofc-spinner-waveStretchDelay $animationDuration infinite ease-in-out;
  }

  @for $i from 1 through $rectCount {
    .xt_woofc-spinner-rect#{$i} { animation-delay: $animationDuration + $delayRange / ($rectCount - 1) * ($i - 1); }
  }
}

@keyframes xt_woofc-spinner-waveStretchDelay {
  0%, 40%, 100% { transform: scaleY(0.4) }
  20% { transform: scaleY(1.0) }
}
