#map-container {
  position: fixed;
  top: -30vh;
  width: 100%;
  height: 130vh !important;
}

/* Legacy Marker Styles (für Kompatibilität) - DEAKTIVIERT für visited */
.location-marker:not(.numbered) {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-image: url("../images/location-dot-blue.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  font-weight: bold;
  will-change: background-color, color, transform;
  position: absolute;
}

.location-marker:not(.numbered).highlighted {
  background-image: url("../images/location-dot-pink.png");
}

.location-marker:not(.numbered).highlighted div {
  transform: scale(1) !important; /* Auch hier keine Vergrößerung */
  transition: transform 0.3s ease;
}

.location-marker:not(.numbered) div {
  transition: color 0.3s ease;
  transform: scale(1) !important; /* Einheitliche Größe */
}

.location-marker:not(.numbered).visited div {
  opacity: 1 !important; /* Volle Sichtbarkeit */
  transform: scale(1) !important; /* Gleiche Größe */
}

/* ===== UNIVERSAL MARKER SIZE OVERRIDE ===== */
/* Diese Regel überschreibt ALLES und sorgt für einheitliche Größen */
/* DISABLED to allow highlighting scale effects */
/* .location-marker * {
  transform: scale(1) !important;
} */

.location-marker .marker-icon {
  transform: rotate(-45deg) scale(1) !important;
  width: 40px !important;
  height: 40px !important;
}

.location-marker .marker-number {
  transform: scale(1) !important;
  width: 24px !important;
  height: 24px !important;
}

/* ===== NUMMERIERTE MARKER STYLES ===== */
.location-marker.numbered {
  background: none !important;
  border: none !important;
}

.marker-content {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-icon {
  width: 40px !important;
  height: 40px !important;
  background: var(--primary-color);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg) scale(1) !important;
  border: 3px solid white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.marker-number {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #1e1e1e;
  color: white;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
  transition: all 0.3s ease;
  transform: scale(1) !important;
}

.marker-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
}

.marker-number.highlighted {
  background: #1e1e1e !important;
  transform: scale(1) !important;
  width: 24px !important;
  height: 24px !important;
}

/* Highlighted State - CSS Class Based (only scale, no color changes) */
/* Higher specificity to override all other scale rules */
.location-marker.numbered.marker-highlighted .marker-icon,
.location-marker.numbered.visited.marker-highlighted .marker-icon,
.marker-highlighted .marker-icon {
  transform: rotate(-45deg) scale(1.15) !important;
  transition: transform 0.2s ease !important;
}

.location-marker.numbered.marker-highlighted .marker-number,
.location-marker.numbered.visited.marker-highlighted .marker-number,
.marker-highlighted .marker-number {
  transform: scale(1.15) !important;
  transition: transform 0.2s ease !important;
}

/* Legacy Highlighted State (keep for compatibility) */
.location-marker.numbered.highlighted .marker-icon {
  /* background: #ff6b35 !important; */
  transform: rotate(-45deg) scale(1) !important;
  width: 40px !important;
  height: 40px !important;
}

/* Visited State - ALLE Transforms überschreiben */
.location-marker.numbered.visited .marker-icon {
  background: var(--visited-color) !important;
  transform: rotate(-45deg) scale(1) !important;
  width: 40px !important;
  height: 40px !important;
}

.location-marker.numbered.visited .marker-number {
  background: var(--visited-color) !important;
  transform: scale(1) !important;
  width: 24px !important;
  height: 24px !important;
}

.location-marker.numbered.visited.highlighted .marker-icon {
  background: #45a049 !important;
  transform: rotate(-45deg) scale(1) !important;
  width: 40px !important;
  height: 40px !important;
}

.location-marker.numbered.visited.highlighted .marker-number {
  background: #1e1e1e !important;
  transform: scale(1) !important;
  width: 24px !important;
  height: 24px !important;
}

/* Visited Hover States - auch gleich groß halten */
.location-marker.numbered.visited:hover .marker-icon {
  transform: rotate(-45deg) scale(1) !important;
}

.location-marker.numbered.visited:hover .marker-number {
  transform: scale(1) !important;
}

/* Disabled State */
.location-marker.numbered.disabled .marker-icon {
  background: #cccccc;
  opacity: 0.6;
}

.location-marker.numbered.disabled .marker-number {
  background: #999999;
  opacity: 0.6;
}

/* Animation für neue Marker */
@keyframes markerAppear {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(-45deg);
  }
  100% {
    transform: scale(1) rotate(-45deg);
    opacity: 1;
  }
}

.location-marker.numbered .marker-icon {
  animation: markerAppear 0.5s ease-out;
}

/* Hover Effekte für bessere Interaktion */
.location-marker.numbered:hover .marker-icon {
  transform: rotate(-45deg) scale(1);
}

.location-marker.numbered:hover .marker-number {
  transform: scale(1);
}

/* Responsive Anpassungen für Marker */
@media (max-width: 480px) {
  .marker-content {
    width: 45px;
    height: 45px;
  }

  .marker-icon {
    width: 36px;
    height: 36px;
  }

  .marker-number {
    width: 22px;
    height: 22px;
    font-size: 11px;
    top: -6px;
    right: -6px;
  }
}

/* ===== REST DER BESTEHENDEN STYLES ===== */
.maps-navigation {
  margin: 0 60px;
}

#map {
  height: 100%;
  max-height: 940px;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: none;
  touch-action: none;
  position: relative;
}

.leaflet-top {
  display: none;
}

.navigation-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
  text-decoration: none;
}

.navigation-link:focus {
  outline: none;
}

.navigation-link::-moz-focus-inner {
  border: 0;
}

.navigation-link {
  -webkit-tap-highlight-color: transparent;
}

.google-maps-text {
  margin: 0;
  padding: 0;
  color: white;
  font-size: 16px;
  font-weight: 400;
  opacity: 1 !important;
  text-decoration: underline;
}

.navigation-controls {
  display: flex;
  justify-content: space-between;
  background-color: var(--background-color);
  color: #000;
  opacity: 1 !important;
}

.navigation-controls .nav-btn {
  padding: 0.5rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.navigation-controls .nav-btn:focus {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.navigation-controls .nav-btn:active {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.navigation-controls .nav-btn:hover {
  opacity: 0.8;
}

.navigation-controls .nav-btn * {
  pointer-events: none;
}

.home-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  border: none;
  background-color: transparent;
}

.navigation-controls .home-btn {
  position: static;
  text-decoration: none;
  gap: 0.5rem;
}

.user-location-marker {
  position: relative;
  background: transparent;
  border: none;
}

.user-location-marker::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #4285f4;
  border: 3px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.user-location-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(66, 133, 244, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite ease-in-out;
}

.arrow-right {
  margin-left: 2px;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Alternative, stärkere Pulsanimation */
.user-location-marker.strong-pulse::after {
  animation: strongPulse 1.5s infinite ease-in-out;
}

@keyframes strongPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  25% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.4;
  }
  75% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0.2;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* Tour Route Line entfernt - nur nummerierte Marker verwenden */
/*
.leaflet-interactive {
  stroke-dasharray: 8, 4;
  animation: dashAnimation 2s linear infinite;
}

@keyframes dashAnimation {
  to {
    stroke-dashoffset: -12;
  }
}
*/

/* Für bessere Performance auf mobilen Geräten */
.user-location-marker,
.user-location-marker::before,
.user-location-marker::after {
  will-change: transform, opacity;
}

/* Reduzierte Animation wenn der Benutzer reduzierte Bewegung bevorzugt */
@media (prefers-reduced-motion: reduce) {
  .user-location-marker::after {
    animation: none;
  }

  .user-location-marker::before {
    animation: simpleBlinking 2s infinite;
  }

  @keyframes simpleBlinking {
    0%,
    50% {
      opacity: 1;
    }
    51%,
    100% {
      opacity: 0.5;
    }
  }

  .location-marker.numbered .marker-icon {
    animation: none;
  }

  /* Route-Animation entfernt */
  /* .leaflet-interactive { animation: none; stroke-dasharray: none; } */
}
