/* ---------- Location-Tab: Map + Suche ---------- */

.map-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.map-search-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .map-search-row { grid-template-columns: 1fr; }
}

/* Such-Input + Such-Button als kombiniertes Eingabefeld */
.map-search-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.map-search-wrap input {
  flex: 1;
  width: 100%;
  padding: 10px 44px 10px 14px;     /* rechts Platz für den Such-Button */
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft-2);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}

.map-search-wrap input:focus {
  outline: none;
  border: 3px solid #90bcff;
  padding: 8px 42px 8px 12px;       /* 2px innen ausgleichen wegen 3px-Border */
  background: #ffffff;
}

.map-search-wrap input.not-found {
  border-color: #ef4444 !important;
  background: #fef2f2;
  
}

#mapSearchBtn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-color, var(--border));
  border-radius: 6px;
  background: transparent;
  color: var(--theme-color, var(--text));
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}

#mapSearchBtn:hover {
  background: var(--theme-color, var(--text));
  color: #ffffff;
}

#mapSearchBtn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Lat / Lng – kleinere Inputs daneben */
#mapLat,
#mapLng {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft-2);
  font: inherit;
  font-size: 14px;
  width: 100%;
  transition: border-color .15s ease, background .15s ease;
}

#mapLat:focus,
#mapLng:focus {
  outline: none;
  border: 3px solid #90bcff;
  padding: 8px 12px;
  background: #ffffff;
}

/* Map-Container */
.map-container {
  width: 100%;
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e7eef5;       /* Fallback, falls Tiles noch laden */
}

/* Fehlertext, wenn Leaflet nicht geladen werden konnte */
.map-error {
  padding: 16px;
  text-align: center;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 8px;
  font-size: 13px;
}

/* Leaflet überschreibt manchmal die Schrift — wir geben unsere zurück */
.leaflet-container {
  font-family: inherit !important;
  font-size: 12px !important;
}