/*
 * Globale Vereinskarten-Komponente v1.1
 * Gilt identisch für vereine.html, heimat-und-kulturvereine.html und verein.html.
 * Die Karte zeigt genau drei abgeleitete Beziehungskategorien:
 * Mitglied, mittelbares Mitglied und Netzwerkpartner.
 * Ungeklärte Mitgliedschaftsstatus werden nicht als Marker gerendert.
 */
.lhb-verein-marker-wrap {
  background: transparent !important;
  border: 0 !important;
}
.lhb-verein-marker {
  position: relative;
  width: 32px;
  height: 42px;
  overflow: visible;
}
.lhb-verein-marker__svg {
  display: block;
  width: 32px;
  height: 42px;
  overflow: visible;
  filter: drop-shadow(1px 2px 0 rgba(0,0,0,.22));
}
.lhb-verein-marker__pin {
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}
.lhb-verein-marker__core {
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.lhb-verein-marker--direkt .lhb-verein-marker__pin {
  fill: var(--lhb-color-accent);
  stroke: var(--lhb-color-accent-dark-2);
}
.lhb-verein-marker--direkt .lhb-verein-marker__core {
  fill: var(--lhb-color-paper);
  stroke: var(--lhb-color-paper);
}
.lhb-verein-marker--mittelbar .lhb-verein-marker__pin {
  fill: var(--lhb-color-paper);
  stroke: var(--lhb-color-accent);
}
.lhb-verein-marker--mittelbar .lhb-verein-marker__core {
  fill: var(--lhb-color-accent);
  stroke: var(--lhb-color-accent);
}
.lhb-verein-marker--netzwerkpartner .lhb-verein-marker__pin {
  fill: var(--lhb-color-accent-light);
  stroke: var(--lhb-color-accent-dark-2);
}
.lhb-verein-marker--netzwerkpartner .lhb-verein-marker__core {
  fill: var(--lhb-color-paper);
  stroke: var(--lhb-color-paper);
}

/* Cluster: rein darstellerisch; keine eigene Mitgliedschaftskategorie. */
.lhb-verein-cluster {
  background: transparent !important;
  border: 0 !important;
}
.lhb-verein-cluster__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--lhb-color-paper);
  border-radius: 50%;
  background: var(--lhb-color-accent);
  color: var(--lhb-color-paper);
  box-shadow: 0 0 0 2px var(--lhb-color-accent-dark-2), 2px 3px 0 rgba(0,0,0,.2);
  font: 800 12px/1 var(--lhb-font-display);
}

/* Kompakte globale Legende */
.lhb-vereinskarte-legende {
  min-width: 154px;
  padding: 8px 9px 7px;
  border: var(--lhb-line-width-medium, 2px) solid var(--lhb-line-color);
  border-radius: 0;
  background: rgba(255,255,255,.95);
  box-shadow: 2px 2px 0 rgba(0,0,0,.14);
  color: var(--lhb-color-ink);
  font-family: var(--lhb-font-body);
}
.lhb-vereinskarte-legende__title {
  margin-bottom: 5px;
  font: 800 var(--lhb-type-kicker-size)/1.2 var(--lhb-font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.lhb-vereinskarte-legende__row {
  display: grid;
  grid-template-columns: 21px 1fr;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  font-size: 10px;
  line-height: 1.15;
}
.lhb-vereinskarte-legende__row + .lhb-vereinskarte-legende__row { margin-top: 1px; }
.lhb-vereinskarte-legende__marker {
  display: block;
  position: relative;
  width: 18px;
  height: 21px;
}
.lhb-vereinskarte-legende__marker .lhb-verein-marker {
  position: absolute;
  left: -5px;
  top: -9px;
  transform: scale(.5);
  transform-origin: center center;
}

/* Popups: identisch auf Vollkarte und Vorschau. */
.lhb-vereinskarte .leaflet-popup-content-wrapper,
#lhb-karte-intro .leaflet-popup-content-wrapper,
#lhb-karte-erweitert .leaflet-popup-content-wrapper,
#vereins-preview-map .leaflet-popup-content-wrapper {
  overflow: hidden !important;
  padding: 0 !important;
  border: var(--lhb-line-width-medium, 2px) solid var(--lhb-line-color) !important;
  border-radius: 0 !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,.15) !important;
}
.lhb-vereinskarte .leaflet-popup-content,
#lhb-karte-intro .leaflet-popup-content,
#lhb-karte-erweitert .leaflet-popup-content,
#vereins-preview-map .leaflet-popup-content {
  min-width: 210px;
  margin: 0 !important;
}
.lhb-vereinskarte .leaflet-popup-tip-container,
#lhb-karte-intro .leaflet-popup-tip-container,
#lhb-karte-erweitert .leaflet-popup-tip-container,
#vereins-preview-map .leaflet-popup-tip-container { display: none; }
.lhb-popup { padding: 14px 16px 11px; }
.lhb-popup-landkreis {
  margin-bottom: 5px;
  color: var(--lhb-color-accent);
  font: 800 var(--lhb-type-kicker-size)/1.25 var(--lhb-font-display);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.lhb-popup-name {
  margin-bottom: 5px;
  color: var(--lhb-color-ink);
  font: 800 13px/1.25 var(--lhb-font-display);
  text-transform: uppercase;
}
.lhb-popup-ort {
  color: var(--lhb-neutral-650);
  font: 400 11px/1.4 var(--lhb-font-body);
}
.lhb-popup-mitgliedschaft {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: var(--lhb-line-width-thin, 1px) solid var(--lhb-neutral-200);
  color: var(--lhb-color-ink);
  font: 500 10px/1.35 var(--lhb-font-body);
}
.lhb-popup-mitgliedschaft__symbol {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 2px;
  border: 1px solid var(--lhb-color-accent);
  border-radius: 50%;
  background: var(--lhb-color-accent);
}
.lhb-popup-mitgliedschaft--mittelbar .lhb-popup-mitgliedschaft__symbol { background: var(--lhb-color-paper); }
.lhb-popup-mitgliedschaft--netzwerkpartner .lhb-popup-mitgliedschaft__symbol { background: var(--lhb-color-accent-light); }
.lhb-popup-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 16px;
  border-top: var(--lhb-line-width-thin, 1px) solid var(--lhb-neutral-200);
  color: var(--lhb-color-accent);
  font: 700 10px/1.2 var(--lhb-font-display);
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.lhb-popup-link:hover { background: var(--lhb-color-accent); color: var(--lhb-color-paper); }

@media (max-width: 640px) {
  .lhb-vereinskarte-legende { min-width: 142px; padding: 7px 8px 6px; }
  .lhb-vereinskarte-legende__row { font-size:var(--lhb-type-kicker-size); }
}


/* v1.2 – responsive Kartenbedienung
   In schmalen Ansichten rücken Legende und Aktionsschalter an den oberen Kartenrand,
   damit möglichst viel Kartenfläche sichtbar bleibt. */
@media (max-width: 900px) {
  .lhb-vereinskarte-legende {
    min-width: 138px;
    padding: 7px 8px 6px;
    box-shadow: 2px 2px 0 rgba(0,0,0,.12);
  }
  .lhb-vereinskarte-legende__title {
    margin-bottom: 4px;
    font-size:var(--lhb-type-kicker-size);
    letter-spacing: .12em;
  }
  .lhb-vereinskarte-legende__row {
    grid-template-columns: 19px 1fr;
    gap: 4px;
    min-height: 19px;
    font-size:var(--lhb-type-kicker-size);
  }
}


/* v202 – bereinigte politische Kartenquelle und globale externe Legende. */
.leaflet-image-layer.lhb-political-map-overlay{
  clip-path:polygon(0 0,58.5% 0,58.5% 39%,100% 39%,100% 100%,0 100%);
}
.lhb-vereinskarte-legende-inline{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 18px;
  min-height:50px;
  padding:12px 18px;
  border-top:var(--linie) solid var(--lhb-line-color);
  background:var(--weiss);
  color:var(--text-meta,var(--lhb-neutral-650));
  font-family:var(--lhb-font-body);
  font-size:var(--lhb-type-kicker-size);
  line-height:1.2;
}
.lhb-vereinskarte-legende-inline__label{
  margin-right:2px;
  color:var(--schwarz);
  font-family:var(--lhb-font-display);
  font-size:var(--lhb-type-kicker-size);
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.lhb-vereinskarte-legende-inline__item{
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
.lhb-legendenpunkt{
  width:10px;
  height:10px;
  border:2px solid var(--lila);
  border-radius:50%;
  background:var(--lila);
  box-sizing:border-box;
}
.lhb-legendenpunkt--mittelbar{background:var(--weiss);}
.lhb-legendenpunkt--netzwerk{background:var(--flieder);}

@media(min-width:601px) and (max-width:980px){
  .lhb-vereinskarte-legende-inline{
    min-height:46px;
    padding:10px 16px;
  }
}
@media(max-width:600px){
  .lhb-vereinskarte-legende-inline{gap:7px 12px;padding:8px 10px;font-size:var(--lhb-type-kicker-size);}
}

.leaflet-image-layer.lhb-political-map-overlay.lhb-political-map-overlay--clean{clip-path:none;}
