/* Custom Leaflet CSS - Attribution removed, optimized for performance */

.leaflet-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f9fafb;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Remove attribution */
.leaflet-control-attribution {
  display: none !important;
}

.leaflet-bottom.leaflet-right {
  display: none !important;
}

/* Enhanced map controls */
.leaflet-control-zoom {
  border: 2px solid var(--gray-200) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: white !important;
  color: var(--gray-700) !important;
  border-bottom: 1px solid var(--gray-200) !important;
  font-size: 18px !important;
  line-height: 36px !important;
  width: 36px !important;
  height: 36px !important;
  transition: all 150ms ease !important;
}

.leaflet-control-zoom a:hover {
  background: var(--primary-blue) !important;
  color: white !important;
}

.leaflet-control-zoom a:last-child {
  border-bottom: none !important;
}

/* Popup styling */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 1rem !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.leaflet-popup-content h3 {
  margin: 0 0 0.5rem 0 !important;
  color: var(--primary-blue) !important;
  font-size: 1.1rem !important;
}

.leaflet-popup-content p {
  margin: 0.25rem 0 !important;
  color: var(--gray-700) !important;
}

.leaflet-popup-tip {
  box-shadow: var(--shadow-md) !important;
}

/* Marker clustering styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(37, 99, 235, 0.6) !important;
  border-radius: 50% !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: var(--primary-blue) !important;
  color: white !important;
  border-radius: 50% !important;
  font-weight: 600 !important;
}

/* Custom marker */
.custom-marker {
  background: var(--primary-blue);
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 200ms ease;
}

.custom-marker:hover {
  transform: rotate(-45deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.custom-marker-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

/* Loading state */
.map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}

.map-loading::after {
  content: '';
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

/* Responsive map container */
.map-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .map-wrapper {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .map-wrapper {
    height: 350px;
  }
}

/* Fullscreen button */
.leaflet-control-fullscreen {
  background: white !important;
  border: 2px solid var(--gray-200) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  width: 36px !important;
  height: 36px !important;
  cursor: pointer;
  transition: all 150ms ease !important;
}

.leaflet-control-fullscreen:hover {
  background: var(--primary-blue) !important;
  color: white !important;
}

/* Tooltip */
.leaflet-tooltip {
  background: rgba(0, 0, 0, 0.85) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
  border-top-color: rgba(0, 0, 0, 0.85) !important;
}
