/* css/loader.css — full-screen overlay shown until tenant branding is applied */

.page-loader {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  background: #ffffff;
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.is-loading {
  overflow: hidden;
}

/* Circle */
.loader-spinner {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #e6e9ed;
  border-top-color: #2b3440;
  box-sizing: border-box;
  animation: loader-spin 0.8s linear infinite;
}

/* Dots (alternative) */
.loader-dots {
  display: flex;
  gap: 10px;
}

.loader-dots span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2b3440;
  animation: loader-dot 1.2s ease-in-out infinite;
}

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

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

.loader-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loader-dot {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.35;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-spinner,
  .loader-dots span {
    animation-duration: 2.4s;
  }
}
