/* World collector map styles */
@media (min-width: 768px) {
  body[data-page='map'] .app-shell {
    max-width: 900px;
  }
}

.map-header {
  padding: 18px;
  background: var(--card);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.map-header h2 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 1.4rem;
}

.map-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.map-counter {
  margin-top: 12px;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}

.map-counter strong {
  font-size: 1.3rem;
}

.map-container {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
  width: 100%;
  height: auto;
  min-height: 160px;
}

.map-svg {
  display: block;
  width: 100%;
  height: auto;
  cursor: grab;
}

.map-svg:active {
  cursor: grabbing;
}

.map-country-hit {
  fill: transparent;
  stroke: rgba(125, 211, 252, 0.45);
  stroke-width: 1px;
  cursor: pointer;
  pointer-events: all;
}

.map-country-hit:hover {
  fill: rgba(125, 211, 252, 0.2);
}

.map-country {
  transition:
    fill 0.2s ease,
    stroke 0.2s ease;
}

.map-country:hover {
  stroke: var(--accent);
  stroke-width: 1.5px;
}

.map-loading,
.map-empty,
.map-error {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
}

.map-error {
  color: #ff9999;
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.map-legend-item::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(125, 211, 252, 0.2);
}

.map-legend-item.visited::before {
  background: #7dd3fc;
}

.map-legend-item.unvisited::before {
  background: #2a3246;
}

.map-tooltip {
  position: absolute;
  padding: 8px 12px;
  background: rgba(11, 17, 31, 0.95);
  color: var(--text);
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 10px;
  pointer-events: none;
  font-size: 0.85rem;
  z-index: 50;
}
