/* JUNIPER_LABS_MAP_EASTER_EGG_GAME_V3 */
.juniper-map-game-ui {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}

.juniper-map-game-ui.visible { opacity: 1; }

.juniper-map-game-prompt {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 150px);
  padding: 7px 11px;
  border: 1px solid rgba(23,35,58,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 6px 16px rgba(21,35,51,.08);
  color: #17233a;
  font-size: 15px !important;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.01em;
  text-align: center;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.juniper-map-game-score {
  position: absolute;
  top: 15px;
  right: 13px;
  min-width: 45px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 4px 12px rgba(21,35,51,.07);
  color: #58677d;
  font-size: 12px !important;
  line-height: 1;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.juniper-map-game-score.visible {
  opacity: .9;
  transform: translateY(0);
}

.juniper-map-game-result {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translate(-50%, -3px);
  color: #17233a;
  font-size: 18px !important;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.015em;
  opacity: 0;
  transition: opacity 100ms ease, transform 100ms ease;
  text-shadow: 0 1px 0 rgba(255,255,255,.92);
}

.juniper-map-game-result.visible {
  opacity: .88;
  transform: translate(-50%, 0);
}

.juniper-map-game-result.correct { color: #285d4d; }
.juniper-map-game-result.wrong { color: #995c58; }

.juniper-map-game-route-meta {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.76);
  color: #59687b;
  font-size: 10px !important;
  line-height: 1.15;
  font-weight: 650;
  white-space: nowrap;
  opacity: .9;
  backdrop-filter: blur(4px);
}

.hero-map-clickable,
.hero-map-clickable .leaflet-container {
  cursor: crosshair;
}

.juniper-route-tooltip {
  border: 0 !important;
  border-radius: 7px !important;
  padding: 4px 6px !important;
  background: rgba(255,255,255,.88) !important;
  color: #17233a !important;
  box-shadow: 0 4px 10px rgba(21,35,51,.08) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

.juniper-route-tooltip::before { display: none !important; }

@keyframes juniperMapGameShake {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-1.5px); }
  70% { transform: translateX(1.5px); }
}

.juniper-map-game-shake {
  animation: juniperMapGameShake 160ms ease-out;
}

@media (max-width: 650px) {
  .juniper-map-game-prompt {
    top: 9px;
    max-width: calc(100% - 80px);
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 13px !important;
    white-space: normal;
  }

  .juniper-map-game-score {
    top: 11px;
    right: 8px;
    min-width: 38px;
    padding: 4px 6px;
    font-size: 10px !important;
  }

  .juniper-map-game-result {
    top: 44px;
    font-size: 16px !important;
  }

  .juniper-map-game-route-meta {
    bottom: 9px;
    max-width: calc(100% - 24px);
    font-size: 9px !important;
    white-space: normal;
    text-align: center;
  }

  .juniper-route-tooltip {
    font-size: 8px !important;
    padding: 3px 5px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .juniper-map-game-ui,
  .juniper-map-game-score,
  .juniper-map-game-result { transition: none; }
  .juniper-map-game-shake { animation: none; }
}
