/* Leaflet custom styles for OpenStreetMap - Styled to match reference image */

.acf-map {
  width: 100%;
  height: 500px; /* Increased height for better visibility */
  margin-bottom: 30px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Fix for map tiles disappearing when scrolling */
.leaflet-tile {
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Custom popup styling to match reference image */
.custom-popup .leaflet-popup-content-wrapper {
  border-radius: 4px;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.custom-popup .leaflet-popup-content {
  margin: 0;
  padding: 10px 15px;
}

.custom-popup .leaflet-popup-tip {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.custom-popup .leaflet-popup-content h3 {
  margin-top: 5px;
  margin-bottom: 5px;
  font-weight: bold;
  color: #274E34; /* Match brand green color */
}

.custom-popup .leaflet-popup-content p {
  margin-bottom: 5px;
  font-size: 0.9em;
  color: #555;
}

/* Style map controls */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 1px 5px rgba(0,0,0,0.15) !important;
}

.leaflet-control-zoom a {
  border-radius: 4px !important;
  color: #555 !important;
}

.leaflet-control-zoom-in {
  border-bottom: 1px solid #f0f0f0 !important;
}

/* Style attribution */
.leaflet-control-attribution {
  background-color: rgba(255, 255, 255, 0.8) !important;
  font-size: 10px !important;
}

.leaflet-bottom {
  bottom: 5px;
}

.leaflet-right {
  right: 5px;
}

/* Custom marker styling */
.custom-marker {
  transition: all 0.2s ease-in-out;
}

/* Fix image marker display */
.leaflet-marker-icon.custom-marker {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
  transform-origin: bottom center;
}

.leaflet-marker-icon.custom-marker:hover {
  transform: scale(1.1);
}

/* Add subtle shadow to the map container */
.acf-map::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
}

/* Improve the visual appearance of the map container */
.acf-map .leaflet-container {
  background: #f8f8f8;
}

/* Adjust zoom control appearance */
.leaflet-control-zoom a {
  transition: background-color 0.2s ease;
  font-size: 16px;
  line-height: 26px;
  font-weight: bold;
}

.leaflet-control-zoom a:hover {
  background-color: #f4f4f4 !important;
  color: #274E34 !important;
}
