/* User Location Marker Styles */
.custom-user-location-icon {
  background: none !important;
  border: none !important;
}

.user-location-marker {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-location-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
  position: relative;
}

.user-location-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  animation: user-location-pulse 2s infinite;
}

/* Style variants */
.user-location-marker.style-default .user-location-dot {
  background-color: #007bff;
}

.user-location-marker.style-default .user-location-pulse {
  background-color: rgba(0, 123, 255, 0.4);
}

.user-location-marker.style-highlighted .user-location-dot {
  background-color: #28a745;
  border-width: 3px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.user-location-marker.style-highlighted .user-location-pulse {
  background-color: rgba(40, 167, 69, 0.4);
}

.user-location-marker.style-subtle .user-location-dot {
  background-color: #6c757d;
  opacity: 0.7;
  border-width: 1px;
}

.user-location-marker.style-subtle .user-location-pulse {
  background-color: rgba(108, 117, 125, 0.3);
}

.user-location-marker.style-pulsing .user-location-dot {
  background-color: #ffc107;
  animation: user-location-dot-pulse 1.5s ease-in-out infinite;
}

.user-location-marker.style-pulsing .user-location-pulse {
  background-color: rgba(255, 193, 7, 0.4);
  animation: user-location-pulse 1.5s ease-in-out infinite;
}

/* City Location Marker Styles - NOWE */
.custom-city-location-icon {
  background: none !important;
  border: none !important;
}

.city-location-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.city-location-dot {
  width: 16px;
  height: 16px;
  background-color: #17a2b8;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 4px;
}

.city-location-label {
  background: rgba(23, 162, 184, 0.9);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes user-location-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

@keyframes user-location-dot-pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* Popup styles */
.user-location-popup-container .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-location-popup {
  font-family: system-ui, -apple-system, sans-serif;
  padding: 8px;
  min-width: 150px;
}

  .user-location-popup .popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 14px;
  }

  .user-location-popup .popup-coordinates {
    text-align: center;
    font-size: 12px;
  }

.city-location-popup-container .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.city-location-popup {
  font-family: system-ui, -apple-system, sans-serif;
  padding: 8px;
  min-width: 180px;
}

  .city-location-popup .popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 14px;
  }

  .city-location-popup .popup-coordinates {
    text-align: center;
    font-size: 12px;
  }

/* Tooltip styles */
.radius-tooltip {
  background-color: rgba(0, 123, 255, 0.9);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
}

  .radius-tooltip::before {
    border-top-color: rgba(0, 123, 255, 0.9) !important;
  }

.accuracy-tooltip {
  background-color: rgba(108, 117, 125, 0.9);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
}

  .accuracy-tooltip::before {
    border-top-color: rgba(108, 117, 125, 0.9) !important;
  }

/* Responsive adjustments */
@media (max-width: 768px) {
  .user-location-marker {
    width: 18px;
    height: 18px;
  }

  .user-location-dot {
    width: 10px;
    height: 10px;
  }

  .user-location-pulse {
    width: 18px;
    height: 18px;
  }

  .city-location-label {
    font-size: 10px;
    padding: 1px 6px;
  }

  .city-location-dot {
    width: 14px;
    height: 14px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .user-location-dot,
  .city-location-dot {
    border-width: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .user-location-pulse,
  .user-location-marker.style-pulsing .user-location-dot {
    animation: none;
  }
}

/* Usuń outline z elementów mapy Leaflet */
.leaflet-popup-close-button {
  outline: none !important;
  border: none !important;
}

  .leaflet-popup-close-button:focus {
    outline: none !important;
    box-shadow: none !important;
  }

.leaflet-container a.leaflet-popup-close-button {
  outline: none !important;
}

.leaflet-popup-content-wrapper:focus,
.leaflet-popup:focus,
.leaflet-marker-icon:focus {
  outline: none !important;
}

/* Usuń czerwony prostokąt z markerów */
.custom-marker:focus,
.custom-marker:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.leaflet-marker-icon:focus,
.leaflet-marker-icon:focus-visible {
  outline: none !important;
}
