/* ============================================================
   Servicepartner-Karte — Design Tegos_26
   Figma: el-container:mapmodule (Node 15308:12036)
     Suchleiste  1248x80, weisse Box, 2 px Rand, Padding 20,
                 Label und Feld nebeneinander (gap 12)
     Karte       Liste 387 + Scrollbar 16 + Karte 807, gap 20, Hoehe 479
   ============================================================ */

.tg-pmap {
  font-family: 'Geologica', sans-serif;
  color: #2E2E2E;
}

/* ---------- Suchleiste ---------- */
.tg-pmap__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 45px;
  background: #FFFFFF;
  border: 2px solid #FFFFFF;
}

/* Label steht im Design NEBEN dem Feld, nicht darueber. */
.tg-pmap__field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 1 1 240px;
  min-width: 0;
}

.tg-pmap__field label {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 100;
  line-height: 24px;
  white-space: nowrap;
}

.tg-pmap__field input,
.tg-pmap__field select {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #E3E3E3;
  border-radius: 0;
  background: #FFFFFF;
  font-family: 'Geologica', sans-serif;
  font-weight: 100;
  font-size: 16px;
  color: #2E2E2E;
}

.tg-pmap__field input:focus-visible,
.tg-pmap__field select:focus-visible {
  outline: 2px solid #475DA9;
  outline-offset: 1px;
}

.tg-pmap__filter {
  flex: 0 0 auto;
  height: 36px;
  padding: 6px 12px;
  border: 1px solid #2E2E2E;
  border-radius: 4px;
  background: #2E2E2E;
  color: #FFFFFF;
  font-family: 'Geologica', sans-serif;
  font-weight: 100;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
}

.tg-pmap__filter:hover { background: #475DA9; border-color: #475DA9; }

.tg-pmap__count {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 100;
}

/* ---------- Liste und Karte ---------- */
.tg-pmap__grid {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.tg-pmap__list {
  flex: 0 0 387px;
  max-width: 387px;
  height: 479px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  /* Platz fuer die Scrollbar-Spalte aus dem Figma (16 px). */
  padding-right: 16px;
}

/* Schlanke Scrollleiste wie im Design */
.tg-pmap__list::-webkit-scrollbar { width: 6px; }
.tg-pmap__list::-webkit-scrollbar-track { background: rgba(46, 46, 46, 0.08); }
.tg-pmap__list::-webkit-scrollbar-thumb { background: #2E2E2E; }
.tg-pmap__list { scrollbar-width: thin; scrollbar-color: #2E2E2E rgba(46, 46, 46, 0.08); }

.tg-pmap__item {
  cursor: pointer;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(46, 46, 46, 0.2);
}

.tg-pmap__item:last-child { border-bottom: 0; }

.tg-pmap__name {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.tg-pmap__addr {
  margin: 4px 0 10px;
  font-size: 16px;
  font-weight: 100;
  line-height: 24px;
}

.tg-pmap__links { display: flex; gap: 24px; }

.tg-pmap__links a {
  font-size: 16px;
  font-weight: 100;
  line-height: 24px;
  color: #2E2E2E;
  text-decoration: underline;
}

.tg-pmap__links a:hover { color: #475DA9; }

.tg-pmap__map {
  flex: 1 1 auto;
  min-width: 0;
  height: 479px;
}

/* Graustufen-Kartenoptik wie im Figma */
.tg-pmap__map .leaflet-tile-pane { filter: grayscale(0.95) contrast(0.95); }

/* ---------- Tablet und Mobile ---------- */
@media (max-width: 1024px) {
  .tg-pmap__bar { gap: 16px; }
  .tg-pmap__field { flex: 1 1 100%; }

  /* Karte zuerst, Liste darunter — auf schmalen Geraeten ist die Karte
     der schnellere Einstieg. */
  .tg-pmap__grid { flex-direction: column-reverse; }
  .tg-pmap__list {
    flex: 0 0 auto;
    max-width: 100%;
    height: auto;
    max-height: 340px;
  }
  .tg-pmap__map { height: 360px; }
}
