/* ═════════════════════════════════════════════════════════
   MAIN-COMPONENTS.CSS – UI Component Styles
   ═════════════════════════════════════════════════════════ */


/* ===================================
   MICROTIP OVERRIDES
   =================================== */

/* Microtip Farben (zentral ueberschrieben) */
[aria-label][role~="tooltip"]::after {
  font-family: var(--font-family);
    font-size: 13px !important;  /* Fixe Textgröße */
    line-height: 16px !important;  /* Fixe Zeilenhöhe */
    font-weight: 600;  /* Einheitliche Dicke */
  color: var(--microtip-color);
  background: var(--microtip-background-color);
  border: 3px solid var(--microtip-border-color);
  box-shadow: 3px 1px 10px 3px var(--micotip-shadow-color);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: pre;
  overflow: hidden;
}

/* Microtip Pfeil: SVG durch CSS-Border ersetzen */
[aria-label][role~="tooltip"]::before {
  background: none !important;
  content: "" !important;
  width: 0 !important;
  height: 0 !important;
  border: 6px solid transparent;
}


[role~="tooltip"][data-microtip-position|="top"]::before    { border-top: 8px solid var(--microtip-border-color); border-bottom: 0; margin-bottom: 3px; }
[role~="tooltip"][data-microtip-position|="bottom"]::before { border-bottom: 8px solid var(--microtip-border-color); border-top: 0; margin-top: 3px; }
[role~="tooltip"][data-microtip-position="left"]::before    { border-left: 8px solid var(--microtip-border-color); border-right: 0; margin-right: 3px; }
[role~="tooltip"][data-microtip-position="right"]::before   { border-right: 8px solid var(--microtip-border-color); border-left: 0; margin-left: 3px; }


/* ===================================
   LANGUAGE SWITCHER & SETTINGS
   =================================== */

.language-switcher {
  position: absolute;
  top: 1.2em;
  right: calc(1.5em + 300px + 12px);
  z-index: 1000;
}

/* Solo Gear Button */
.settings-gear-button-solo {
  font-size: inherit;
  width: calc(1.2em + 2 * .6em + 2px);
  height: calc(1.2em + 2 * .6em + 2px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  box-shadow: 0px 2px 8px 1px var(--shadow-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0.5;
}

.settings-gear-button-solo:hover {
  opacity: 0.9;
  background: var(--dropdown-bg);
}

.settings-gear-button-solo i {
  font-size: 20px;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.settings-gear-button-solo:hover i {
  transform: rotate(90deg);
}

/* ===================================
   SETTINGS POPOVER
   =================================== */

.settings-popover {
  font-family: var(--font-family);
  position: absolute;
  right: 0;
  top: 0;
  background: var(--dropdown-bg);
  border-radius: 17px;
  box-shadow: 0 4px 12px 2px var(--shadow-color);
  min-width: 280px;
  overflow: visible;
  animation: fadeIn 0.15s ease-out;
  /* Kein eigener z-index → kein Stacking-Context → Microtips können das Popover überdecken.
     Stacking kommt vom Parent .language-switcher (z-index: 1000). */
}

/* Settings Header */
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--dropdown-border);
  background: var(--dropdown-alt-bg);
  position: relative;
}

/* Hovered Tooltip-Section über Nachbar-Sections heben */
.settings-header:has([role~="tooltip"]:hover) {
  z-index: 2;
}

/* Titel-Zeile */
.settings-title-header {
  font-weight: 600;
  border-bottom: none;
}

.settings-title-header .settings-header-content span {
  font-size: 1.4em;
}

.settings-title-header .settings-header-content i {
  color: var(--text-color);
}

/* Close-Button (X) in der Titelzeile – gleiche Größe/Form wie Zahnrad */
.settings-close-btn {
  width: calc(1.2em + 2 * .6em + 2px);
  height: calc(1.2em + 2 * .6em + 2px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  box-shadow: 0px 2px 8px 1px var(--shadow-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  color: var(--text-color);
  opacity: 0.5;
  transition: all 0.2s ease;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 10;
}

.settings-close-btn i {
  font-size: 20px;
}

.settings-close-btn:hover {
  opacity: 0.9;
  background: var(--dropdown-bg);
}

/* Zweizeilige Sprach-Sektion */
.settings-header-languages {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.settings-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.settings-header:first-child {
  border-radius: 17px 17px 0 0;
}

.settings-header:last-child {
  border-bottom: none;
  border-radius: 0 0 17px 17px;
}

.settings-header-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  font-weight: normal;
  color: var(--text-color);
  flex-shrink: 0;
}

.settings-header-content i {
  width: 16px;
  text-align: center;
  color: #0066ff;
}

/* Icon Buttons im Header */
.settings-header-icons {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* FLAGGEN: Zweite Zeile, gleichmäßig verteilt */
.settings-language-icons {
  gap: 6px;
  width: 100%;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.settings-icon-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  font-size: 0.85em;
  border-radius: 4px;
  flex-shrink: 0;
  text-align: center;
  vertical-align: middle !important;
  width: 32px !important;
}

/* Flaggen: Größere Größe für sichtbare Flaggen */
.settings-flag-btn {
  font-size: 20px !important;
  width: 24px !important;
  height: 24px !important;
  opacity: 0.25 !important;
  padding: 2px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background-color: transparent !important;
}

.settings-flag-btn:hover {
  opacity: 1 !important;
  background-color: transparent !important;
}

/* Dark Mode & andere Icons: MIT active/hover */
.settings-icon-btn:not(.settings-flag-btn):hover {
  background: var(--dropdown-border);
  z-index: 1;
}

/* Active-Styling NUR für NICHT-Flaggen */
.settings-icon-btn.active:not(.settings-flag-btn) {
  background: #0066ff;
  width: 20px;
  color: white;
  box-shadow: 0 0 0 2px #0066ff;
  text-align: center;
  vertical-align: middle !important;
}

/* Active Flagge: NUR Opacity ändern */
.settings-flag-btn.active {
  opacity: 1 !important;
}

.settings-icon-btn.settings-icon-danger {
  color: var(--space-closed);
}

.settings-icon-btn.settings-icon-danger:hover {
  background: rgba(221, 68, 68, 0.1);
}

/* Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===================================
   CONNECTOR & CONNECTION LINES
   =================================== */

/* Connector SVG (Schweif zwischen Liste und Karte) */
#current-connector {
  position: fixed;
  width: 80px;
  z-index: 1001;
  pointer-events: none;
}

/* Connection Line Styling */
.connection-line {
  pointer-events: none !important;
  z-index: 100 !important;
}


/* ===================================
   LEAFLET MARKERS & ZOOM PERFORMANCE
   =================================== */

/* Pin Stabilization */
.leaflet-marker-icon {
  transition: transform 0.2s ease-out !important;
  will-change: transform !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

.leaflet-marker-pane .leaflet-marker-icon,
.leaflet-shadow-pane img {
  transition: opacity 0.2s ease-in-out !important;
}

/* Während Zoom: NUR Leaflets Zoom-Animation blockieren, NICHT unsere Scale-Transition */
.leaflet-zoom-animated .leaflet-marker-icon {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Nur wenn Marker versteckt wird */
.leaflet-marker-icon.leaflet-zoom-hide {
  transition: none !important;
  animation: none !important;
}


/* ===================================
   LEAFLET POPUPS
   =================================== */

/* Popup Animations */
.leaflet-popup {
  animation: popupFadeIn 0.10s ease-out !important;
}

.leaflet-popup.leaflet-popup-closing {
  animation: popupFadeOut 0.02s ease-out !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background-color: rgba(188, 255, 222, .83);
}

.leaflet-popup-content-wrapper {
  overflow: visible;
  z-index: 800;
  width: auto !important;
}

.leaflet-popup-content {
  margin: 12px !important;
}

@keyframes popupFadeIn {
  0% {
    opacity: 0;
  }

  50% {
    opacity: .66;
  }

  100% {
    opacity: 1;
  }
}

@keyframes popupFadeOut {
  0% {
    opacity: 1;
  }

  50% {
    opacity: .33;
  }

  100% {
    opacity: 0;
  }
}

.leaflet-popup-fade-animation {
  animation: none !important;
}


/* ===================================
   POPUP CONTENT ELEMENTS
   =================================== */

a#url {
  display: block;
  width: 100%;
  margin-left: -13px;
  margin-top: 6px;
  padding: 0.2em 1em;
  color: var(--text-color);
  background: transparent;
  cursor: alias;
  text-align: right;
  text-decoration: none;
}

a#url:hover {
  color: white;
  background: var(--text-color);
  text-decoration: none;
  text-align: left;
}

a h3 {
  padding: 0.2em 0.3em 0.2em 2.4em;
  display: inline;
  color: white !important;
  text-decoration: none !important;
  border-radius: .36em;
  background-color: white;
  background-image: linear-gradient(to bottom, var(--status-color, blue) 50%, transparent 50%);
  background-size: 100% 400%;
  background-position: 0 0;
  border: .12em solid var(--status-color, blue);
  cursor: none;
  transition: background-position 130ms ease-in-out, color 130ms ease-in-out;
}

a:hover h3 {
  color: var(--status-color, blue) !important;
  background-position: 0 100%;
}

a#titleurl {
  padding: .2em .1em .2em 0;
  text-decoration: none;
}

/* ID-Anzeige im Namensfeld: unsichtbar (gleiche Farbe wie Hintergrund), sichtbar beim Hover */
a#titleurl h3 {
  position: relative;
}

a#titleurl h3::before {
  content: '#' attr(data-id);
  position: absolute;
  left: 0.7em;
  bottom: 0.5px;
  padding-bottom: inherit;
  color: var(--status-color, blue);
  opacity: 0.7;
  font-size: 0.7em;
  font-weight: normal;
  font-style: italic;
  z-index: 1;
  pointer-events: none;
}

hr {
  border: 0px solid white;
}

.popup-body-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  margin-top: -8px;
  margin-bottom: 4px;
}

.popup-style-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  color: var(--status-color);
}


/* ===================================
   ZOOM FRAME TRANSITIONS
   =================================== */

/* Zoom Frame Transitions */
.leaflet-overlay-pane svg path {
  transition: opacity 0.4s ease-in-out, fill-opacity 0.4s ease-in-out !important;
}

.zoom-preview-overlay {
  transition: opacity 0.4s ease-in-out !important;
}

.leaflet-interactive {
  transition: opacity 0.4s ease-in-out, fill-opacity 0.4s ease-in-out;
}


/* ===================================
   SPACE STATUS (Door-Icons & Names)
   =================================== */

/* *** Door-Icon Klassen *** */
.space-name-open,
.door-icon-open {
  color: var(--space-open);
}

.space-name-closed,
.door-icon-closed {
  color: var(--space-closed);
}

.space-name-unknown,
.door-icon-unknown {
  color: var(--space-unknown);
}

.space-name-default {
  color: var(--space-hover);
}

/* *** weight 600 für Namen *** */
.space-name-open,
.space-name-closed,
.space-name-unknown,
.space-name-default {
  font-weight: 600;
}


/* ===================================
   POPUP NAME HIGHLIGHTING
   =================================== */

/* Allgemeines h3-Style: Name und Bookmark-Icon inline halten */
a#titleurl h3 {
  /* display: inline-block; */
  /* max-width: 100%; */
  max-width: none;
  white-space: nowrap;
}

/* Styling für den Makerspace-Namen nach SpaceAPI-Status */
a#titleurl h3.space-unknown { border-color: var(--space-unknown); }

/* Icon im Namen: weiß, korrekt ausgerichtet */
a#titleurl h3.space-open .fas,
a#titleurl h3.space-closed .fas,
a#titleurl h3.space-unknown .fas {
  color: white;
  position: relative;
  bottom: 1px;
  transition: color 130ms ease-in-out;
}

/* === POPUP NAME HOVER-EFFEKTE === */

a#titleurl:hover h3.space-open,
a#titleurl:hover h3.space-closed,
a#titleurl:hover h3.space-unknown {
  color: var(--status-color);
  border-color: var(--status-color);
}

a#titleurl:hover h3.space-open .fas,
a#titleurl:hover h3.space-closed .fas,
a#titleurl:hover h3.space-unknown .fas {
  color: var(--status-color);
}

.popup-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.popup-weekly {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 6px;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 8px;
  width: fit-content;
  justify-self: start;
}

.popup-workshops {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  padding-top: 2px;
  padding-left: 6px;
  font-size: 1em;
  color: color-mix(in srgb, var(--text-color) 70%, transparent);
  width: fit-content;
  justify-self: start;
}

.leaflet-container .popup-workshops::after {
  white-space: pre-line !important;
  width: 105px !important;
}

.country .fi {
  margin-right: 4px;
}


/* ===================================
   ADDRESS BLOCK + NAVIGATION ICON (Popup)
   =================================== */

.popup-street-line {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255,255,255,0.66);
  background-image: linear-gradient(to bottom, transparent 50%, var(--status-color, var(--space-hover)) 50%);
  background-size: 100% 400%;
  background-position: 0 0;
  border-radius: 9px;
  padding: 6px 10px;
  margin: 6px 0;
  cursor: pointer;
  transition: background-position 160ms ease-in-out, color 160ms ease-in-out;
  font-size: 1.05em;
  line-height: 1.5;
}

.popup-address-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: black;
}

.popup-street-line:hover .popup-address-lines {
  color: white;
}

.popup-street-line:hover {
  background-position: 0 100%;
  color: white !important;
}

.popup-street-line:hover .country {
  color: white;
}

/* Navigation Icon */
.leaflet-container .navigation-icon {
  text-decoration: none;
  color: var(--status-color, var(--space-hover)) !important;
  transition: color 0.15s;
}

.leaflet-container .navigation-icon:hover {
  color: white !important;
}

.navigation-icon[role~="tooltip"]::before,
.navigation-icon[role~="tooltip"]::after {
  pointer-events: none;
}

/* Accessibility: Focus States */
.navigation-icon:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 3px;
}

/* Click feedback */
.navigation-icon:active {
  transform: scale(0.9);
  transition: transform 0.1s ease-in-out;
}

/* Icon Selection Based on Service Data Attribute */
.navigation-icon[data-service="google"] i::before {
  content: "\f1a0";
  font-family: "Font Awesome 5 Brands";
}

.navigation-icon[data-service="apple"] i::before {
  content: "\f179";
  font-family: "Font Awesome 5 Brands";
}

.navigation-icon[data-service="osm"] i::before {
  content: "\f279";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

.navigation-icon[data-service="default"] i::before,
.navigation-icon:not([data-service]) i::before {
  content: "\f5eb";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

.navigation-icon i {
  display: inline-block;
  font-size: 1.5em;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.country {
  color: #666666;
  font-weight: normal;
  transition: color 0.15s;
}


/* ===================================
   CLUSTER STYLING
   =================================== */

.marker-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
}

.marker-cluster div {
  width: 100%;
  height: 100%;
  border-radius: 200px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 !important;
  padding: 0 !important;
}


.marker-cluster-small {
  background-color: rgba(50, 50, 50, 0.6) !important;
  border: 2px solid rgba(50, 50, 50, 0.8) !important;
}

.marker-cluster-medium {
  background-color: rgba(50, 50, 50, 0.7) !important;
  border: 2px solid rgba(50, 50, 50, 0.8) !important;
}

.marker-cluster-large {
  background-color: rgba(50, 50, 50, 0.8) !important;
  border: 2px solid rgba(50, 50, 50, 0.8) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: transparent !important;
  color: white;
  font-weight: bold;
}

.marker-cluster-small div {
  font-size: 1.4em;
}

.marker-cluster-medium div {
  font-size: 1.7em;
}

.marker-cluster-large div {
  font-size: 2.3em;
}


/* ===================================
   BOOKMARK SYSTEM
   =================================== */

/* Bookmark-Icon im Popup */
.popup-bookmark {
  cursor: pointer;
  color: var(--status-color, blue);
  font-size: 16px;
  vertical-align: middle;
  display: inline-block;
  width: 16px;
  text-align: center;
  transition: transform 0.15s ease;
  /* Popup-spezifische Resets */
  margin-right: 0 !important;
  position: static !important;
  bottom: auto !important;
}

/* Beide FontAwesome Varianten auf gleiche Breite zwingen */
.popup-bookmark::before {
  display: inline-block;
  width: 16px;
  text-align: center;
}

.popup-bookmark:hover {
  transform: scale(1.2);
}


/* ===================================
   BOOKMARK SYNC STYLES
   =================================== */

/* Dialog Overlay */
.sync-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: fadeIn 0.2s ease;
}

/* Dialog */
.sync-dialog {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  font-family: var(--font-family);
}

.sync-dialog h2 {
  margin: 0 0 25px 0;
  font-size: 1.5em;
  color: var(--text-color);
}

/* Sections */
.sync-section {
  margin-bottom: 25px;
}

.sync-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95em;
}

/* URL Container */
.sync-url-container {
  display: flex;
  gap: 8px;
}

.sync-url-input {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--dropdown-border);
  border-radius: 8px;
  font-size: 0.85em;
  font-family: monospace;
  background: var(--dropdown-bg);
  color: var(--text-color);
}

.sync-url-input:focus {
  outline: none;
  border-color: var(--space-hover);
}

/* Buttons */
.sync-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sync-btn-primary {
  background: var(--space-hover);
  color: white;
}

.sync-btn-primary:hover {
  background: #0099cc;
  transform: translateY(-1px);
}

.sync-btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.sync-btn-secondary:hover {
  background: #d0d0d0;
}

.sync-btn-copy {
  background: var(--space-hover);
  color: white;
  padding: 12px 16px;
}

.sync-btn-copy:hover {
  background: #0099cc;
}

/* QR Code Container */
.sync-qr-container {
  font-family: var(--font-family) !important;
  display: flex;
  justify-content: center;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 8px;
}

/* Actions */
.sync-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 25px;
}

/* Sync Menu (Dropdown) */
.sync-menu {
  position: fixed;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px 2px var(--shadow-color);
  min-width: 200px;
  z-index: 10000;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

.sync-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--dropdown-border);
  transition: background 0.15s ease;
  font-size: 0.9em;
  color: var(--text-color);
}

.sync-menu-item:last-child {
  border-bottom: none;
}

.sync-menu-item:not(.sync-status):hover {
  background: var(--dropdown-alt-bg);
}

.sync-menu-item i {
  width: 16px;
  text-align: center;
  font-size: 1em;
}

.sync-menu-item.sync-status {
  background: var(--dropdown-alt-bg);
  cursor: default;
  font-weight: 600;
  color: var(--space-open);
}

.sync-menu-item.sync-danger {
  color: var(--space-closed);
}

.sync-menu-item.sync-danger:hover {
  background: rgba(221, 68, 68, 0.1);
}

/* Sync Pill */
.sync-pill {
  background: var(--space-hover) !important;
  color: white !important;
  margin-left: 8px;
  padding: 8px 12px !important;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sync-pill:hover {
  background: var(--space-hover) !important;
  transform: translateY(-1px);
}

.sync-pill i {
  margin: 0;
}

/* Settings Hash Toast (Microtip-Optik: gelb-schwarz) */
.settings-hash-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--microtip-background-color);
  color: var(--microtip-color);
  border: 3px solid var(--microtip-border-color);
  font-family: var(--font-family);
  font-size: var(--microtip-font-size, 12px);
  font-weight: var(--microtip-font-weight, 600);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s ease-in;
  z-index: 10000;
}

.settings-hash-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.settings-hash-toast.zoom-out {
  opacity: 0;
  transform: translate(-50%, -50%) scale(2);
}

/* Settings Confirm Tooltip (Microtip-Stil) */
.settings-confirm-tooltip {
  position: fixed;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 72px;
  padding: 0 14px 8px;
  border-radius: 8px;
  background: var(--microtip-background-color);
  color: var(--microtip-color);
  border: 3px solid var(--microtip-border-color);
  font-family: var(--font-family);
  font-size: var(--microtip-font-size, 12px);
  font-weight: var(--microtip-font-weight, 600);
  white-space: pre-line;
  text-align: center;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.settings-confirm-tooltip span {
  flex: 1;
  display: flex;
  align-items: center;
}

.settings-confirm-tooltip.show {
  opacity: 1;
}

.settings-confirm-tooltip::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top: 8px solid var(--microtip-border-color);
  border-bottom: 0;
}

.settings-confirm-yes {
  display: inline-block;
  margin-top: 0;
  padding: 2px 16px;
  border: 2px solid var(--microtip-color);
  border-radius: 4px;
  background: transparent;
  color: var(--microtip-color);
  font-family: var(--font-family);
  font-size: var(--microtip-font-size, 12px);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.settings-confirm-yes:hover {
  background: var(--microtip-color);
  color: var(--microtip-background-color);
}

/* Notifications */
.sync-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  z-index: 100001;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.sync-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.sync-notification-success {
  background: var(--space-open);
  color: white;
}

.sync-notification-error {
  background: var(--space-closed);
  color: white;
}

.sync-notification-warning {
  background: var(--space-unknown);
  color: white;
}

.sync-notification-info {
  background: var(--space-hover);
  color: white;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===================================
   ZOOM INDICATOR
   =================================== */

#zoom-indicator {
  position: fixed;
  width: 26px;
  height: 26px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  pointer-events: none;
  z-index: 9999;
  transform: translate(50%, 50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-family: monospace;
  user-select: none;
}


/* =================================================================
   CONSENT OVERLAY – Sonne, Erde & Mond (DSGVO/GDPR)
   ================================================================= */

/* Disable nearby popover during consent */
body.consent-active .nearby-popover,
body.consent-active #map { pointer-events: none; }

.consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.6s ease-out;
}

.consent-overlay.visible {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

/* Container für Sonne + Mond */
.consent-container {
  position: relative;
  width: 360px;
  height: 360px;
}

/* ── Planet-Animationen: Skalieren + Bogen (GPU-beschleunigt) ── */
/* Enter: von rechts oben herein */
@keyframes earth-enter {
  0%   { transform: scale3d(0.06,0.06,1) translate3d(350px, -100px, 0); }
  100% { transform: scale3d(1,1,1) translate3d(0, 0, 0); }
}

@keyframes sun-enter {
  0%   { transform: scale3d(0.06,0.06,1) translate3d(200px, -80px, 0); }
  100% { transform: scale3d(1,1,1) translate3d(0, 0, 0); }
}

@keyframes moon-enter {
  0%   { transform: rotate(30deg) scale3d(0.06,0.06,1) translate3d(100px, -60px, 0); }
  100% { transform: rotate(30deg) scale3d(1,1,1) translate3d(0, 0, 0); }
}

/* Exit: nach rechts hinaus */
@keyframes earth-exit {
  0%   { transform: scale3d(1,1,1) translate3d(0, 0, 0); }
  100% { transform: scale3d(0.06,0.06,1) translate3d(350px, 0, 0); }
}

@keyframes sun-exit {
  0%   { transform: scale3d(1,1,1) translate3d(0, 0, 0); }
  100% { transform: scale3d(0.06,0.06,1) translate3d(250px, 0, 0); }
}

@keyframes moon-exit {
  0%   { transform: rotate(30deg) scale3d(1,1,1) translate3d(0, 0, 0); }
  100% { transform: rotate(30deg) scale3d(0.06,0.06,1) translate3d(150px, 0, 0); }
}

/* ── ERDE: Details (hinter Sonne) ── */
.consent-earth {
  position: absolute;
  width: 400px;
  height: 400px;
  box-sizing: border-box;
  border-radius: 50%;
  top: -80px;
  left: -240px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 55px 190px 55px 55px;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(100, 180, 100, 0.5) 0%, transparent 22%),
    radial-gradient(ellipse at 60% 40%, rgba(80, 150, 80, 0.4) 0%, transparent 28%),
    radial-gradient(ellipse at 40% 70%, rgba(90, 160, 90, 0.35) 0%, transparent 18%),
    radial-gradient(ellipse at 75% 65%, rgba(70, 130, 70, 0.3) 0%, transparent 20%),
    radial-gradient(circle at 15% 50%, rgba(60, 120, 60, 0.25) 0%, transparent 15%),
    radial-gradient(ellipse at 50% 15%, rgba(220, 230, 240, 0.4) 0%, transparent 18%),
    radial-gradient(circle at 45% 50%, #2b7ab5, #1a6da0 50%, #0d5a8a);
  box-shadow:
    inset -50px -5px 70px rgba(255, 210, 60, 0.25),
    0 0 50px rgba(30, 100, 180, 0.45),
    0 0 100px rgba(30, 100, 180, 0.2),
    0 0 160px rgba(30, 100, 180, 0.08);
  will-change: transform;
  transform: scale3d(0.06,0.06,1) translate3d(350px, -100px, 0);
}

.consent-overlay.visible .consent-earth {
  animation: earth-enter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

/* Noise texture on Earth */
.consent-earth::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
}

.consent-earth-text {
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-family);
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  text-align: left;
}

.consent-earth-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.25em;
}

.consent-earth-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.consent-earth-text li {
  padding: 2px 0;
}

.consent-earth-text li::before {
  content: '·  ';
  opacity: 0.7;
}

.consent-earth-note {
  display: block;
  margin-top: 8px;
  font-size: 0.85em;
  font-style: italic;
  opacity: 0.75;
}

/* ── SONNE: Frage ── */
.consent-sun {
  position: relative;
  z-index: 2;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 240, 150, 0.5) 0%, transparent 15%),
    radial-gradient(circle at 70% 60%, rgba(255, 200, 50, 0.4) 0%, transparent 20%),
    radial-gradient(circle at 55% 30%, rgba(255, 220, 80, 0.45) 0%, transparent 10%),
    radial-gradient(circle at 35% 75%, rgba(230, 150, 0, 0.3) 0%, transparent 18%),
    radial-gradient(circle at 80% 40%, rgba(255, 210, 60, 0.35) 0%, transparent 12%),
    radial-gradient(circle at 40% 40%, #ffe082, #ffb300 60%, #f57f17);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px;
  box-shadow:
    0 0 80px rgba(255, 183, 0, 0.6),
    0 0 150px rgba(255, 183, 0, 0.3),
    0 0 220px rgba(255, 160, 0, 0.12);
  will-change: transform;
  transform: scale3d(0.06,0.06,1) translate3d(200px, -80px, 0);
}

.consent-overlay.visible .consent-sun {
  animation: sun-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Noise texture on Sun */
.consent-sun::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Moon shadow cast on the Sun (bottom-right) */
.consent-sun::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  bottom: -20px;
  right: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.08) 40%, transparent 70%);
  pointer-events: none;
}

.consent-sun-text {
  color: #4e2a00;
  font-family: var(--font-family);
  font-size: 0.88em;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

/* ── MOND: Buttons (Halbmond / Crescent) ── */
.consent-moon {
  position: absolute;
  z-index: 3;
  bottom: -120px;
  right: -85px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  will-change: transform;
  transform: rotate(30deg) scale3d(0.06,0.06,1) translate3d(100px, -60px, 0);
  box-shadow:
    0 0 40px rgba(100, 100, 120, 0.4),
    0 0 80px rgba(80, 80, 100, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.4);
}

.consent-overlay.visible .consent-moon {
  animation: moon-enter 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

/* Noise texture on Moon */
.consent-moon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)' opacity='0.1'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 5;
}

/* Lichtseite füllt den ganzen Mond */
.consent-moon-accept {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 33%;
  cursor: pointer;
  z-index: 1;
  transition: filter 0.2s;
  background:
    radial-gradient(circle at 55% 35%, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.02) 35%, transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.01) 30%, transparent 40%),
    radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 20%),
    linear-gradient(160deg, #d8d8dd 0%, #c5c5cb 50%, #b5b5be 100%);
}

.consent-moon-accept:hover {
  filter: brightness(1.22) contrast(1.12);
}

.consent-moon-accept .consent-moon-label {
  color: #2a2a30;
}

/* Nachtseite: versetzter Kreis → sanfter Halbmond-Bogen */
.consent-moon-decline {
  position: absolute;
  width: 216px;
  height: 216px;
  border-radius: 50%;
  left: -160px;
  top: -33px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 18px;
  cursor: pointer;
  z-index: 2;
  transition: filter 0.15s;
  background:
    radial-gradient(circle at 60% 40%, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.05) 40%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.03) 35%, transparent 45%),
    radial-gradient(circle at 70% 15%, rgba(255, 255, 255, 0.05) 0%, transparent 25%),
    radial-gradient(circle at 50% 70%, rgba(0, 0, 0, 0.1) 0%, transparent 18%),
    linear-gradient(160deg, #58585f 0%, #44444b 50%, #3a3a42 100%);
}

.consent-moon-decline:hover {
  filter: brightness(1.5) contrast(1.2);
}

.consent-moon-decline .consent-moon-label {
  color: rgba(255, 255, 255, 0.9);
}

/* Labels im Mond: gegen Rotation zurückdrehen → waagerecht */
.consent-moon-label {
  transform: rotate(-30deg);
  font-family: var(--font-family);
  font-size: 1.08em;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
