/* ═══════════════════════════════════════════════════════════════
   Fullscreen Heatmap Styles
   Smooth, glowing aesthetic
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at center, #121212 0%, #000000 100%);
  color: #f8fafc;
}

#heatmap-container {
  position: relative;
  width: 100%;
  height: 100%;
  /* jsVectorMap Custom Variables */
  --jvm-zoom-btn-bg-color: rgba(30, 41, 59, 0.7);
  --jvm-zoom-btn-color: #94a3b8;
  --jvm-zoom-btn-size: 32px;
  --jvm-zoom-btn-radius: 8px;
  --jvm-border-color: rgba(51, 65, 85, 0.5);
}

#world-map {
  width: 100%;
  height: 100%;
}

/* ── Overlay UI ─────────────────────────────────────────────── */
.overlay-ui {
  position: absolute;
  top: calc(24px + env(safe-area-inset-top, 0px));
  left: calc(24px + env(safe-area-inset-left, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none; /* Let clicks pass through empty areas */
}

.btn-back {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-back:active {
  transform: translateY(1px);
}

.status-indicator {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #06b6d4; /* Cyan */
  border-radius: 50%;
  box-shadow: 0 0 8px #06b6d4;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}





/* ── Map Tooltip ────────────────────────────────────────────── */
.jvm-tooltip {
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.8125rem;
  padding: 8px 12px;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: opacity 0.15s ease;
}

/* ── Zoom Buttons ───────────────────────────────────────────── */
.jvm-zoom-btn {
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.jvm-zoom-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

/* ── Map Elements ───────────────────────────────────────────── */
.jvm-marker {
  transition: fill 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease, r 0.2s ease;
  cursor: pointer;
}

.jvm-marker[fill="#10b981"] {
  animation: activePulse 2s infinite;
}

@keyframes activePulse {
  0% {
    filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.2));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
  }
  100% {
    filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.2));
  }
}

#world-map text {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

#world-map.map-zoomed-in text {
  opacity: 1;
}
