/* ── Page Loader Component Styles ─────────────────────────────────── */

.page-loader {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 1000000;
}

.page-loader.is-visible {
  display: flex;
}

/* ── Container-scoped variant ──────────────────────────────────────
   Same dots, but confined to whichever element is doing the fetching
   instead of covering the full viewport. */

.container-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 100;
}

.container-loader.is-visible {
  display: flex;
}

.page-loader-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.page-loader-dots span {
  width: 14px;
  height: 14px;
  background-color: #dc2626;
  border-radius: 50%;
  animation: pageLoaderScaling 2.5s ease-in-out infinite;
}

.page-loader-dots span:nth-child(1) {
  animation-delay: 0s;
}

.page-loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.page-loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.page-loader-dots span:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes pageLoaderScaling {
  0%, 100% {
    transform: scale(0.2);
    background-color: #d55a5a;
  }

  50% {
    transform: scale(1);
    background-color: #dc2626;
  }
}
