/**
 * ═══════════════════════════════════════════════════════════════════════════════
 * MAP COMPONENT — proprietate.html
 * ═══════════════════════════════════════════════════════════════════════════════
 * 
 * Secțiune locație cu:
 * - Highlight cards (zonă, acces, magazine, urgențe)
 * - Hartă Leaflet cu custom controls
 * - Badge "locație aproximativă"
 * - Nearby places tags
 * 
 * ═══════════════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────
   Location Section
   ───────────────────────────────────────────────────────── */
.location-section-wow {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ─────────────────────────────────────────────────────────
   Location Highlights
   ───────────────────────────────────────────────────────── */
.location-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.highlight-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
}

.highlight-icon svg {
  width: 24px;
  height: 24px;
}

/* Gradient variants for highlight icons */
.highlight-icon.gradient-mountain {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
}

.highlight-icon.gradient-green {
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white;
}

.highlight-icon.gradient-orange {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
}

.highlight-icon.gradient-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.highlight-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.highlight-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.highlight-value {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

/* ─────────────────────────────────────────────────────────
   Map Container
   ───────────────────────────────────────────────────────── */
.map-container-wow {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.property-map {
  height: 400px;
  background: var(--color-surface);
}

/* Leaflet overrides */
.property-map .leaflet-control-zoom {
  display: none; /* Using custom controls */
}

.property-map .leaflet-tile-pane {
  filter: brightness(0.9) contrast(1.1);
}

[data-theme="dark"] .property-map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.9);
}

/* ─────────────────────────────────────────────────────────
   Map Overlays
   ───────────────────────────────────────────────────────── */
.map-overlay-top {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.map-overlay-top > * {
  pointer-events: auto;
}

/* Map badge */
.map-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-sm);
}

.map-badge svg {
  width: 16px;
  height: 16px;
}

/* Custom map controls */
.map-controls-custom {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.map-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: none;
  border-radius: var(--radius-lg);
  color: var(--color-bg);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.map-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.map-btn svg {
  width: 20px;
  height: 20px;
}

/* Bottom overlay */
.map-overlay-bottom {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  z-index: 1000;
}

.nearby-places {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.nearby-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-sm);
}

.nearby-icon {
  display: flex;
  align-items: center;
}

.nearby-icon svg {
  width: 16px;
  height: 16px;
}

/* ─────────────────────────────────────────────────────────
   Location Footer
   ───────────────────────────────────────────────────────── */
.location-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.location-note-fancy {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.note-icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CUSTOM MAP MARKER
   ═══════════════════════════════════════════════════════════════════════════════ */

.custom-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-pin {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  animation: markerGlow 2s ease-in-out infinite;
}

@keyframes markerGlow {
  0%, 100% { box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(99, 102, 241, 0.6); }
}

.marker-pin svg {
  width: 20px;
  height: 20px;
  color: white;
}

.marker-pulse {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  animation: markerPulse 2s ease-out infinite;
}

@keyframes markerPulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .location-highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Location section - full width */
  .location-section-wow,
  .map-container-wow {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .location-highlights {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  
  .highlight-card {
    padding: var(--space-3);
  }
  
  .property-map {
    height: 280px;
    border-radius: var(--radius-lg);
  }
  
  .location-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .nearby-places {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .map-overlay-top {
    left: var(--space-2);
    right: var(--space-2);
    top: var(--space-2);
  }
}

@media (max-width: 480px) {
  .location-highlights {
    grid-template-columns: 1fr;
  }
  
  .map-overlay-top {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .map-controls-custom {
    flex-direction: row;
    align-self: flex-end;
  }
  
  .property-map {
    height: 220px;
  }
}

