/**
 * Route Map Styles
 * 
 * Specific styling for route map visualization
 * 
 * @package RD\ContentMap
 */

/* Route map container - has distinctive border */
.rd-route-map {
  border: none; /*2px solid #3b82f6;*/
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* Route segment information popup */
.route-segment-popup .mapboxgl-popup-content {
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-width: 220px;
}

.route-segment-popup .mapboxgl-popup-tip {
  border-top-color: white;
}

.route-segment-info {
  font-size: 14px;
  line-height: 1.5;
}

.route-segment-label {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
  color: #1f2937;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 6px;
}

.route-segment-item {
  margin: 6px 0;
  color: #4b5563;
}

.route-segment-item strong {
  color: #1f2937;
  font-weight: 600;
  display: inline-block;
  min-width: 100px;
}

/* Highlighted markers when hovering over segment */
.rd-marker-segment-highlight {
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8))
    drop-shadow(0 0 12px rgba(239, 68, 68, 0.6));
  animation: pulse-marker 1s ease-in-out infinite;
}

@keyframes pulse-marker {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8))
      drop-shadow(0 0 12px rgba(239, 68, 68, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 1))
      drop-shadow(0 0 16px rgba(239, 68, 68, 0.8));
  }
}

/* Make route line appear clickable on hover */
.mapboxgl-canvas-container.mapboxgl-interactive {
  cursor: pointer;
}

/* Optional: Style markers differently on route maps */
.rd-route-map .rd-marker {
  transition: transform 0.2s ease-out, filter 0.2s ease-out;
}

/* New dynamic route segment popup styles */
.rd-route-segment-popup .mapboxgl-popup-content {
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-width: 200px;
}

.rd-route-segment-popup .mapboxgl-popup-tip {
  border-top-color: white;
}

.rd-route-segment-info {
  font-size: 14px;
  line-height: 1.5;
}

.rd-route-segment-label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #1f2937;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 4px;
}

.rd-route-segment-stats {
  display: flex;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
}

.rd-route-segment-stats span {
  white-space: nowrap;
}

/* Route info panel (total distance/time) */
.rd-route-info-panel {
  position: absolute;
  bottom: 40px;
  left: 10px;
  background: white;
  padding: 8px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  z-index: 10;
}

.rd-route-info-content {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #374151;
}

.rd-route-distance,
.rd-route-duration {
  font-weight: 600;
}

.rd-route-separator {
  color: #9ca3af;
}
