.sny-container-map-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden; /* Prevents any overflow issues */
}

.sny-container-map-container svg { 
  width: 100%;  /* Make SVG take full width */
  height: auto; /* Maintain aspect ratio */
  display: block; /* Remove inline spacing issues */
  max-width: 100%; /* Ensure it doesn't exceed container */
}

/* Ensure map remains interactive and properly scaled */
.county {
  cursor: pointer;
  transition: fill 0.2s;
}

.county.hovered,
.county.hovered path {
  fill: #4f2650; /* Hover effect */
}

/* Floating Popup */
#map-popup {
  position: absolute; /* Use fixed positioning to keep it on the screen */
  background-color: white;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  width: 180px;
  z-index: 9999;
  display: none;
  font-family: Arial, sans-serif;
  font-size: 14px;
  pointer-events: none; /* Prevent interfering with mouse movement */
}

#map-popup.visible {
  display: block;
}

.popup-header {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.popup-info {
  margin: 4px 0;
}

.popup-info .notices-count,
.popup-info .service-directory {
  font-weight: bold;
  margin-left: 5px;
  color: #333;
}

/* Arrow pointing to the hovered county */
#map-popup::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  #map-popup {
      pointer-events: auto;
  }
}
