/* ═══════════════════════════════════════════════════════
   map.css – Verdenskort (SVG)
   ═══════════════════════════════════════════════════════ */

/* ── Kortvisning layout ─────────────────────────────── */
#view-map {
  display: flex !important;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

#map-wrap {
  position: relative;
  flex-shrink: 0;
  background: var(--ocean);
}

#map {
  position: relative;
  width: 100%;
  min-height: 180px;
  background: var(--ocean); /* hav */
}

/* ── SVG-kort (bruges af verdenskort og kontinentkort) ── */
.geo-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.geo-land {
  fill: var(--land);
  stroke: var(--surface);
  stroke-width: 0.5;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.25s ease;
}

.geo-land.s-visited, .geo-dot.s-visited   { fill: var(--visited); }
.geo-land.s-lived, .geo-dot.s-lived       { fill: var(--lived); }
.geo-land.s-planned, .geo-dot.s-planned   { fill: var(--planned); }
.geo-land.s-wishlist, .geo-dot.s-wishlist { fill: var(--wishlist); }

/* Lande uden for det valgte kontinent */
.geo-land.geo-dim { fill: var(--land-dim); }
.geo-land.geo-dim[class*="s-"] { opacity: 0.45; }

/* Prikker gør meget små lande synlige */
.geo-dot {
  stroke: var(--surface);
  stroke-width: 1.2;
  cursor: pointer;
}

/* ── Kortlegende ────────────────────────────────────── */
#map-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 16px 12px;
  background: var(--ocean);
  pointer-events: none;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.visited  { background: var(--visited); }
.legend-dot.lived    { background: var(--lived); }
.legend-dot.planned  { background: var(--planned); }
.legend-dot.wishlist { background: var(--wishlist); }

.legend-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Ladeindikator ──────────────────────────────────── */
#map-loading {
  position: absolute;
  inset: 0;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ocean);
  z-index: 10;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Kort-hjemmeside indhold ────────────────────────── */
#map-home-content {
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Stats-kort */
.map-home-stats {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.map-home-stats:active { transform: scale(0.98); }

.map-home-stats-ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.map-home-stats-ring svg {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}

.map-home-stats-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.map-home-stats-info {
  flex: 1;
}

.map-home-stats-count {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.map-home-stats-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.map-home-stats-hint {
  font-size: 11px;
  color: var(--accent);
  margin-top: 6px;
  opacity: 0.8;
}

/* Kontinent-sektion */
.map-home-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: -4px;
}

.map-home-continents {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-home-continent-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  text-align: left;
  width: 100%;
}

.map-home-continent-btn:active {
  background: var(--surface2);
  transform: scale(0.99);
}

.map-home-continent-emoji {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.map-home-continent-info {
  flex: 1;
}

.map-home-continent-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.map-home-continent-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.map-home-continent-arrow {
  font-size: 18px;
  color: var(--text-muted);
}

.map-home-continent-bar {
  width: 40px;
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 5px;
}

.map-home-continent-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}
