/* Map container */
#dive-map {
  height: 500px;
  width: 100%;
  border-radius: 12px;
  margin: 1em 0 1.5em 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  background: #e8e8e8;
}

/* Responsive heights */
@media (max-width: 768px) {
  #dive-map {
    height: 400px;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  #dive-map {
    height: 350px;
    border-radius: 6px;
  }
}

.dive-map-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1em;
}

.dive-map-title {
  text-align: center;
  margin-bottom: 0.3em;
  font-size: 1.5em;
  color: #333;
}

@media (max-width: 480px) {
  .dive-map-title {
    font-size: 1.25em;
  }
}

.dive-map-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 0.75em;
  font-size: 0.9em;
}

/* Dive pin marker */
.dive-marker {
  background: transparent !important;
  border: none !important;
}

.dive-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dive-pin-inner {
  width: 60%;
  height: 60%;
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 10px rgba(0, 212, 255, 0.6),
    0 0 20px rgba(0, 212, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.dive-pin:hover .dive-pin-inner {
  transform: scale(1.2);
  box-shadow:
    0 0 15px rgba(0, 212, 255, 0.8),
    0 0 30px rgba(0, 212, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.dive-pin-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Popup styling */
.dive-popup-container .leaflet-popup-content-wrapper {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 153, 204, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dive-popup-container .leaflet-popup-tip {
  background: #fff;
}

.dive-popup-container .leaflet-popup-content {
  margin: 0;
}

.dive-popup {
  padding: 12px 16px;
  text-align: center;
  min-width: 120px;
}

.dive-popup-name {
  color: #333;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
}

.dive-popup-count {
  color: #0088b3;
  font-size: 13px;
  margin-bottom: 8px;
}

.dive-popup-link {
  display: inline-block;
  color: #fff;
  background: linear-gradient(135deg, #0099cc 0%, #006699 100%);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dive-popup-link:hover {
  background: linear-gradient(135deg, #00b3e6 0%, #0088b3 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 153, 204, 0.4);
}

/* Leaflet control styling */
.leaflet-control-attribution {
  font-size: 10px !important;
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  .dive-pin-inner {
    width: 70%;
    height: 70%;
  }

  .dive-pin-pulse {
    animation: none;
  }

  .leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
  }
}
