/*
 *  Usage:
 *
      <div class="xt_woofc-spinner-cube-grid">
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube1"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube2"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube3"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube4"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube5"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube6"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube7"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube8"></div>
        <div class="xt_woofc-spinner-cube xt_woofc-spinner-cube9"></div>
      </div>
 *
 */
@import "../variables";

.xt_woofc-spinner-cube-grid {
  $delayRange: 0.4s;

  width: $spinkit-spinner-size;
  height: $spinkit-spinner-size;
  margin: $spinkit-spinner-margin;

  .xt_woofc-spinner-cube {
    width: 33.33%;
    height: 33.33%;
    background-color: $spinkit-spinner-color;
    float: left;
    animation: xt_woofc-spinner-cubeGridScaleDelay 1.3s infinite ease-in-out;
  }

  /*
   * Spinner positions
   * 1 2 3
   * 4 5 6
   * 7 8 9
   */

  .xt_woofc-spinner-cube1 { animation-delay: $delayRange * 0.50 }
  .xt_woofc-spinner-cube2 { animation-delay: $delayRange * 0.75 }
  .xt_woofc-spinner-cube3 { animation-delay: $delayRange }
  .xt_woofc-spinner-cube4 { animation-delay: $delayRange * 0.25 }
  .xt_woofc-spinner-cube5 { animation-delay: $delayRange * 0.50 }
  .xt_woofc-spinner-cube6 { animation-delay: $delayRange * 0.75 }
  .xt_woofc-spinner-cube7 { animation-delay: 0.0s }
  .xt_woofc-spinner-cube8 { animation-delay: $delayRange * 0.25 }
  .xt_woofc-spinner-cube9 { animation-delay: $delayRange * 0.50 }
}

@keyframes xt_woofc-spinner-cubeGridScaleDelay {
  0%, 70%, 100% { transform:scale3D(1.0, 1.0, 1.0) }
  35%           { transform:scale3D(0.0, 0.0, 1.0) }
}
