/* MAP SECTION */
.map-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.map-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}

.map-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.map-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.08);
}

.map-container {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 24px;
}

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

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

#world-map .country {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 0.5;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

#world-map .country:hover {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
  filter: brightness(1.3);
}

#world-map .graticule {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 0.5;
}

#world-map .sphere {
  fill: rgba(255, 255, 255, 0.01);
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 0.5;
}

/* TOOLTIP */
.tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(22, 24, 32, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.15s ease;
  max-width: 280px;
  box-shadow: var(--shadow-lg);
}

.tooltip.visible {
  opacity: 1;
}

.tooltip-country {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 3px 0;
}

.tooltip-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.tooltip-value {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent-cyan);
}

/* MAP LEGEND */
.map-legend {
  position: absolute;
  bottom: 32px;
  left: 32px;
  background: rgba(22, 24, 32, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.legend-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.legend-scale {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 6px;
}

.legend-bar {
  width: 28px;
  height: 10px;
  border-radius: 2px;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 1024px) {
  #world-map {
    height: 380px;
  }
}

@media (max-width: 640px) {
  #world-map {
    height: 280px;
  }

  .map-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .map-legend {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 16px;
  }
}
