/* ── /map page — World Map (D3) ───────────────────────────────────
 *
 * Copied from home.css's MAP SCREEN block during the Phase 3 refactor so the
 * dedicated /map page renders correctly. The home.css originals remain for the
 * Phase 6 sweep. The country-detail drawer rules are intentionally NOT copied —
 * clicks now navigate to the SSR /country/<slug> page.
 */

.map-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 52px);
}

.map-header {
  background: var(--black);
  padding: 28px 32px 24px;
  border-bottom: 2px solid var(--red);
}
.map-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
  font-weight: 700;
}
.map-title {
  font-family: "Playfair Display", serif;
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--off-white);
  letter-spacing: -0.8px;
  line-height: 1.05;
}
.map-title em {
  font-style: italic;
}
.map-subtitle {
  font-size: 1rem;
  color: rgba(227, 218, 201, 0.5);
  max-width: 560px;
  line-height: 1.7;
  margin-top: 10px;
  letter-spacing: 0.2px;
}

.map-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-primary);
  position: relative;
}

/* World map view */
.world-map-wrap {
  flex: 1;
  padding: 24px 32px 32px;
  position: relative;
}
#world-map {
  width: 100%;
  max-height: calc(100vh - 220px);
  background: var(--color-primary);
}
#world-map path.land {
  fill: var(--cream);
  stroke: rgba(15, 15, 15, 0.28);
  stroke-width: 0.6;
  transition: fill 0.15s;
  cursor: pointer;
}
#world-map path.land.has-films {
  fill: #d0c3ab;
}
#world-map path.land:hover {
  fill: var(--black);
}
#world-map path.land.active {
  fill: var(--red);
}
#world-map path.land.no-data {
  cursor: default;
}
#world-map path.land.no-data:hover {
  fill: var(--cream);
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--black);
  color: var(--off-white);
  padding: 12px 16px;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  min-width: 200px;
  max-width: 280px;
  border-left: 2px solid var(--red);
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 10;
}
.map-tooltip.visible {
  opacity: 1;
}
.tt-name {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  color: var(--off-white);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.tt-region {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.tt-films-label {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(227, 218, 201, 0.55);
  margin-bottom: 6px;
}
.tt-film {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 0.75rem;
  color: #c8c2b2;
  line-height: 1.5;
}
.tt-empty {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 0.75rem;
  color: rgba(227, 218, 201, 0.55);
}

.map-legend {
  display: flex;
  gap: 24px;
  padding: 0 32px 18px;
  align-items: center;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.legend-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--border-strong);
}
.legend-swatch.has-films {
  background: #e5dcc9;
}
.legend-swatch.no-films {
  background: #181818;
}
.map-stats {
  margin-left: auto;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--cream-dim);
}
.map-stats strong {
  color: var(--color-base);
  font-family: "Playfair Display", serif;
  font-size: 0.875rem;
  font-weight: 600;
  margin-right: 4px;
}

.map-loading {
  padding: 80px 36px;
  text-align: center;
}
.map-loading-text {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--cream-dim);
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .map-legend {
    display: none !important;
  }
  .world-map-wrap {
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    padding: 0 !important;
  }
  #world-map {
    width: 100% !important;
    height: 300px !important;
    overflow: hidden !important;
  }
  .map-screen {
    padding: 0 16px !important;
  }
  .map-header {
    padding: 24px 16px 20px !important;
  }
}
