/* ════════════════════════════════════════════════════════════
   REVOTION Händler-Map — Frontend Stylesheet
   ──────────────────────────────────────────────────────────── */

:root {
  --color-bg:        #f7fbff;
  --color-card:      #ffffff;
  --color-text:      #08121b;
  --color-muted:     rgba(8, 18, 27, 0.62);
  --color-line:      rgba(8, 18, 27, 0.08);
  --color-cyan:      #30b6c6;
  --color-cyan-soft: rgba(48, 182, 198, 0.12);
  --color-cyan-dark: #2497a4;
  --color-navy:      #232e3e;
  --color-coral:     #fd6262;
  --color-success:   #2cb673;

  --radius-sm:    11px;
  --radius:       20px;
  --radius-lg:    28px;
  --radius-blur:  25px;   /* exklusiv für Frosted-Glass-Flächen */
  --radius-pill:  24px;   /* Input-Felder + Anliegen-Box im Lead-Modal */

  /* Widget Directed Shadow NEU */
  --shadow-input:
    -4px -4px 30px 0 rgba(57, 95, 118, 0.10),
    77px 107px 37px 0 rgba(84, 141, 176, 0.00),
    49px 69px 34px 0 rgba(84, 141, 176, 0.01),
    28px 39px 28px 0 rgba(84, 141, 176, 0.05),
    12px 17px 21px 0 rgba(84, 141, 176, 0.09),
    3px 4px 12px 0 rgba(84, 141, 176, 0.05);

  --shadow-sm: 0 1px 2px rgba(7, 36, 65, 0.06),
               0 2px 6px rgba(7, 36, 65, 0.04);
  --shadow:    0 2px 4px rgba(7, 36, 65, 0.06),
               0 8px 24px rgba(7, 36, 65, 0.08);
  --shadow-lg: 0 4px 12px rgba(7, 36, 65, 0.10),
               0 24px 60px rgba(7, 36, 65, 0.16);

  --topbar-h: 96px;
  --sidebar-w: 360px;

  --font-body:    'DM Sans', 'Helvetica Neue', Helvetica, system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', 'Helvetica Neue', Helvetica, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Headings: Poppins Medium ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--color-cyan-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

button {
  font-family: var(--font-heading);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.005em;
}

/* ─────────────────────────────────────
   App-Frame (Floating Layout)
   Map liegt full-screen unten, Topbar + Sidebar
   schweben als Frosted-Glass-Panels darüber.
   ───────────────────────────────────── */
.app {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

/* ─────────────────────────────────────
   Topbar — transparenter Grid-Container
   3 Spalten: [Hamburger] [Filter zentriert] [Search]
   ───────────────────────────────────── */
.topbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  z-index: 1100;
  pointer-events: none;       /* nur die Pills sind interaktiv */
}
.topbar > * {
  pointer-events: auto;
}
.filter-group {
  justify-self: center;       /* Filter mittig in der mittleren Spalte */
}

/* Sidebar-Trigger (Hamburger in der Topbar) */
.sidebar-trigger {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: var(--radius-blur);
  background: rgba(232, 240, 244, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  backdrop-filter: blur(8px) saturate(125%);
}
.sidebar-trigger img {
  display: block;
  user-select: none;
  pointer-events: none;
}
.sidebar-trigger:hover {
  background: rgba(255, 255, 255, 0.7);
}
.sidebar-trigger:active {
  transform: scale(0.96);
}

/* Alter Reopen-Button entfällt komplett (alle Funktion in Sidebar-Trigger) */
.sidebar-reopen { display: none !important; }
.sidebar__toggle { display: none !important; }

/* ─── Filter-Buttons: eigene Floating-Pill ─── */
.filter-group {
  display: flex;
  flex-wrap: wrap;             /* 4 Buttons: bricht auf engen Screens auf 2 Zeilen um */
  gap: 4px;
  padding: 6px;
  background: rgba(232, 240, 244, 0.5);
  border-radius: var(--radius-blur);
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  backdrop-filter: blur(8px) saturate(125%);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--color-muted);
  transition: all 0.2s ease;
}
.filter-btn:hover { background: rgba(8, 18, 27, 0.04); color: var(--color-text); }
.filter-btn.is-active {
  background: var(--color-card);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.filter-btn__dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.filter-btn__dot--premium {
  background: var(--color-cyan);
  box-shadow:
    0 0 8px rgba(48, 182, 198, 0.75),
    0 0 16px rgba(48, 182, 198, 0.45);
}

.filter-btn__count {
  background: rgba(8, 18, 27, 0.06);
  color: rgba(8, 18, 27, 0.55);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}
/* Active-Filter behält gleichen Grau-Ton (kein Cyan-Akzent) */
.filter-btn.is-active .filter-btn__count {
  background: rgba(8, 18, 27, 0.08);
  color: rgba(8, 18, 27, 0.60);
}

/* ─── Suche: eigene Floating-Pill ─── */
.search {
  display: flex;
  background: rgba(232, 240, 244, 0.5);
  border: 1px solid transparent;
  border-radius: var(--radius-blur);
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  backdrop-filter: blur(8px) saturate(125%);
}
.search:focus-within {
  background: #ffffff;
  border-color: transparent;
  box-shadow: none;
}
.search input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 10px 14px;
  width: 200px;
  color: var(--color-text);
}
.search input::placeholder { color: var(--color-muted); }
.search button {
  background: transparent;
  border: none;
  padding: 0 12px;
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.search button:hover { color: var(--color-cyan-dark); }

/* Locate-Button (Geolocation) */
.locate-btn {
  position: relative;
}
.locate-btn::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(8, 18, 27, 0.12);
}
.locate-btn.is-loading svg {
  animation: locateSpinner 1s linear infinite;
}
@keyframes locateSpinner {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────
   Content: Map (Full-Screen) + Floating Sidebar
   ───────────────────────────────────── */
.content {
  position: absolute;
  inset: 0;
}

.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
}

/* Tile-Look — leicht mehr Kontrast, leicht weniger Sättigung */
.leaflet-tile {
  filter: contrast(1.1) saturate(0.8);
}

/* Sidebar — Floating Frosted Glass auf der LINKEN Seite */
.sidebar {
  position: absolute;
  top: 86px;         /* unter den schwebenden Filter-/Search-Pills */
  bottom: 12px;
  left: 12px;
  width: var(--sidebar-w);
  background: rgba(232, 240, 244, 0.5);
  border-radius: var(--radius-blur);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1050;            /* muss über Leaflet (~1000) liegen */
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  backdrop-filter: blur(8px) saturate(125%);
}

/* Drag-Handle — nur auf Mobile sichtbar (Bottom-Sheet-Pattern) */
.sidebar__handle {
  display: none;
}
.sidebar__header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(8, 18, 27, 0.06);
  font-size: 13px;
  color: var(--color-muted);
  flex: 0 0 auto;
  background: rgba(232, 240, 244, 0.7);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sidebar__header strong {
  color: var(--color-text);
  font-size: 15px;
  margin-right: 4px;
}
.sidebar__header > span {
  flex: 1 1 auto;
}

/* Toggle-Button im Sidebar-Header (Desktop ein-/ausklappen) */
.sidebar__toggle {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  flex: 0 0 auto;
}
.sidebar__toggle img {
  display: block;
  user-select: none;
  pointer-events: none;
}
.sidebar__toggle:hover {
  background: rgba(255, 255, 255, 0.55);
}
.sidebar__toggle:active {
  transform: scale(0.94);
}

/* Reopen-Button (sichtbar wenn Sidebar collapsed) */
.sidebar-reopen {
  position: absolute;
  top: 86px;
  left: 12px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: var(--radius);
  background: rgba(232, 240, 244, 0.5);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1040;
  transition: background 0.2s ease, transform 0.2s ease;
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  backdrop-filter: blur(8px) saturate(125%);
}
.sidebar-reopen img {
  display: block;
  user-select: none;
  pointer-events: none;
}
.sidebar-reopen.is-visible {
  display: flex;
}
.sidebar-reopen:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.04);
}
.sidebar-reopen:active {
  transform: scale(0.97);
}

/* Sidebar collapsed-Zustand */
.sidebar {
  transition:
    transform 0.32s cubic-bezier(0.32, 0.72, 0.24, 1),
    opacity 0.32s ease;
}
.sidebar.is-collapsed {
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
}

/* Popup-Pane über Sidebar bringen — auch über Topbar/Mobile-Sheet */
.leaflet-popup-pane,
.leaflet-pane.leaflet-popup-pane {
  z-index: 1200 !important;     /* über Sidebar (1050), Topbar (1100), Mobile-Sheet (1150) */
}
.leaflet-popup {
  z-index: 1200 !important;
}

.dealer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}
.dealer-item {
  padding: 14px 18px;
  position: relative;
  cursor: pointer;
  transition:
    background 0.2s ease,
    margin 0.2s ease,
    border-radius 0.2s ease;
}
/* Separator als zentrierte, abgerundete Linie (statt full-width border) */
.dealer-item::after {
  content: '';
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 0;
  height: 1px;
  background: rgba(8, 18, 27, 0.03);
  border-radius: 999px;
  transition: opacity 0.2s ease;
}
.dealer-item:last-child::after {
  display: none;
}
/* Bei Hover/Selected: Separator unter der Card verstecken */
.dealer-item:hover::after,
.dealer-item.is-selected::after {
  opacity: 0;
}
.dealer-item:hover,
.dealer-item.is-selected {
  background: #ffffff;
  border-radius: 17px;
  margin: 4px 8px;
}
.dealer-item__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em;
}
.dealer-item__name .badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-cyan);
  color: white;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.dealer-item__addr {
  font-size: 13px;
  color: var(--color-muted);
  margin: 0;
}
.dealer-item__rating {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
}
.dealer-item__rating .stars { color: #f5a623; font-weight: 600; }

/* ─────────────────────────────────────
   Map Markers
   ───────────────────────────────────── */
.marker-icon {
  background: none !important;
  border: none !important;
}
.marker-icon__img {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: 43px 71px;  /* Pin-Tip-Anchor (skaliert mit Pin-Größe) */
  transition: transform 0.35s ease;
}

/* Spring-Bounce beim Hover (dezenter) */
@keyframes pinBounce {
  0%   { transform: translateY(0)    scale(1);     }
  35%  { transform: translateY(-11px) scale(1.11); }
  55%  { transform: translateY(-4px)  scale(1.04); }
  75%  { transform: translateY(-8px)  scale(1.08); }
  100% { transform: translateY(-6px)  scale(1.07); }
}

.marker-icon:hover .marker-icon__img,
.marker-icon.is-selected .marker-icon__img {
  animation: pinBounce 0.55s cubic-bezier(0.34, 1.4, 0.5, 1) forwards;
  z-index: 10;
}

/* ─────────────────────────────────────
   Leaflet Popup Override — Frosted Glass (light)
   #E8F0F4 @ 50% + Blur
   ───────────────────────────────────── */
.leaflet-popup-content-wrapper {
  background: rgba(232, 240, 244, 0.5) !important;
  color: var(--color-text);
  border: none !important;
  border-radius: var(--radius-blur) !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  backdrop-filter: blur(8px) saturate(125%);
}
.leaflet-popup-content {
  margin: 0 !important;
  width: 300px !important;
  font-family: inherit !important;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}
.leaflet-popup-tip {
  background: rgba(232, 240, 244, 0.7) !important;
  box-shadow: none !important;
  border: none !important;
}

/* Close-Button — Custom X-Icon */
.leaflet-popup-close-button {
  /* Default "×" Zeichen verstecken */
  font-size: 0 !important;
  color: transparent !important;
  text-decoration: none !important;
  /* Position + Hit-Area */
  top: 8px !important;
  right: 8px !important;
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  /* Icon als Background */
  background: url('X_Icon_Cancel_0.svg') center / 14px 14px no-repeat !important;
  border-radius: 50%;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.leaflet-popup-close-button:hover {
  background-color: rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 2px 8px rgba(7, 36, 65, 0.18);
  transform: scale(1.05);
}
.leaflet-popup-close-button:active {
  transform: scale(0.96);
}

.popup {
  padding: 16px;
  color: var(--color-text);
}
.popup__name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--color-text);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  letter-spacing: -0.01em;
}
.popup__name .badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--color-cyan);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(48, 182, 198, 0.45);
}
.popup__addr {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--color-muted);
}
.popup__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
}
.popup__rating .stars {
  color: #f5a623;
  font-weight: 600;
}
.popup__rating .count {
  color: var(--color-muted);
}
.popup__meta {
  font-size: 12px;
  color: var(--color-muted);
  margin: 0 0 12px;
  display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.popup__meta a { color: var(--color-cyan-dark); text-decoration: none; }
.popup__meta a:hover { text-decoration: underline; text-underline-offset: 2px; }

.popup__hours {
  margin: 8px 0 12px;
  font-size: 12px;
  color: var(--color-muted);
  border-top: 1px solid rgba(8, 18, 27, 0.08);
  padding-top: 8px;
  display: none;
}
.popup__hours.is-open { display: block; }
.popup__hours-toggle {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  background: none;
  border: none;
  color: var(--color-cyan-dark);
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.popup__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.popup__actions .btn {
  flex: 1 1 auto;
  text-align: center;
}

/* Ghost-Button im Popup (light Context) */
.popup .btn--ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-text);
  border-color: rgba(8, 18, 27, 0.14);
}
.popup .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(8, 18, 27, 0.22);
}

/* ─────────────────────────────────────
   Buttons
   ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: #08121b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    2px 3px 8px 0 rgba(0, 0, 0, 0.30),
    4px 8px 20px 0 rgba(0, 0, 0, 0.22),
    8px 16px 40px 0 rgba(7, 36, 65, 0.18);
  transition: background 0.2s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.btn--primary:hover {
  background: #000000;
  box-shadow:
    3px 5px 12px 0 rgba(0, 0, 0, 0.36),
    6px 12px 28px 0 rgba(0, 0, 0, 0.26),
    12px 24px 52px 0 rgba(7, 36, 65, 0.22);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-line);
}
.btn--ghost:hover { background: var(--color-bg); }
.btn--small {
  font-size: 12px;
  padding: 7px 11px;
}

/* ─────────────────────────────────────
   Mobile-Toggle: Map ↔ List
   ───────────────────────────────────── */
/* Mobile-Toggle deprecated — Bottom-Sheet ersetzt es */
.mobile-toggle { display: none !important; }

/* ─────────────────────────────────────
   Modal — Lead Form
   ───────────────────────────────────── */
.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(560px, 92vw);
  max-height: 92dvh;
  box-shadow: var(--shadow-lg);
  background: var(--color-card);
}
.modal::backdrop {
  background: rgba(8, 18, 27, 0.45);
  backdrop-filter: blur(8px);
}
.modal__close {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--color-bg);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--color-muted);
  line-height: 1;
}
.modal__close:hover { color: var(--color-text); background: rgba(8, 18, 27, 0.08); }

.modal__head {
  padding: 28px 28px 8px;
}
.modal__head h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.modal__head p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.leadform {
  padding: 16px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.leadform__dealer {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--color-muted);
}
.leadform__dealer strong {
  color: var(--color-text);
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;          /* erlaubt Schrumpfen unter content-min-width im Grid */
}
.field span {
  font-size: 12px;
  color: var(--color-muted);
  font-weight: 600;
}
.field em {
  color: inherit;
  font-style: normal;
}
/* Text-Inputs + Textareas — Pill-Look. Checkboxen/Radios bewusst NICHT matchen,
   sonst dehnt sich die Checkbox auf 100% Breite und das Label rutscht. */
.field input:not([type="checkbox"]):not([type="radio"]),
.field textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--color-card);
  color: var(--color-text);
  outline: none;
  box-shadow: var(--shadow-input);
  transition: box-shadow 0.25s ease;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field textarea:focus {
  box-shadow:
    /* Bestehender Directed-Shadow */
    -4px -4px 30px 0 rgba(57, 95, 118, 0.10),
    77px 107px 37px 0 rgba(84, 141, 176, 0.00),
    49px 69px 34px 0 rgba(84, 141, 176, 0.01),
    28px 39px 28px 0 rgba(84, 141, 176, 0.05),
    12px 17px 21px 0 rgba(84, 141, 176, 0.09),
    3px 4px 12px 0 rgba(84, 141, 176, 0.05),
    /* Cyan-Glow im Fokus */
    0 0 0 3px rgba(48, 182, 198, 0.28),
    0 0 24px rgba(48, 182, 198, 0.35);
}
.field textarea {
  resize: vertical;
  min-height: 96px;
  padding: 16px 22px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
/* Layout-Varianten (nur Desktop — Mobile-Media-Query unten kollabiert alles auf 1fr) */
.field-row--single  { grid-template-columns: 1fr; }
.field-row--7-3     { grid-template-columns: 7fr 3fr; }

.field--checks {
  /* Layout wie andere .field: Label oben, Box drunter */
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}
.field--checks small { font-weight: 400; }

/* Box-Look (weiße Pill mit Directed-Shadow) NUR auf dem inneren Container */
.field--checks__box {
  background: var(--color-card);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-input);
  padding: 14px 22px;
}
.field--checks__box label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
}

.field--consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
}
.field--consent input { margin-top: 2px; }

.honeypot {
  position: absolute;
  left: -9999px;
  height: 0; width: 0;
  overflow: hidden;
}

.leadform__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.leadform__actions .btn { padding: 11px 20px; }

.leadform__status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  display: none;
}
.leadform__status.is-success {
  display: block;
  background: rgba(44, 182, 115, 0.10);
  color: var(--color-success);
}
.leadform__status.is-error {
  display: block;
  background: rgba(253, 98, 98, 0.10);
  color: var(--color-coral);
}

/* ─────────────────────────────────────
   Responsive — Mobile
   ───────────────────────────────────── */
@media (max-width: 860px) {
  /* Auf Mobile übernimmt das Bottom-Sheet das Sidebar-Öffnen — Hamburger entfällt */
  .sidebar-trigger {
    display: none !important;
  }

  .topbar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    top: 10px;
    left: 10px;
    right: 10px;
  }
  .filter-group {
    justify-self: stretch;
    justify-content: space-between;
  }
  .search {
    /* Search nimmt automatisch full-width in Reihe 2 */
  }
  .filter-btn { flex: 1 1 auto; justify-content: center; }
  .search input { width: 100%; }

  /* ───── Bottom-Sheet Sidebar (native-app-style) ───── */
  .sidebar {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 88dvh;
    border-radius: var(--radius-blur) var(--radius-blur) 0 0;
    transform: translateY(calc(100% - 76px));   /* collapsed: nur Handle + Header peek */
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0.24, 1);
    z-index: 1150;
    background: rgba(232, 240, 244, 0.85);      /* etwas opaker auf Mobile */
    will-change: transform;
  }
  .sidebar.is-half {
    transform: translateY(50%);
  }
  .sidebar.is-full {
    transform: translateY(0);
  }
  .sidebar.is-dragging {
    transition: none;
  }

  /* Drag-Handle sichtbar */
  .sidebar__handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 28px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: grab;
    touch-action: none;
    flex: 0 0 auto;
  }
  .sidebar__handle:active { cursor: grabbing; }
  .sidebar__handle-bar {
    width: 44px;
    height: 5px;
    background: rgba(8, 18, 27, 0.22);
    border-radius: 999px;
    transition: background 0.15s ease;
  }
  .sidebar__handle:hover .sidebar__handle-bar,
  .sidebar__handle:active .sidebar__handle-bar {
    background: rgba(8, 18, 27, 0.40);
  }

  /* Header schmaler auf Mobile */
  .sidebar__header {
    padding: 10px 18px 14px;
  }

  /* Desktop-Toggle-Buttons auf Mobile verstecken (Bottom-Sheet übernimmt) */
  .sidebar__toggle,
  .sidebar-reopen {
    display: none !important;
  }

  .field-row,
  .field-row--7-3,
  .field-row--single { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  /* Auf sehr schmalen Geräten noch ein Stück enger */
  .modal__head { padding: 18px 14px 4px; }
  .leadform    { padding: 12px 14px 18px; }
  .leadform__dealer { padding: 12px 14px; }
}

/* ─────────────────────────────────────
   Mobile-Polish — Stufe 1
   ───────────────────────────────────── */
@media (max-width: 600px) {
  /* Topbar kompakter */
  .topbar {
    gap: 8px;
    top: 8px;
    left: 8px;
    right: 8px;
  }

  /* Filter-Buttons enger */
  .filter-btn {
    padding: 7px 10px;
    font-size: 12px;
    gap: 6px;
  }
  .filter-btn__count {
    font-size: 10px;
    padding: 0 5px;
    min-width: 18px;
  }

  /* Sidebar startet höher (Topbar ist kleiner auf Mobile) */
  .sidebar {
    /* bleibt full-screen overlay via media query weiter oben */
  }

  /* Pin-Animations-Anchor proportional auf Mobile (101×101 statt 135×135) */
  .marker-icon__img {
    transform-origin: 32px 53px;
  }

  /* Bounce-Intensität auf Mobile reduzieren (kleinere Pins = subtilere Animation) */
  @keyframes pinBounce {
    0%   { transform: translateY(0)    scale(1);     }
    35%  { transform: translateY(-8px) scale(1.09);  }
    55%  { transform: translateY(-3px) scale(1.03);  }
    75%  { transform: translateY(-6px) scale(1.06);  }
    100% { transform: translateY(-4px) scale(1.05);  }
  }

  /* Popup responsive Breite */
  .leaflet-popup-content {
    width: min(280px, calc(100vw - 48px)) !important;
  }
  .popup { padding: 14px; }

  /* Mobile-Toggle weiter unten wegen Notch/Home-Bar */
  .mobile-toggle {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  /* Lead-Modal voll-screen-ish auf Mobile */
  .modal {
    width: 98vw;
    max-height: 94dvh;
  }
  /* Innenpadding straffer auf Mobile, damit mehr Platz fürs Formular bleibt */
  .modal__head { padding: 20px 18px 4px; }
  .leadform    { padding: 14px 18px 20px; gap: 12px; }
  .leadform__dealer { padding: 14px 16px; }
  /* Inputs innen kompakter (Text bleibt gut lesbar, aber weniger Luft) */
  .field input:not([type="checkbox"]):not([type="radio"]),
  .field textarea { padding: 12px 18px; }
}

/* Extra-narrow: unter 380px (kleine iPhones im Hochformat) */
@media (max-width: 380px) {
  .filter-btn {
    padding: 6px 8px;
    font-size: 11px;
  }
  .filter-btn__count {
    display: none;       /* Count-Badges unter 380px ausblenden */
  }
}
