/* ─── Global reset & base ──────────────────────────────────────────────────── */

body,
html {
  margin: 0 !important;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family:
    "Nunito",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Root map container — fills the viewport */
#map {
  height: 100%;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  overflow: hidden;
}

/* Outermost app wrapper — prevents accidental text selection while interacting with the map */
.gen {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* While the map is being dragged, disable pointer-events on floating popups
   so the cursor never loses grip on the map canvas when hovering them. */
body.map-dragging .poi-popup,
body.map-dragging .stat-info-panel {
  pointer-events: none !important;
}
.loading-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.loading-page--hiding {
  opacity: 0;
  pointer-events: none;
}

/* Subtle dark vignette so text stays readable over any background */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.loading-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.loading-logo {
  width: 160px;
  opacity: 0.95;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.4));
}

/* ── Bouncing dots ─────────────────────────────────────────────────────────── */
.loading-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.loading-dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  animation: loading-bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}
.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loading-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* ── Status label ──────────────────────────────────────────────────────────── */
.loading-status-text {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  text-align: center;
}

/* ── Error state ───────────────────────────────────────────────────────────── */
.loading-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loading-error-icon {
  width: 38px;
  height: 38px;
  color: rgba(255, 110, 110, 0.9);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.loading-status-error {
  color: rgba(255, 160, 160, 0.9);
  font-size: 14px;
}

.loading-retry-btn {
  margin-top: 2px;
  padding: 9px 24px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.loading-retry-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
}
