/* 
 * Reusable Loader Component Styles 
 */

/* This is the container that positions the loader within its parent */
.loader-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1; /* Lower z-index, will be behind content */
}

/* --- Wave Loader --- */
.wave-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
}

.wave-loader span {
  display: block;
  width: 6px;
  height: 100%;
  margin: 0 3px;
  border-radius: 3px;
  background-color: var(--color-primary);
  animation: wave 1.2s infinite ease-in-out;
}

/* Stagger the animation for each bar */
.wave-loader span:nth-child(2) {
  animation-delay: 0.1s;
}

.wave-loader span:nth-child(3) {
  animation-delay: 0.2s;
}

.wave-loader span:nth-child(4) {
  animation-delay: 0.3s;
}

.wave-loader span:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes wave {
  0%,
  40%,
  100% {
    transform: scaleY(0.4);
  }

  20% {
    transform: scaleY(1);
  }
}
