/* ============================================================
   GE VERNOVA PIKNIK – SVG Venue Map
   Helyszínrajz interaktív SVG térkép
   ============================================================ */

/* ── Map Transform Group ─────────────────────────────────── */
#map-transform-group {
  transform-origin: center center;
}

/* ── Map Base Elements ───────────────────────────────────── */
.map-ground { fill: #e8f4e8; }
.map-road { fill: #d4c9b0; stroke: #b8ad99; stroke-width: 1; }
.map-building { fill: #ffffff; stroke: #c8d0dc; stroke-width: 1.5; }
.map-tent-main { fill: #dbeafe; stroke: #93c5fd; stroke-width: 2; }
.map-tent-fill { fill: #bfdbfe; }
.map-track { fill: none; stroke: #f87171; stroke-width: 8; stroke-linecap: round; }
.map-track-inner { fill: #a7f3d0; stroke: none; }
.map-grass { fill: #bbf7d0; stroke: #86efac; stroke-width: 1; }
.map-pitch { fill: #4ade80; stroke: #22c55e; stroke-width: 1; }
.map-water { fill: #bae6fd; }
.map-parking { fill: #f1f5f9; stroke: #cbd5e1; stroke-width: 1; stroke-dasharray: 4,4; }
.map-label { font-family: 'Inter', sans-serif; fill: #334155; font-size: 9px; font-weight: 600; }
.map-label-sm { font-family: 'Inter', sans-serif; fill: #64748b; font-size: 7.5px; font-weight: 500; }
.map-label-lg { font-family: 'Inter', sans-serif; fill: #1e3a5f; font-size: 11px; font-weight: 800; }

/* ── Hotspot Styles ──────────────────────────────────────── */
.hotspot-outer {
  fill: none;
  stroke: white;
  stroke-width: 2.5;
  opacity: 0.6;
}
.hotspot-ring {
  fill: none;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.map-hotspot:hover .hotspot-ring {
  opacity: 0.4;
}
.hotspot-label-bg {
  fill: white;
  rx: 4px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}
.hotspot-letter {
  font-family: 'Inter', sans-serif;
  fill: white;
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

/* ── Arrow Styles ────────────────────────────────────────── */
.arrow-evacuation { fill: #ef4444; opacity: 0.9; }
.arrow-arrival    { fill: #3b82f6; opacity: 0.9; }
.arrow-safe       { fill: #22c55e; opacity: 0.9; }

/* ── Area Zone Highlights ────────────────────────────────── */
.zone-highlight {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.map-hotspot.active .zone-highlight {
  opacity: 0.15;
}

/* ── Pulse Animation ─────────────────────────────────────── */
.pulse-ring {
  fill: none;
  stroke-width: 2;
  opacity: 0;
  transform-origin: center;
}
.map-hotspot.pulsing .pulse-ring {
  animation: svgPulse 1.8s ease-out infinite;
}
@keyframes svgPulse {
  0%   { r: 12px; opacity: 0.8; }
  100% { r: 28px; opacity: 0; }
}

/* ============================================================
   LEAFLET INTERAKTÍV TÉRKÉP
   ============================================================ */

.leaflet-map {
  width: 100%;
  height: 100%;
  background: #14181b;
}

.leaflet-container {
  font-family: 'Inter', sans-serif;
  background: #14181b;
}

/* Halkabb attribution csík, hogy ne zavarja a UI-t */
.leaflet-control-attribution {
  font-size: 9px !important;
  background: rgba(255,255,255,0.75) !important;
  padding: 1px 6px !important;
}

/* ── Marker ikon (a JS inline stílust ad, itt csak a hover/aktív állapot) ── */
.ge-marker {
  cursor: pointer;
  transition: transform 0.15s ease;
}
.leaflet-marker-icon:hover .ge-marker {
  transform: scale(1.1);
}

/* ── Popup (helyszín kártya) ─────────────────────────────── */
.ge-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: var(--radius-md, 12px);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.12));
  resize: both;
  min-width: 200px;
  min-height: 100px;
}
.ge-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: 100% !important;
  height: 100% !important;
  display: flex;
  flex-direction: column;
}
.ge-popup {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ge-popup-body {
  padding: 10px 12px 12px;
  flex: 1;
  overflow-y: auto;
}
.ge-popup-title {
  font-size: var(--font-size-md, 15px);
  font-weight: 700;
  color: var(--color-text-primary, #0F172A);
  margin: 0 0 4px;
}
.ge-popup-desc {
  font-size: var(--font-size-sm, 13px);
  color: var(--color-text-secondary, #475569);
  line-height: 1.5;
  margin: 0;
}

/* ── Tooltip (marker felirat) ────────────────────────────── */
.ge-tooltip {
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.ge-tooltip::before { border-top-color: rgba(15, 23, 42, 0.85); }

/* ── Lebegő kerek térkép-gombok (CaliKáli stílus) ─────────── */
.map-zoom-controls {
  right: var(--space-3, 12px);
  bottom: var(--space-3, 12px);
  gap: 10px;
}
.map-zoom-controls .zoom-btn,
.map-zoom-controls .map-reset-btn,
.map-zoom-controls .locate-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--color-border, #C8DEDE);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  color: var(--color-text-primary, #0F172A);
  font-size: 1.1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-zoom-controls .map-reset-btn {
  background: var(--color-primary, #005E60);
  color: #fff;
  border-color: var(--color-primary, #005E60);
}

/* ── Saját pozíció toggle switch ─────────────────────────── */
.location-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--color-border, #C8DEDE);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border-radius: 30px;
  padding: 4px;
  height: 44px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  z-index: 2;
}

input:checked + .slider {
  background-color: var(--color-primary, #005E60);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--color-primary, #005E60);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.switch-icon {
  position: absolute;
  left: 8px;
  top: 7px;
  font-size: 20px;
  color: white;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

input:checked ~ .switch-icon {
  opacity: 1;
}

/* ── Saját pozíció marker: pont + pulzálás + irány-nyíl ───── */
.ge-user-marker {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ge-user-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary, #005E60);
  border: 2.5px solid #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  position: relative;
  z-index: 2;
}
.ge-user-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: rgba(0, 94, 96, 0.3);
  animation: geUserPulse 1.8s ease-out infinite;
}
@keyframes geUserPulse {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}
.ge-user-heading-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 11px solid var(--color-primary, #005E60);
  top: -13px;
  left: 6px;
  transform-origin: 7px 20px;
  z-index: 1;
}

/* ── Saját pozíció gomb – állapotok ───────────────────────── */
.locate-btn {
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.locate-btn:active { transform: scale(0.92); }
.locate-btn.locating {
  color: var(--color-primary, #005E60);
  animation: geLocatePulse 1.1s ease-in-out infinite;
}
.locate-btn.located {
  background: var(--color-primary, #005E60);
  color: #fff;
  border-color: var(--color-primary, #005E60);
}
@keyframes geLocatePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ── Geolokációs hibaüzenet ───────────────────────────────── */
.map-geo-error {
  display: none;
  position: absolute;
  left: var(--space-3, 12px);
  right: var(--space-3, 12px);
  bottom: var(--space-3, 12px);
  background: #dc2626;
  color: #fff;
  font-size: var(--font-size-sm, 13px);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 8px);
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.12));
  z-index: 20;
  text-align: center;
}
