/* ADM Liefergebiete-Finder — Karte + PLZ/Ort-Suche
   Wird als Site-Asset gehostet und von den Embeds auf /liefergebiete und
   /garagenratgeber/berater-suche geladen. Alle Klassen mit Prefix .adm-lg. */

.adm-lg {
  --lg-blue: var(--adm-blue, #0169b4);
  --lg-navy: #153457;
  --lg-green: #43af2a;
  --lg-ink: #17191d;
  --lg-muted: #5a6b7d;
  --lg-border: #d8e0e8;
  --lg-stone: #f4f7fa;
  --lg-radius: var(--radius-sm, 3px);
  --lg-out: #dfe5ea;
  font-family: var(--_typography---font-body, Lato, Arial, sans-serif);
  color: var(--lg-ink);
  display: block;
}

.adm-lg *,
.adm-lg *::before,
.adm-lg *::after { box-sizing: border-box; }

.adm-lg__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 991px) {
  .adm-lg__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ---------- Suche ---------- */

.adm-lg__panel {
  background: #fff;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  padding: 28px;
}

@media (max-width: 479px) {
  .adm-lg__panel { padding: 20px; }
}

.adm-lg__label {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--lg-navy);
}

.adm-lg__hint { margin: 0 0 14px; font-size: .95rem; color: var(--lg-muted); }

.adm-lg__form { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }

.adm-lg__field { position: relative; flex: 1 1 220px; min-width: 0; }

.adm-lg__input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--lg-ink);
  background: #fff;
  padding: 14px 14px 14px 42px;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  appearance: none;
}

.adm-lg__input::placeholder { color: #6b7885; }

.adm-lg__input:focus,
.adm-lg__btn:focus,
.adm-lg__legend-btn:focus,
.adm-lg__reset:focus {
  outline: 2px solid var(--lg-blue);
  outline-offset: 2px;
}

.adm-lg__pin {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--lg-blue);
  pointer-events: none;
}

.adm-lg__btn {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--lg-blue);
  border: 1px solid var(--lg-blue);
  border-radius: var(--lg-radius);
  padding: 14px 22px;
  cursor: pointer;
  flex: 0 0 auto;
}

.adm-lg__btn:hover { background: #015590; border-color: #015590; }

/* Vorschlagsliste */
.adm-lg__sugg {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  box-shadow: 0 10px 24px rgba(21, 52, 87, .14);
  max-height: 260px;
  overflow-y: auto;
}

.adm-lg__sugg[hidden] { display: none; }

.adm-lg__sugg li {
  padding: 9px 14px;
  cursor: pointer;
  font-size: .98rem;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.adm-lg__sugg li[aria-selected="true"],
.adm-lg__sugg li:hover { background: var(--lg-stone); }

.adm-lg__sugg b { font-weight: 700; color: var(--lg-navy); min-width: 3.6em; }
.adm-lg__sugg span { color: var(--lg-muted); }

/* ---------- Ergebnis ---------- */

.adm-lg__result { margin-top: 22px; }
.adm-lg__result:empty { margin-top: 0; }

.adm-lg__status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--lg-radius);
  border-left: 4px solid var(--lg-green);
  background: #f1f8ee;
  margin-bottom: 18px;
}

.adm-lg__status--no { border-left-color: #b03a2e; background: #fdf1ef; }
.adm-lg__status--partial { border-left-color: var(--lg-blue); background: #eef5fb; }

.adm-lg__status-icon { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; }
.adm-lg__status--yes .adm-lg__status-icon { color: #2f7d1e; }
.adm-lg__status--no .adm-lg__status-icon { color: #b03a2e; }
.adm-lg__status--partial .adm-lg__status-icon { color: var(--lg-blue); }

.adm-lg__status-title { font-weight: 700; margin: 0 0 2px; color: var(--lg-navy); }
.adm-lg__status-text { margin: 0; font-size: .97rem; color: #33424f; }

.adm-lg__card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  padding: 18px;
  background: var(--lg-stone);
}

@media (max-width: 479px) {
  .adm-lg__card { flex-direction: column; }
}

.adm-lg__portrait-wrap {
  position: relative;
  flex: 0 0 96px;
  display: block;
  line-height: 0;
}
/* KI-Hinweis wie im Hero (.c-hero-aicredit) */
.adm-lg__aicredit {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 1px 5px;
  border-radius: var(--lg-radius);
  background: rgba(14,37,64,.92);
  color: #fff;
  font-size: 10px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
}

.adm-lg__portrait {
  flex: 0 0 96px;
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: var(--lg-radius);
  background: #e6ecf2;
}

.adm-lg__card-body { min-width: 0; }
.adm-lg__eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lg-muted); margin: 0 0 2px; }
.adm-lg__name { font-size: 1.25rem; font-weight: 700; margin: 0 0 2px; color: var(--lg-navy); font-family: var(--_typography---font-display, inherit); }
.adm-lg__region { margin: 0 0 10px; color: #33424f; font-size: .97rem; }

.adm-lg__contact { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.adm-lg__contact a { color: var(--lg-blue); text-decoration: underline; word-break: break-word; }
.adm-lg__contact a:hover { color: #015590; }

.adm-lg__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.adm-lg__cta {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--lg-radius);
  background: var(--lg-blue);
  color: #fff;
  border: 1px solid var(--lg-blue);
}

.adm-lg__cta:hover { background: #015590; }

.adm-lg__cta--ghost { background: #fff; color: var(--lg-blue); }
.adm-lg__cta--ghost:hover { background: var(--lg-stone); color: #015590; }

.adm-lg__cta:focus-visible,
.adm-lg__sugg li:focus-visible { outline: 2px solid var(--lg-blue); outline-offset: 2px; }

/* ---------- Karte ---------- */

.adm-lg__mapwrap {
  position: relative;
  background: #fff;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius);
  padding: 16px;
}

.adm-lg__map { display: block; width: 100%; height: auto; max-height: 560px; margin: 0 auto; touch-action: pan-y; }
/* Das hidden-Attribut greift bei SVG-Elementen nicht über die UA-Stylesheets */
.adm-lg__map [hidden] { display: none; }
.adm-lg__map-dots path { transition: opacity .18s ease; }
.adm-lg__map.is-focused .adm-lg__map-dots path { opacity: .28; }
.adm-lg__map.is-focused .adm-lg__map-dots path.is-active { opacity: 1; }
.adm-lg__map-label { font-size: 15px; fill: #3c4b5a; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.adm-lg__map-dot { fill: #33424f; }
.adm-lg__marker-ring { fill: none; stroke: #17191d; stroke-width: 3; }
.adm-lg__marker-core { fill: #fff; stroke: #17191d; stroke-width: 3; }

.adm-lg__tip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: #17191d;
  color: #fff;
  font-size: .85rem;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: var(--lg-radius);
  transform: translate(-50%, -100%);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.adm-lg__tip[hidden] { display: none; }
.adm-lg__tip b { display: block; font-weight: 700; }

/* ---------- Legende ---------- */

.adm-lg__legend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; }

.adm-lg__legend-btn {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: .95rem;
  color: var(--lg-ink);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--lg-radius);
  padding: 7px 8px;
  cursor: pointer;
}

.adm-lg__legend-btn:hover { background: var(--lg-stone); }
.adm-lg__legend-btn[aria-pressed="true"] { border-color: var(--lg-border); background: var(--lg-stone); }
.adm-lg__swatch { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 2px; }
.adm-lg__legend-name { font-weight: 700; color: var(--lg-navy); }
.adm-lg__legend-reg { color: var(--lg-muted); }

.adm-lg__reset {
  font: inherit;
  font-size: .9rem;
  color: var(--lg-blue);
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer;
  text-decoration: underline;
  justify-self: start;
}

.adm-lg__note { margin: 12px 0 0; font-size: .85rem; color: var(--lg-muted); }

/* ---------- Kompaktmodus (Beratersuche) ---------- */

.adm-lg--compact .adm-lg__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.adm-lg--compact .adm-lg__map { max-height: 420px; }

@media (max-width: 991px) {
  .adm-lg--compact .adm-lg__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .adm-lg__map-dots path { transition: none; }
}
