/* =========================================================
   map.css — map container + custom marker + popup styles
   ========================================================= */

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

/* Attribution — less obtrusive on dark theme */
.maplibregl-ctrl-attrib {
  background: rgba(0, 0, 0, 0.5) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}
.maplibregl-ctrl-attrib a {
  color: var(--text-muted) !important;
}

/* -------- Marker base -------- */
.emap-marker {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.emap-marker:active { transform: scale(0.92); }

/* The svg inside fills with currentColor — type variants set color */
.emap-marker svg {
  display: block;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.8));
}

/* Type variants */
.emap-marker--paperplane { color: var(--accent); }
.emap-marker--paperplane svg { filter: drop-shadow(0 0 8px var(--accent-glow)); }

.emap-marker--heartbox   { color: #c98a5c; }
.emap-marker--heartbox svg { filter: drop-shadow(0 0 6px rgba(255, 128, 191, 0.4)); }

.emap-marker--wishdisc   { color: #80c8ff; }
.emap-marker--wishdisc svg { filter: drop-shadow(0 0 8px rgba(128, 200, 255, 0.5)); }

/* Airplane variant — full styling lives here, animation in airplane.js (Chunk 3) */
.emap-airplane {
  width: 40px;
  height: 40px;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}

/* =========================================================
   Popup — dark themed, override MapLibre defaults
   ========================================================= */

.maplibregl-popup.emap-popup .maplibregl-popup-content {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-lg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.maplibregl-popup.emap-popup .maplibregl-popup-tip {
  border-top-color: var(--bg-elevated) !important;
  border-bottom-color: var(--bg-elevated) !important;
}

.maplibregl-popup.emap-popup .maplibregl-popup-close-button {
  color: var(--text-muted);
  font-size: 22px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  right: 4px;
  top: 4px;
}
.maplibregl-popup.emap-popup .maplibregl-popup-close-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.emap-popup__inner { font-size: 13px; line-height: 1.5; }
.emap-popup__type {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.emap-popup__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.emap-popup__content {
  color: var(--text-muted);
  margin-bottom: 8px;
  word-break: break-word;
  white-space: pre-wrap;
}
.emap-popup__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-faint);
}
