/* =============================================================================
   CashtoCode Filialfinder (POS-Finder) — KEYLESS Variante.
   Leaflet + OpenStreetMap im CashtoCode-Look. Marken-Hex auf Design-Tokens
   umgestellt; UI-Icons und Karten-Pin sind Inline-SVG (kein Asset-Laden
   von cashtocode.com, kein Google-Maps-Marker-PNG).
   ============================================================================= */
.ctc-pos.google-map { position: relative; margin: var(--space-6) 0 var(--space-5); }
.ctc-pos .pos-finder { position: relative; }
.ctc-pos .pos-finder-map { position: relative; z-index: 5; }
.ctc-pos .search-box-container {
  background: var(--color-primary); color: #fff; border-radius: 14px;
  padding: 18px 22px; display: flex; align-items: center;
  flex-wrap: wrap; gap: 12px; box-shadow: 0 8px 24px rgba(34, 58, 177, .15);
}
.ctc-pos .search-box-container .loc-icon { width: 22px; height: 22px; flex: 0 0 auto; color: #fff; }
.ctc-pos .pos-finder-label {
  color: #fff; margin: 0; font-size: 1.1rem; font-weight: 700;
  flex: 1 1 auto; white-space: nowrap; padding-right: .5rem;
}
.ctc-pos .pos-finder-input {
  position: relative; flex: 1 1 380px; min-width: 260px;
  background: #fff; border-radius: 999px; display: flex; align-items: center;
  padding: 4px 8px 4px 18px;
}
.ctc-pos #search-box {
  flex: 1 1 auto; border: 0; outline: none; background: transparent;
  height: 38px; font-size: .95rem; color: #1a1a2e; min-width: 0;
}
.ctc-pos .target {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 8px; flex: 0 0 auto;
  border: 0; background: transparent; cursor: pointer;
  color: var(--color-primary); opacity: .8; transition: opacity .15s;
  border-radius: 999px;
}
.ctc-pos .target:hover { opacity: 1; }
.ctc-pos .target:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.ctc-pos .target svg { width: 20px; height: 20px; }
.ctc-pos .blurred-map {
  position: relative; min-height: 320px; margin-top: 14px;
  border-radius: 12px; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, #e9efff 0%, #d6e6ff 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}
.ctc-pos .blurred-map p {
  color: var(--color-primary); font-size: 1.4rem; font-weight: 700;
  margin: 0; padding: 0 1rem; text-align: center; font-family: var(--font-heading);
}
.ctc-pos #googleMap {
  width: 100%; height: 0; transition: height .3s; border-radius: 12px; overflow: hidden;
  margin-top: 14px;
}
/* Leaflet fuellt den #googleMap-Container vollstaendig aus. */
.ctc-pos #googleMap .leaflet-container { height: 100%; width: 100%; font: inherit; background: #e9efff; }
/* Karte unter der Suchbox halten (search-box-container hat z-index ueber leaflet). */
.ctc-pos #googleMap .leaflet-pane,
.ctc-pos #googleMap .leaflet-top,
.ctc-pos #googleMap .leaflet-bottom { z-index: 1; }
.ctc-pos #googleMap .leaflet-control { z-index: 2; }
/* Inline-SVG-Pin: transparenter DivIcon-Wrapper, kein Kasten. */
.ctc-pos #googleMap .ctc-pos-pin { background: transparent; border: 0; }
.ctc-pos #googleMap .ctc-pos-pin svg { display: block; }
/* OSM-Attribution dezent an die Marke anpassen. */
.ctc-pos #googleMap .leaflet-control-attribution {
  font-size: .68rem; background: rgba(255, 255, 255, .8);
}
.ctc-pos #googleMap .leaflet-control-attribution a { color: var(--color-primary); }
.ctc-pos-list { margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ctc-pos-list .pos-item {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.ctc-pos-list .pos-logo {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 8px;
  background-color: #f4f6fb; background-size: contain; background-repeat: no-repeat; background-position: center;
}
.ctc-pos-list .pos-info { flex: 1 1 auto; min-width: 0; font-size: .92rem; line-height: 1.45; color: #2e3246; }
.ctc-pos-list .pos-info strong { color: var(--color-primary); font-size: 1rem; }
.ctc-pos-list .pos-distance { font-size: .78rem; color: #6b7280; margin-bottom: 2px; }
.ctc-pos-list .pos-icons { flex: 0 0 auto; }
.ctc-pos-list .pos-icon-highlight { width: 28px; height: 28px; border-radius: 50%; background: var(--color-accent); }
.ctc-pos #googleMap .leaflet-popup-content-wrapper { border-radius: 12px; }
.ctc-pos #googleMap .leaflet-popup-content { margin: 12px 14px; }
.ctc-pos .map-info-window { display: flex; gap: 10px; align-items: center; max-width: 280px; }
.ctc-pos .map-info-window img { width: 48px; height: auto; border-radius: 6px; }
.ctc-pos .map-info-window .title { font-weight: 700; color: var(--color-primary); display: block; }
.ctc-pos .map-info-window .address, .ctc-pos .map-info-window .place { display: block; font-size: .85rem; color: #2e3246; }
@media (max-width: 768px) {
  .ctc-pos .search-box-container { flex-direction: column; align-items: stretch; }
  .ctc-pos .pos-finder-label { white-space: normal; padding: 0; }
  .ctc-pos .pos-finder-input { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ctc-pos #googleMap { transition: none; }
}
