/* ===== Grundlayout ===== */
.ogg-wrap {
  display: grid;
  gap: 1rem;
}

/* ===== Karte + Liste nebeneinander (neues Klassenschema) ===== */
.ogg-wrap.ogg-layout-karte_liste {
  grid-template-columns: 1.4fr 1fr;
  grid-template-areas: "map list";
}
.ogg-wrap.ogg-layout-karte_liste .ogg-map {
  grid-area: map;
}
.ogg-wrap.ogg-layout-karte_liste .ogg-list {
  grid-area: list;
}

/* Reihenfolge umdrehen (neues Klassenschema) */
.ogg-wrap.ogg-layout-karte_liste.ogg-order-rechts_links {
  grid-template-columns: 1fr 1.4fr;
  grid-template-areas: "list map";
}

/* ===== Abwärtskompatibel: altes Klassenschema ===== */
.ogg-wrap.karte_liste.links_rechts {
  grid-template-columns: 1.4fr 1fr;
  grid-template-areas: "map list";
}
.ogg-wrap.karte_liste.rechts_links {
  grid-template-columns: 1fr 1.4fr;
  grid-template-areas: "list map";
}
.ogg-wrap.karte_liste .ogg-map {
  grid-area: map;
}
.ogg-wrap.karte_liste .ogg-list {
  grid-area: list;
}

/* ===== Responsive: untereinander ===== */
@media (max-width: 900px) {
  .ogg-wrap.ogg-layout-karte_liste,
  .ogg-wrap.karte_liste.links_rechts,
  .ogg-wrap.karte_liste.rechts_links {
    grid-template-columns: 1fr;
    grid-template-areas:
      "map"
      "list";
  }
}

/* ===== Map Canvas ===== */
.ogg-map-canvas {
  width: 100%;
  height: 420px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f8f8f8;
}

/* ===== Filterzeile ===== */
.ogg-filter {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.ogg-filter input {
  padding: 0.4rem 0.6rem;
}

/* ===== Toggle (button_hover) ===== */
.ogg-hover-btn {
  padding: 0.5rem 0.8rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.ogg-hover-btn:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}
.ogg-hover-panel[hidden] {
  display: none !important;
}
.ogg-hover-panel {
  margin-top: 0.5rem;
}

/* Map bekommt unten Luft, wenn Liste per Button folgt */
.ogg-wrap.ogg-layout-button_hover .ogg-map {
  margin-bottom: 1rem;
}

/* ===== Liste ===== */
.ogg-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ogg-items li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}
.ogg-items .ogg-item {
  cursor: pointer;
}
.ogg-items .ogg-item:hover {
  text-decoration: underline;
}
.ogg-items .ogg-item:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
  text-decoration: underline;
}
.ogg-items .ogg-item:active {
  opacity: 0.85;
}

/* „Mehr laden“ */
.ogg-list-more {
  margin-top: 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.ogg-list-more[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* ===== Modal ===== */
.ogg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}
.ogg-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 9999;
}
.ogg-modal__dialog {
  position: relative;
  width: min(720px, calc(100% - 2rem));
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  padding: 1rem 1.25rem;
}
.ogg-modal__close {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.ogg-modal__content p {
  margin: 0.25rem 0;
}
.ogg-modal__content em {
  color: #666;
}
.ogg-mini-map {
  width: 100%;
  height: 280px;
  border-radius: 6px;
  margin-top: 0.5rem;
  border: 1px solid #eee;
  background: #f5f5f5;
}
.ogg-modal__actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ogg-btn {
  padding: 0.5rem 0.8rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

/* =========================================================
   Cluster-Pins (MarkerCluster + Aggregations-Pins) – rote Variante
   ========================================================= */

/* Natives MarkerCluster-Icon entkernen */
.leaflet-container .leaflet-marker-icon.marker-cluster {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Unsere Cluster-Icons (greift für .ogg-pin--cluster und fallback .marker-cluster) */
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster,
.leaflet-container .leaflet-marker-icon.marker-cluster {
  position: relative;
  width: 44px;
  height: 44px;
}

/* Tropfenform: weißer Kreis mit rotem Rand */
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster::before,
.leaflet-container .leaflet-marker-icon.marker-cluster::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #a60606 inset; /* Randfarbe */
}

/* Spitze unten */
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster::after,
.leaflet-container .leaflet-marker-icon.marker-cluster::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #a60606; /* Rand-/Spitzenfarbe */
}

/* Der weiße Innenkreis mit der Zahl */
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster > span,
.leaflet-container .leaflet-marker-icon.marker-cluster > span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  font: 700 13px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: #222;
}

/* Größenabstufungen */
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster.sm > span,
.leaflet-container .leaflet-marker-icon.marker-cluster.sm > span {
  width: 22px;
  height: 22px;
  font-size: 12px;
}
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster.md > span,
.leaflet-container .leaflet-marker-icon.marker-cluster.md > span {
  width: 26px;
  height: 26px;
  font-size: 13px;
}
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster.lg > span,
.leaflet-container .leaflet-marker-icon.marker-cluster.lg > span {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster.xl > span,
.leaflet-container .leaflet-marker-icon.marker-cluster.xl > span {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

/* Aggregations-Pins optional etwas höher */
.leaflet-container .leaflet-marker-icon.marker-cluster,
.leaflet-container .leaflet-marker-icon.ogg-pin.ogg-pin--cluster {
  z-index: 450 !important;
}
