/*! Strand UI | MIT License | dillingerstaffing.com */

.strand-map-loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--strand-space-6);
  background: var(--strand-instrument-bg);
  transition: opacity 0.6s ease;
}

.strand-map-loading.is-hidden,
.strand-map-loading--hidden,
.strand-map-loading.hidden {
  display: none;
}

.strand-map-loading__spinner {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(59, 142, 246, 0.15);
  border-top-color: rgba(59, 142, 246, 0.7);
  border-radius: var(--strand-radius-full);
  animation: strand-map-loading-spin 1s linear infinite;
}

@keyframes strand-map-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.strand-map-loading__text {
  font-family: var(--strand-font-mono);
  font-size: 11px;
  letter-spacing: var(--strand-tracking-widest);
  text-transform: uppercase;
  color: var(--strand-instrument-text-tertiary);
}

.strand-map-loading__bar {
  width: 160px;
  height: 1px;
  background: rgba(59, 142, 246, 0.1);
  border-radius: var(--strand-radius-sm);
  overflow: hidden;
}

.strand-map-loading__bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient( 90deg, transparent, rgba(59, 142, 246, 0.6), transparent );
  animation: strand-map-loading-sweep 1.4s var(--strand-ease-in-out-sine) infinite;
}

@keyframes strand-map-loading-sweep {
  0% {
    transform: translateX(-200%);
  }

  100% {
    transform: translateX(500%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .strand-map-loading__spinner {
    animation: none;
    border-color: rgba(59, 142, 246, 0.4);
  }
}
