/* Map Widget Styles */

.map-container {
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Responsive width constraints */

@media (min-width: 768px) {

.map-container {
    max-width: 100%
}
  }

@media (min-width: 1024px) {

.map-container {
    max-width: 100%
}
  }

@media (min-width: 1280px) {

.map-container {
    max-width: 100%
}
  }

#map {
  width: 100%;
  height: 400px; /* Default height, can be overridden by Elementor controls */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */

@media (max-width: 768px) {
  #map {
    height: 300px;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  #map {
    height: 250px;
    border-radius: 4px;
  }
}

/* Google Maps Info Window Customization */

.gm-style .gm-style-iw-c {
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
}

.gm-style .gm-style-iw-t::after {
  background: linear-gradient(45deg, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0) 100%);
}

/* Custom Marker Info Window Styling (adapted from locations widget) */

.pin-card__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  padding-right: 50px;
}

.pin-card__title {
  font-size: 18px;
  font-weight: 600;
  color: #004133;
}

.pin-card__content a {
  color: #004133;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.pin-card__content a:hover {
  text-decoration: underline;
}

.pin-card__content img {
  width: 22px;
}

.pin-card__content a img {
  width: 7px;
}

.pin-card__title,
.pin-card__permalink {
  padding-left: 42px;
}

.pin-card__directions,
.pin-card__directions a,
.pin-card__phone,
.pin-card__permalink {
  display: flex;
  align-items: center;
}

.pin-card__directions,
.pin-card__phone {
  gap: 18px;
}

.pin-card__directions a,
.pin-card__permalink {
  gap: 8px;
}

/* Map Controls Styling */

.gm-control-active {
  background-color: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.gm-control-active:hover {
  background-color: #f8f9fa !important;
}

/* Fullscreen Control */

.gm-fullscreen-control {
  background-color: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.gm-fullscreen-control:hover {
  background-color: #f8f9fa !important;
}

/* Zoom Controls */

.gm-zoom-control {
  background-color: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.gm-zoom-control button {
  background-color: #ffffff !important;
  border: none !important;
  color: #333333 !important;
  font-size: 18px !important;
  font-weight: bold !important;
  padding: 8px 12px !important;
  transition: background-color 0.2s ease !important;
}

.gm-zoom-control button:hover {
  background-color: #f8f9fa !important;
}

.gm-zoom-control button:active {
  background-color: #e9ecef !important;
}

/* Map Type Control */

.gm-type-control {
  background-color: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.gm-type-control button {
  background-color: #ffffff !important;
  border: none !important;
  color: #333333 !important;
  font-size: 14px !important;
  padding: 8px 12px !important;
  transition: background-color 0.2s ease !important;
}

.gm-type-control button:hover {
  background-color: #f8f9fa !important;
}

.gm-type-control button:active {
  background-color: #e9ecef !important;
}

/* Street View Control */

.gm-svpc {
  background-color: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.gm-svpc:hover {
  background-color: #f8f9fa !important;
}

/* Map Loading State */

.map-container.loading #map {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Error State */

.map-container.error #map {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

/* Accessibility Improvements */

.gm-style button:focus {
  outline: 2px solid #007cba !important;
  outline-offset: 2px !important;
}

/* High Contrast Mode Support */

@media (prefers-contrast: high) {
  .gm-control-active,
  .gm-fullscreen-control,
  .gm-zoom-control,
  .gm-type-control,
  .gm-svpc {
    border: 2px solid #000000 !important;
    background-color: #ffffff !important;
  }
  
  .gm-zoom-control button,
  .gm-type-control button {
    border: 1px solid #000000 !important;
  }
}

/* Reduced Motion Support */

@media (prefers-reduced-motion: reduce) {
  .map-container.loading #map {
    animation: none;
  }
  
  .gm-style button {
    transition: none !important;
  }
}
