/* =========================================
   LOADER KEYFRAMES
   ========================================= */

@-webkit-keyframes loader {
  0%   { height: 0 }
  25%  { height: 100% }
  50%  { height: 0 }
  100% { height: 0 }
}

@keyframes loader {
  0%   { height: 0 }
  25%  { height: 100% }
  50%  { height: 0 }
  100% { height: 0 }
}


/* =========================================
   BAR LOADER CONTAINER
   ========================================= */

.m-loader {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  height: 100px;
  margin: auto;
  padding: 0 8px;
  position: relative;
  width: 100px;
}


/* =========================================
   INDIVIDUAL BARS
   ========================================= */

.m-loader__bar {
  display: flex;
  flex: 1 1 0px;
  width: auto;
  margin: 0 2px;
  align-items: center;
  transform: skew(-27deg);
}

.m-loader__bar:after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: loader 1s infinite linear;
  background: var(--color-primary);
  content: '';
  height: 0;
  width: 100%;
}


/* =========================================
   BAR HEIGHT VARIANTS
   ========================================= */

.m-loader__bar:nth-child(1) { height: 40% }
.m-loader__bar:nth-child(2) { height: 70% }
.m-loader__bar:nth-child(3) { height: 100% }
.m-loader__bar:nth-child(4) { height: 70% }
.m-loader__bar:nth-child(5) { height: 40% }

.m-loader__bar:nth-child(1):after { animation-delay: 0s }
.m-loader__bar:nth-child(2):after { animation-delay: .1s }
.m-loader__bar:nth-child(3):after { animation-delay: .2s }
.m-loader__bar:nth-child(4):after { animation-delay: .3s }
.m-loader__bar:nth-child(5):after { animation-delay: .4s }


/* =========================================
   SIMPLE SPINNER (FontAwesome)
   ========================================= */

.loading-spinner {
  text-align: center;
  padding: 20px 0;
  margin: 10px 0;
  color: var(--color-primary);
  font-size: 2rem;
}
