/* ============================================================
   INSYT LOADING SCREEN
   Full-screen navigation transition overlay.
   Preserves the InsyT yellow/black/cream visual identity.
   Used between the landing page and /login or /register.
   ============================================================ */

:root {
  /* Loading-screen-specific tokens (namespaced to avoid
     clashing with the shared design system) */
  --insyt-loading-yellow: #fee700;
  --insyt-loading-cream: #fff8e7;
  --insyt-loading-ink: #0d0d0d;
}

/* Full-screen fixed overlay.
   - inset: 0 covers the entire viewport
   - high z-index sits above all page content
   - pointer-events block interaction with the underlying page */
.insyt-loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--insyt-loading-yellow);
  color: var(--insyt-loading-ink);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

/* Active state shown during the transition */
.insyt-loading-screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.insyt-loading-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

/* The actual InsyT logo image (insytlogo.png) */
.insyt-loading-logo {
  width: min(72vw, 260px);
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  animation: insytLoadingPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 0 2px rgba(13, 13, 13, 0.08));
}

/* Dot loader indicator */
.insyt-loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.insyt-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--insyt-loading-ink);
  opacity: 0.3;
  animation: insytLoadingDotPulse 1.2s ease-in-out infinite;
}

.insyt-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.insyt-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes insytLoadingPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes insytLoadingDotPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* Responsive sizing for narrow / touch devices */
@media (max-width: 640px) {
  .insyt-loading-logo {
    width: min(78vw, 220px);
  }
}
