/* Leaflet Visitor Map Styles */
.map-section {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.map-title {
  color: #ffffff;
  font-size: 1.4em;
  font-weight: 600;
  margin: 0 0 1rem 0;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.visitor-map-container {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 0.9rem;
}

.marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 193, 7, 0.7);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.marker-dot.active {
  background: rgba(255, 87, 34, 0.8);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 4px 8px rgba(255, 87, 34, 0.5);
  }
}

/* Loading indicator */
.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Stats display */
.map-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.stat-item {
  text-align: center;
  color: #ffffff;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffd54f;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Marker popup styles */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content {
  font-size: 0.9rem;
  margin: 0.8rem;
}

.popup-location {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
}

.popup-time {
  font-size: 0.8rem;
  color: #666;
}

.popup-visitor-count {
  font-size: 0.85rem;
  color: #667eea;
  margin-top: 0.3rem;
  font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
  .map-section {
    padding: 1rem;
    border-radius: 8px;
  }

  .map-title {
    font-size: 1.2em;
  }

  .visitor-map-container {
    height: 300px;
  }

  .map-legend {
    gap: 1rem;
  }

  .legend-item {
    font-size: 0.8rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }
}
