/* ==========================================================================
   WORLD CUP CHRONICLES - Map Styling (OpenFreeMap + MapLibre + SVG Fallback)
   ========================================================================== */

.map-view-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - 120px);
  min-height: 520px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--panel-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background: #eef3f7;
}

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

/* Continent Filter Floating Toolbar */
.map-continent-toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 50;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  max-width: 90%;
}

.continent-pill {
  background: transparent;
  border: 1px solid transparent;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-navy);
  cursor: pointer;
  transition: all 0.2s ease;
}

.continent-pill:hover {
  background: var(--bg-parchment-dark);
}

.continent-pill.active {
  background: var(--primary-navy);
  color: #fff;
}

/* Custom Map Marker Pins */
.map-marker {
  cursor: pointer;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  transition: transform 0.2s ease;
}

.map-marker:hover {
  transform: translate(-50%, -105%) scale(1.1);
  z-index: 100 !important;
}

.marker-pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  background: #1b355a;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  border: 2px solid #ffffff;
  position: relative;
}

.marker-flag {
  transform: rotate(45deg);
  font-size: 14px;
}

.marker-label {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--panel-border);
  color: var(--primary-navy);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Anglophone Highlight */
.map-marker.anglophone-marker .marker-pin {
  background: #c69214;
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(198, 146, 20, 0.6);
}

.anglo-star {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 10px;
  color: #fef08a;
}

/* Locked Marker */
.map-marker.locked .marker-pin {
  background: #64748b;
  filter: grayscale(80%);
}

.map-marker.locked .marker-label {
  color: #64748b;
}

/* Active Mission Target Radar Beacon */
.target-radar {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #e11d48;
  animation: radarPulse 1.8s infinite ease-out;
  pointer-events: none;
}

/* SVG World Map Fallback (Offline Mode) */
.svg-world-map-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #d3e2eb;
  position: relative;
}

.offline-banner {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #1b355a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 10;
}

.vintage-svg-map {
  width: 100%;
  height: 100%;
  max-height: 800px;
}

.continent-shape {
  transition: opacity 0.3s;
}

.continent-shape:hover {
  opacity: 0.9;
}

.svg-pin-label {
  pointer-events: none;
  text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff;
}
