/* Map page layout */
.mapPage {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100dvh;
  overflow: hidden;
}

.mapMain {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

/* Header (duplicated from home.css for self-contained map page) */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  max-height: 100dvh;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.headerInner {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logoMark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--accent-fg);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.siteTitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.siteSubtitle {
  font-size: 12px;
  color: var(--text-2);
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.iconBtn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background 120ms, color 120ms;
}

.iconBtn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.iconBtn.active {
  color: var(--accent);
}

.iconBtn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Map container */
.mapContainer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  background: var(--bg);
}

/* Map SVG elements */
.map-neighborhood {
  cursor: pointer;
  transition: fill 120ms, stroke 120ms, opacity 120ms;
  opacity: 0.85;
}

.map-neighborhood:hover {
  opacity: 1;
  stroke: var(--text);
  stroke-width: 1;
}

.map-neighborhood:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-neighborhood[data-selected="true"] {
  opacity: 1;
  stroke: var(--accent);
  stroke-width: 2;
}

.map-badge {
  pointer-events: none;
  font-family: var(--font);
  user-select: none;
}

.map-badge-bg {
  pointer-events: none;
}

/* User location dot */
.mapUserDot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: none;
  animation: mapPulse 2s infinite;
}

.mapUserDot[data-visible="true"] {
  display: block;
}

@keyframes mapPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.5;
  }
}

/* Location button */
.mapLocationBtn {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px auto 0;
  transition: background 120ms, color 120ms;
}

.mapLocationBtn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.mapLocationBtn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sidebar panel */
.mapPanel {
  border-left: 1px solid var(--border);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  background: var(--surface);
  min-height: 0;
}

.mapPanelEmpty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  padding: 40px 20px;
}

.mapPanelHeader {
  margin-bottom: 16px;
}

.mapPanelTitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

.mapPanelMeta {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

.mapSectionLabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.mapCard {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mapCard:last-child {
  border-bottom: none;
}

.mapCardName {
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}

.mapCardName a {
  color: var(--text);
}

.mapCardName a:hover {
  color: var(--accent);
}

.mapCardMeta {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

/* Toast region (duplicated from home.css) */
.toastRegion {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: slideIn 200ms ease-out;
  pointer-events: auto;
  max-width: 360px;
}

.toastTitle {
  font-weight: 600;
}

.toastBody {
  color: var(--text-2);
  margin-top: 2px;
}

@keyframes slideIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .mapMain {
    grid-template-columns: 1fr;
    grid-template-rows: 40vh 1fr;
  }

  .mapPanel {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .siteSubtitle {
    display: none;
  }

  .toastRegion {
    bottom: 12px;
    right: 12px;
    left: 12px;
  }

  .toast {
    max-width: none;
  }
}
