/* Grundlayout */
html, body, #map {
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Leaflet-Popup */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  background: #f8f9fa;
  color: #333;
}
.leaflet-popup-content {
  font-size: 14px;
  line-height: 1.45;
}

/* Formular im Popup (Community-Messung) */
#popup-form input,
#popup-form button,
#popup-form textarea {
  width: 100%;
  margin-top: 6px;
  box-sizing: border-box;
}
#popup-form input,
#popup-form textarea {
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
}
#popup-form textarea { resize: vertical; min-height: 80px; }
#popup-form input:focus,
#popup-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
#popup-form button {
  padding: 10px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: filter .15s ease;
}
#popup-form button:hover { filter: brightness(0.95); }

/* Legende / Controls */
.leaflet-control .legend {
  font-size: 16px;
}

/* POI-Icons */
.poi-icon { font-size: 22px; }
.protected-icon { font-size: 20px; }

/* Footer-Link-Box (falls genutzt) */
#legal-links {
  position: fixed;
  bottom: 10px;
  left: 10px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 10px;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  z-index: 1000;
}
#legal-links a {
  color: #000;
  text-decoration: none;
  margin: 0 5px;
}
#legal-links a:hover { text-decoration: underline; }

/* Leaflet Button-Stil (z. B. Standort-Button) */
.leaflet-bar a {
  background-color: #fff;
  color: #000;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 30px;
  z-index: 1000;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Wetter-Info-Box */
.weather-info {
  min-width: 160px;
  max-width: 240px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
  padding: 8px;
}

/* Menü unten links (Button + Panel) – falls du es aus HTML inline nach CSS ziehen willst */
#menu-button {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  cursor: pointer;
}
#menu-button img { width: 40px; height: 40px; }
#legal-menu {
  display: none;
  position: absolute;
  bottom: 70px;
  left: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  font-size: 14px;
}
#legal-menu a {
  display: block;
  margin: 5px 0;
  color: #333;
  text-decoration: none;
}
#legal-menu a:hover { text-decoration: underline; }

/* --- Neues Info-Widget unten rechts --- */
.info-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  cursor: pointer;
  z-index: 1100;
  border: none;
  transition: transform .08s ease, filter .15s ease;
}
.info-fab:hover { filter: brightness(1.05); }
.info-fab:active { transform: translateY(1px); }

.info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none; /* per JS togglen */
  z-index: 1099;
}

.info-card {
  position: fixed;
  right: 16px;
  bottom: 72px; /* über dem Button */
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.24);
  padding: 16px 16px 12px;
  display: none; /* per JS togglen */
  z-index: 1101;
  overflow: auto;
}
.info-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.info-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.info-close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  border-radius: 8px;
}
.info-close:hover { background: rgba(0,0,0,.06); }
.info-content {
  font-size: 14px;
  line-height: 1.45;
  color: #111;
}
.info-content p { margin: 0 0 10px; }

/* Mobile Feinschliff */
@media (max-width: 480px) {
  .leaflet-popup-content { font-size: 13px; }
  .weather-info { max-width: 200px; }
  #menu-button { bottom: 16px; left: 16px; }
  #legal-menu { bottom: 64px; left: 16px; }
  .info-fab { right: 12px; bottom: 12px; width: 44px; height: 44px; }
  .info-card { right: 12px; bottom: 64px; }
}

/* Ortssuche */
.leaflet-control.searchbox {
  background: #fff;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  width: min(320px, 80vw);
}
.searchbox input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
}
.searchbox input:focus { box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.search-results {
  margin-top: 6px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.search-results .item {
  padding: 8px 10px;
  cursor: pointer;
  line-height: 1.2;
}
.search-results .item:hover,
.search-results .item.active {
  background: #f3f4f6;
}
