/* Reset all elements to prevent scaling */
* {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
  max-height: 100vh;
  max-width: 100vw;
  /* Samsung Browser Fix für Querformat */
  min-height: 100vh;
  min-width: 100vw;
  /* Verhindert Layout-Bruch bei Orientation Change */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  background: linear-gradient(135deg, #f5f9ff 0%, #e3f2fd 50%, #bbdefb 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  position: relative;
  overscroll-behavior: none;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  touch-action: none;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000;
  -webkit-perspective: 1000;
  /* Samsung Browser Fix für Querformat */
  min-width: 100%;
  min-height: 100%;
  /* Verhindert Größenänderungen bei Orientation Change */
  box-sizing: border-box;
  /* Karte und Marker sollen über dem Logo liegen */
  z-index: 10;
}

/* Drei Ebenen: Basiskarte (0) → Lottie (5) → Marker-Karte (10) – klare Abstände */
#map-lottie-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Unter dem Loader, aber sichtbar durch transparenten Hintergrund */
  isolation: isolate; /* eigener Stacking-Kontext für die drei Ebenen */
}
#map-lottie-wrapper #map-base,
#map-lottie-wrapper .lottie-container,
#map-lottie-wrapper #map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}
#map-lottie-wrapper #map-base {
  z-index: 0;
  pointer-events: none;
}
#map-lottie-wrapper .lottie-container {
  z-index: 5;
  pointer-events: none;
}
#map-lottie-wrapper #map {
  z-index: 10;
  background: transparent !important;
  pointer-events: auto;
}
/* OpenLayers-Viewport und Canvas der Marker-Karte transparent */
#map-lottie-wrapper #map .ol-viewport,
#map-lottie-wrapper #map .ol-viewport canvas {
  background: transparent !important;
  background-color: transparent !important;
}

.lottie-overlay {
  pointer-events: none;
  /* will-change nur in animations.js bei Bedarf (scale > 1) – reduziert Compositor-Layer in Firefox */
  image-rendering: optimizeQuality;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Browser-Hinweis bei nicht empfohlenen Browsern (z.B. Firefox) */
.browser-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30002; /* über dem Info-Button (30001) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #5d4037;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  touch-action: auto;
}
.browser-warning--visible {
  opacity: 1;
  transform: translateY(0);
}
.browser-warning--hidden {
  opacity: 0;
  transform: translateY(-100%);
}
.browser-warning__text {
  flex: 1;
  padding-right: 0.5rem;
}
.browser-warning__text strong {
  font-weight: 600;
}
.browser-warning__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.browser-warning__close:hover {
  background: rgba(0, 0, 0, 0.15);
}
.browser-warning__close:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Präsentations-Button-Stile */
#presentation-mode-btn,
.presentation-button {
  display: none !important; /* Standardmäßig ausgeblendet */
}

/* Nur auf Desktop anzeigen */
@media (min-width: 901px) {
  #presentation-mode-btn,
  .presentation-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* Auf Mobilgeräten immer ausblenden */
@media (max-width: 900px) {
  #presentation-mode-btn,
  .presentation-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Ursprüngliche Präsentations-Button-Stile */
.presentation-button {
  display: none; /* Standardmäßig ausgeblendet */
  position: fixed;
  right: 20px;
  bottom: 80px; /* Position über dem mobilen Menü-Button */
  z-index: 25000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #009FDF;
  border: 2px solid #fff;
  color: white;
  font-size: 24px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-direction: column;
}

/* Nur auf größeren Bildschirmen anzeigen */
@media (min-width: 1100px) {
  .presentation-button {
    display: flex;
  }
}

/* Aktiver/Gedrückter Zustand */
.presentation-button:active {
  transform: scale(0.95);
  opacity: 0.9;
}

/* Lade-/Fortschrittsanzeige - Oben im Overlay platziert */
#overlay-container .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background-color: white;
  width: 0%;
  transition: width 0.1s linear;
  z-index: 1;
}



/* Marker-Tooltip Stile */
.marker-tooltip {
  background: #009FDF;
  color: #fff;
  border: 2px solid #fff;
  font-size: 1.06em;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.11);
  pointer-events: none;
  white-space: nowrap;
  z-index: 10000;
  opacity: 0.98;
  transition: opacity 0.15s;
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  box-sizing: border-box;
  /* will-change wird dynamisch gesetzt, wenn Tooltip sichtbar */
}
.marker-tooltip.marker-tooltip--hawlelive {
  background: #003A63 !important;
}

.tooltip-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 24px;
  height: 24px;
}
.tooltip-loader::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: tooltip-spin 1s linear infinite;
  margin: auto;
}
@keyframes tooltip-spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}


/* Overlay-Container Styles */
#overlay-container {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30000; /* above marker group controls (20000) */
  width: 420px;
  height: 100vh;
  background: #009FDF;
  color: #fff;
  box-shadow: -6px 0 16px rgba(0,0,0,0.28);
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
  min-width: 320px; /* hard lower bound */
  max-width: 720px; /* hard upper bound */
  /* will-change wird dynamisch gesetzt während Animation/Resize */
}

/* Overlay Themes */
#overlay-container.overlay--hawle {
  background: #003A63;
}
#overlay-container.overlay--default {
  background: #009FDF;
}

#overlay-container.active {
  transform: translateX(0);
}

#overlay-container.resizing, #overlay-container.resizing * {
  user-select: none !important;
}

#overlay-container .resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  background: linear-gradient(to right, rgba(255,255,255,0.18), rgba(255,255,255,0));
}

/* Navigation-Buttons für Hotspot-Navigation */
.overlay-nav-button {
  position: absolute;
  bottom: 20px;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: none; /* Standardmäßig ausgeblendet - wird per JS auf flex gesetzt */
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Perfekte Zentrierung der Pfeile */
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  /* Flexbox für perfekte horizontale und vertikale Zentrierung */
  flex-direction: row;
  /* Korrektur für vertikale Zentrierung - stellt sicher, dass Zeichen perfekt mittig sind */
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Perfekte Zentrierung: transform für perfekte vertikale Ausrichtung der Pfeil-Zeichen */
  transform: translateY(-1px); /* Kleine Korrektur nach oben für perfekte Zentrierung */
}

.overlay-nav-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px) scale(1.05);
}

.overlay-nav-button:active {
  transform: translateY(-1px) scale(0.98);
  background: rgba(255, 255, 255, 0.2);
}

.overlay-nav-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.overlay-nav-button--prev {
  left: 20px;
}

.overlay-nav-button--next {
  right: 20px;
}

/* Im Präsentationsmodus ausblenden */
body.presentation-mode .overlay-nav-button,
#overlay-container.presentation-mode .overlay-nav-button {
  display: none !important;
}

/* Removed size-based scaling; overlay content uses its own overlay HTML styles */

#overlay-content {
  position: relative;
  padding: 18px 28px 28px 20px; /* rechts reduziert, Close-Button braucht weniger Platz */
  overflow: auto;
  height: 100%;
  overscroll-behavior: contain;
}

/* Custom scrollbar for overlay content (WebKit/Blink) */
#overlay-content::-webkit-scrollbar {
  width: 10px;
}
#overlay-content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.14);
  border-radius: 8px;
}
#overlay-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.55);
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0); /* creates padding look */
}
#overlay-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.75);
}

/* Firefox scrollbar */
#overlay-content {
  scrollbar-width: thin;              /* thin | auto | none */
  scrollbar-color: rgba(255,255,255,0.65) rgba(255,255,255,0.18);
}

/* Close button for overlay */
#overlay-close {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20%;
  color: white;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100; /* above overlay content and loaders */
  pointer-events: auto;
}
#overlay-close::before {
  content: "\00D7"; /* multiplication sign (×) */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30px;
  line-height: 1;
  color: #fff;
}
#overlay-close:hover {
  background: rgba(255,255,255,0.28);
}
#overlay-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Mobile: overlay takes full screen and bigger close button */
@media (max-width: 900px) {
  #overlay-container {
    left: 0;
    right: 0;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    z-index: 30000; /* ensure above marker group controls (20000) and mobile burger/menu */
  }
  #overlay-container .resize-handle { display: none !important; }
  #overlay-close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    padding: 0; /* keep content perfectly centered on mobile */
    font-size: 0; /* use ::before */
  }
  #overlay-close::before { 
    font-size: 24px; 
    line-height: 1;
  }
}

#overlay-content h1, #overlay-content h2, #overlay-content h3 {
  color: #fff;
  margin-top: 0.5em;
  margin-bottom: 0.4em;
}

#overlay-content p, #overlay-content ul, #overlay-content li {
  color: #fff;
}

/* Overlay-Bilder von Anfang an auf Containerbreite begrenzen (verhindert übergroße Anzeige und Sprung) */
#overlay-content .overlay-image,
#overlay-content img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Willkommens-Popup */
#welcome-popup {
  position: fixed;
  z-index: 100000; /* Über dem Loader (99999), damit Popup während des Ladens angezeigt werden kann */
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein 0.35s;
}
.welcome-popup-content {
  background: #fff;
  color: #009FDF;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 2em;
  max-width: 80%;
  text-align: center;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .welcome-popup-content {
    max-width: 90%;
    padding: 1.5em;
    margin: 1em;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  
  .welcome-popup-content h2 {
    font-size: 1.5em;
    margin-bottom: 0.8em;
  }
  
  .welcome-popup-content p {
    margin: 1em 0;
    line-height: 1.5;
  }
  
  #welcome-popup-close {
    margin-top: 1em;
    padding: 0.8em 1.5em;
  }
}
.welcome-popup-content h2 {
  margin-top: 0;
  color: #009FDF;
}
.welcome-popup-content p {
  color: #333;
  margin-bottom: 2em;
}
#welcome-popup-close {
  background: #009FDF;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7em 2.2em;
  font-size: 1.1em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.11);
  font-weight: 500;
}
body.welcome-popup-open {
  overflow: hidden;
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Info-Button oben links */
#info-button {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 30001; /* Über Overlay (30000) und Marker-Controls – immer klickbar */
  pointer-events: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(120, 130, 140, 0.65);
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  transition: background 0.2s, transform 0.2s;
}
#info-button:hover {
  background: rgba(100, 110, 120, 0.8);
  transform: scale(1.05);
}
#info-button:focus {
  outline: 2px solid rgba(120, 130, 140, 0.8);
  outline-offset: 2px;
}

/* Info-Popup */
.info-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99998;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  padding: 1rem;
}
.info-popup--visible {
  opacity: 1;
  visibility: visible;
}
.info-popup-content {
  position: relative;
  background: #fff;
  color: #333;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 1.5em 2em;
  padding-top: 2.5em;
  max-width: 420px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
.info-popup--visible .info-popup-content {
  transform: scale(1);
}
.info-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.info-popup-close:hover {
  color: #333;
  background: rgba(0,0,0,0.06);
}
.info-popup-content h2 {
  margin: 0 0 0.6em 0;
  font-size: 1.25rem;
  color: #009FDF;
  text-align: center;
}
.info-popup-content p {
  margin: 0 0 1.2em 0;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}
.info-popup-more-btn {
  display: inline-block;
  background: #009FDF;
  color: #fff;
  border-radius: 6px;
  padding: 0.5em 1.2em;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.info-popup-more-btn:hover {
  background: #0080c0;
}
body.info-popup-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  #info-button {
    display: none; /* Auf Mobile nicht auf der Karte anzeigen */
  }
  .info-popup-content {
    max-width: 92%;
    padding: 1.2em 1.5em;
    padding-top: 2.2em;
  }
}

/* Markergruppen-UI */
.marker-group-controls {
  position: fixed;
  left: 50%;
  bottom: 24px;
  top: auto;
  right: auto;
  z-index: 20000; /* Below presentation button (25000) */
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  padding: 8px 16px;
  min-width: 100%;
  max-width: 100vw;
  transition: left 1.2s cubic-bezier(.22,1,.36,1),
    transform 1.2s cubic-bezier(.22,1,.36,1),
    max-width 1.2s cubic-bezier(.22,1,.36,1),
    padding-left 1.2s cubic-bezier(.22,1,.36,1),
    padding-right 1.2s cubic-bezier(.22,1,.36,1);
}


.marker-group-button {
  background: #009FDF;
  color: #ffffff;
  border: 2px solid #fff;
  border-radius: 5px;
  padding: 0.38em 0.9em 0.38em 0.9em;
  font-size: 0.98rem;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.2s;
  width: 100%;
  min-width: 90px;
  max-width: 180px;
  justify-content: center;
  text-align: center;
  min-height: 2.2em;
  box-sizing: border-box;
}


.marker-group-button img {
  width: 1.8em;
  height: 1.8em;
  margin-right: 0.4em;
}

.marker-group-button.active,
.marker-group-button:active {
  background: #009FDF;
  color: #fff;
}


#site-logo {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  /* Hinter der Karte, damit sie darüber „drüber fährt“ */
  z-index: 0;
  padding: 0.2em 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 1.2s cubic-bezier(.22,1,.36,1),
    transform 1.2s cubic-bezier(.22,1,.36,1);
}
#site-logo img {
  height: 90px;
  width: auto;
  max-width: 150px;
  display: block;
}

@media (max-width: 900px) {
  #site-logo {
    top: 3x;
    padding: 0.1em 0.6em;
    transform: translateX(-50%) scale(0.8);
  }
  #site-logo img {
    height: 30px;
    max-width: 100px;
  }

  html, body {
    height: 100vh !important;
    width: 100vw !important;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    position: fixed !important;
    top: 0;
    left: 0;
  }
  .map-controls-bar,
  .marker-group-controls {
    display: none !important;
  }

  /* === Mobile Markergruppen-Menü === */
.marker-group-mobile-open-btn {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 50000; /* immer über Gewinnspiel UI (40000) */
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #009FDF;
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
  }

  .marker-group-mobile-open-btn img {
    filter: brightness(0) invert(1);
  }
  .marker-group-mobile-overlay {
    z-index: 50001 !important; /* immer über Gewinnspiel UI (40000) */
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.32);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: background 0.2s;
  }
  
  .marker-group-mobile-btn:not(.active) {
    background: #848484;    /* Hintergrundfarbe für deaktiviert */
    color: #fff;            /* Textfarbe für deaktiviert */
    border-color: #848484;  /* Rahmenfarbe für deaktiviert */
  }
  
  .marker-group-mobile-content {
    z-index: 50002 !important; /* über Overlay + Gewinnspiel UI */

    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 18px 12px 12px 12px;
    width: 100vw;
    max-width: 420px;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.13);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: slideup 0.23s cubic-bezier(.4,0,.2,1);
    position: relative; /* Für absolute Positionierung des Close-Buttons */
  }
  
  .marker-group-mobile-title {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin: 0;
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 0 4px;
    align-self: flex-start;
  }
  
  .marker-group-mobile-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.1);
  }
  
  .marker-group-mobile-info-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .marker-group-mobile-info-wrapper #info-button-mobile {
    position: relative;
    bottom: auto;
    left: auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(120, 130, 140, 0.65);
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 600;
    font-style: italic;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: background 0.2s, transform 0.2s;
  }
  
  .marker-group-mobile-info-wrapper #info-button-mobile:hover {
    background: rgba(100, 110, 120, 0.8);
    transform: scale(1.05);
  }
  
  .marker-group-mobile-info-wrapper #info-button-mobile:focus {
    outline: 2px solid rgba(120, 130, 140, 0.8);
    outline-offset: 2px;
  }
  @keyframes slideup {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Touch-Zoom und Auswahl auf Logo/Overlay auf Mobile verhindern */
@media (max-width: 900px) {
  #overlay-close {
    touch-action: auto;
  }
}


@media (max-width: 900px) {
  .marker-tooltip {
    display: none !important;
  }
  #site-logo {
    top: 50px !important;
    padding: 0.2em 1.6em !important;
  }
  #site-logo img {
    height: 90px !important;
    max-width: 150px !important;
  }
}

  .marker-group-mobile-close {
    background: none;
    border: none;
    color: #000000;
    font-size: 2.2rem;
    align-self: flex-end;
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 18px;
    right: 12px;
  }
  .marker-group-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 2px;
  }
  .marker-group-mobile-btn {
  border: none !important;
    background: #f3f7fa;
    color: #009FDF;
    border: 2px solid #009FDF;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.7em;
    cursor: pointer;
    padding: 0.7em 1em;
    transition: background 0.13s, color 0.13s;
    width: 100%;
    box-sizing: border-box;
  }
  .marker-group-mobile-btn img {
    width: 1.5em;
    height: 1.5em;
    margin-right: 0.2em;
  }
  .marker-group-mobile-btn.active {
    background: #009FDF;
    color: #fff;
    border-color: #009FDF;
  }
}

.overlay-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 120px;
}
/* Initial-Loader sofort vollflächig und zentriert (verhindert Sprung von oben in die Mitte) */
#overlay-content .overlay-loading--initial {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* Vollflächiger Loader beim Overlay: komplett deckend, kein Durchscheinen */
#overlay-content .overlay-loading--content {
  height: 100% !important;
  opacity: 1 !important;
  background: #003A63 !important; /* Hawle – wird per JS bei Default auf #009FDF gesetzt */
}
#overlay-container.overlay--default #overlay-content .overlay-loading--content {
  background: #009FDF !important;
}
#overlay-container.overlay--hawle #overlay-content .overlay-loading--content {
  background: #003A63 !important;
}
#overlay-content .overlay-loading .loading-text {
  color: #fff;
  font-size: 1rem;
  margin: 0;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #fff;
  border-top: 4px solid #009FDF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 18px;
}
#overlay-content .overlay-loading-spinner {
  margin-bottom: 0;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loading-text {
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 0.04em;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  text-align: center;
}

@media (max-width: 900px) {
  #overlay-content {
    padding-bottom: 2.5em !important;
  }
  #overlay-close {
    padding-right: 0.7em !important;
  }
}

