/* ERP Holzbau – map.css: Kartenbereich (Leaflet) in Blueprint-Optik */
.map-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: var(--grid-gap);
  min-height: 0;
  height: calc(100dvh - var(--navbar-h) - 2 * var(--ws-pad) - 44px);
}
.app.has-banner .map-layout {
  height: calc(100dvh - var(--navbar-h) - var(--banner-h) - 2 * var(--ws-pad) - 44px);
}
.map-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
  /* Übersteigen Fokus-Karte + Filter die Höhe, scrollt die Leiste als Ganzes statt über den Rand zu laufen */
  overflow-y: auto;
  overflow-x: hidden;
}
.map-panel .map-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-panel .map-kinds .bp6-button {
  flex: 1 1 0;
}
.map-panel .map-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}
.map-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--bp-surface-border-color-default);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.map-item:hover {
  background: var(--bp-surface-background-color-default-hover);
}
.map-item.active {
  border-color: var(--bp-intent-primary-rest);
  box-shadow: inset 3px 0 0 var(--bp-intent-primary-rest);
}
.map-item.missing {
  opacity: 0.7;
}
.map-item .map-item-main {
  min-width: 0;
}
.map-item .map-item-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-item .map-item-sub {
  font-size: 12px;
  color: var(--bp-typography-color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-item .bp6-tag {
  justify-self: end;
}
.map-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  box-shadow:
    0 0 0 2px var(--viz-surface),
    0 1px 4px rgba(0, 0, 0, 0.4);
}
.map-pin.kind-PROJECT {
  background: var(--viz-s1);
}
.map-pin.kind-FACILITY {
  background: var(--viz-s3);
}
.map-pin.kind-VEHICLE {
  background: var(--viz-s2);
}
.map-pin.tone-danger {
  box-shadow:
    0 0 0 2px var(--viz-surface),
    0 0 0 4px var(--viz-critical);
}
.map-pin.tone-warning {
  box-shadow:
    0 0 0 2px var(--viz-surface),
    0 0 0 4px var(--viz-warning);
}
.map-pin.inactive {
  opacity: 0.55;
  filter: grayscale(0.6);
}
.map-stage {
  position: relative;
  /* eigener Stapelkontext: Leaflet-Ebenen (z-index 400–800) dürfen nicht über Drawer, Dialoge und Palette liegen */
  isolation: isolate;
  z-index: 0;
  min-height: 320px;
  border: 1px solid var(--bp-surface-border-color-default);
  border-radius: var(--bp-surface-border-radius, 4px);
  overflow: hidden;
  background: var(--viz-page);
}
.map-stage .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--viz-page);
  font-family: var(--bp-typography-family-default);
}
.map-stage.picking .leaflet-container {
  cursor: crosshair;
}
.map-overlay {
  position: absolute;
  z-index: 500;
  /* unterhalb der Werkzeugleiste (.map-tools, oben rechts, ca. 40 px hoch) und rechts neben den Zoom-Knöpfen –
     sonst überlappte der Verschieben-Hinweis das Suchfeld (Meldung 26.09., iPad); eine Breitenformel scheitert an
     der schmalen Dashboard-Karte, deshalb fester Abstand nach unten */
  left: 56px;
  top: 58px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: calc(100% - 66px);
  pointer-events: none;
}
.map-overlay > * {
  pointer-events: auto;
}
.map-overlay .bp6-callout {
  padding: 6px 10px;
  font-size: 12px;
}
.map-legend {
  position: absolute;
  z-index: 500;
  right: 10px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--bp-surface-background-color-default);
  border: 1px solid var(--bp-surface-border-color-default);
  font-size: 12px;
}
body.bp6-dark .map-legend {
  background: var(--bp-palette-dark-gray-4);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.map-legend .map-pin {
  width: 14px;
  height: 14px;
  font-size: 0;
  box-shadow: none;
}
/* Dunkles Thema: OSM-Kacheln invertiert und entsättigt (Palantir-Optik ohne Kachel-API-Schlüssel) */
.leaflet-layer.tiles-dark {
  filter: invert(1) hue-rotate(180deg) brightness(0.78) contrast(0.92) saturate(0.35);
}
.leaflet-layer.tiles-light {
  filter: saturate(0.55) contrast(0.95);
}
/* Marker */
.leaflet-div-icon.map-marker {
  background: transparent;
  border: 0;
}
.map-marker .map-pin {
  cursor: pointer;
  transition: transform 120ms;
}
.map-marker:hover .map-pin,
.map-marker.selected .map-pin {
  transform: scale(1.15);
}
.map-marker .map-marker-label {
  position: absolute;
  left: 32px;
  top: 4px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--viz-ink-1);
  text-shadow:
    0 0 3px var(--viz-page),
    0 0 3px var(--viz-page),
    0 0 3px var(--viz-page);
  pointer-events: none;
}
.map-marker.vehicle-live .map-pin::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  right: -1px;
  top: -1px;
  border-radius: 50%;
  background: var(--viz-good);
  border: 2px solid var(--viz-surface);
}
/* Popup */
.leaflet-popup-content-wrapper {
  background: var(--bp-surface-background-color-default);
  color: inherit;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bp-surface-border-color-default);
  padding: 0;
}
body.bp6-dark .leaflet-popup-content-wrapper {
  background: var(--bp-palette-dark-gray-4);
}
.leaflet-popup-tip {
  background: var(--bp-surface-background-color-default);
}
body.bp6-dark .leaflet-popup-tip {
  background: var(--bp-palette-dark-gray-4);
}
.leaflet-popup-content {
  margin: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  min-width: 220px;
}
.leaflet-popup-close-button {
  color: var(--bp-typography-color-muted) !important;
}
.map-popup .map-popup-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.map-popup .map-popup-head b {
  flex: 1 1 auto;
}
.map-popup .kv {
  font-size: 12px;
  margin: 4px 0 8px;
  grid-template-columns: 90px 1fr;
}
.map-popup .map-popup-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.7) !important;
}
body.bp6-dark .leaflet-control-attribution {
  background: rgba(37, 42, 49, 0.8) !important;
  color: var(--bp-typography-color-muted);
}
body.bp6-dark .leaflet-control-attribution a {
  color: var(--bp-palette-blue-5);
}
.leaflet-bar a {
  background: var(--bp-surface-background-color-default);
  color: inherit;
  border-bottom-color: var(--bp-surface-border-color-default);
}
body.bp6-dark .leaflet-bar a {
  background: var(--bp-palette-dark-gray-4);
  color: var(--bp-palette-light-gray-5);
}
.leaflet-bar a:hover {
  background: var(--bp-surface-background-color-default-hover);
}
body.bp6-dark .leaflet-control-zoom-in,
body.bp6-dark .leaflet-control-zoom-out {
  border-color: var(--bp-surface-border-color-default);
}
/* Karte in Drawern (Position setzen) */
.map-mini {
  isolation: isolate;
  z-index: 0;
  height: 260px;
  border: 1px solid var(--bp-surface-border-color-default);
  border-radius: 4px;
  overflow: hidden;
}
.map-mini .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--viz-page);
}
.geo-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.geo-row .bp6-form-group {
  flex: 1 1 120px;
  margin: 0;
}
.geo-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.geo-results .bp6-menu-item {
  font-size: 12px;
}
@media (max-width: 1199.98px) {
  .map-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}
@media (max-width: 719.98px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(300px, 55vh) minmax(0, 1fr);
    height: auto;
  }
  .map-panel {
    order: 2;
    max-height: 50vh;
  }
  .map-stage {
    order: 1;
  }
  .map-legend {
    display: none;
  }
}
/* Werkzeuge oben rechts, Adresssuche */
.map-tools {
  position: absolute;
  z-index: 500;
  right: 10px;
  top: 10px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.map-tools .map-addr {
  position: relative;
  width: min(320px, 50vw);
}
.map-tools .map-addr .bp6-input-group {
  background: var(--bp-surface-background-color-default);
  border-radius: 4px;
}
.map-tools .map-addr .bp6-input {
  padding-right: 34px;
}
.map-tools .map-addr .bp6-input-group > .bp6-button {
  position: absolute;
  right: 2px;
  top: 3px;
}
.map-tools .map-addr-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 600;
}
.map-tools .map-tool-btn {
  background: var(--bp-surface-background-color-default);
  border: 1px solid var(--bp-surface-border-color-default);
}
body.bp6-dark .map-tools .map-tool-btn,
body.bp6-dark .map-tools .map-addr .bp6-input-group {
  background: var(--bp-palette-dark-gray-4);
}
.map-pin.kind-SEARCH {
  background: var(--viz-s7);
}
.map-item .map-item-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}
.wx-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
/* Wetter */
.wx-icon.wx-sun {
  color: var(--viz-s4);
}
.wx-icon.wx-cloud {
  color: var(--viz-ink-3);
}
.wx-icon.wx-fog {
  color: var(--viz-ink-3);
}
.wx-icon.wx-rain {
  color: var(--viz-s1);
}
.wx-icon.wx-snow {
  color: var(--viz-seq-300);
}
.wx-icon.wx-thunder {
  color: var(--viz-s8);
}
.map-marker-label .wx-sun {
  color: var(--viz-s4);
}
.map-marker-label .wx-rain {
  color: var(--viz-s1);
}
.map-marker-label .wx-thunder {
  color: var(--viz-s8);
}
.map-marker-label .wx-snow {
  color: var(--viz-seq-300);
}
.map-marker-label .wx-cloud,
.map-marker-label .wx-fog {
  color: var(--viz-ink-3);
}
.wx-card,
.wx-warnings {
  padding: 8px 10px;
  border: 1px solid var(--bp-surface-border-color-default);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wx-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}
.wx-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.wx-strip.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.wx-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
}
.wx-day.has-warn {
  background: rgba(250, 178, 25, 0.12);
}
.wx-day .wx-dow {
  color: var(--bp-typography-color-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.wx-day .wx-icon {
  font-size: 18px;
}
.wx-day .wx-temp {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wx-day .wx-warn {
  color: var(--viz-serious);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.wx-warn-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 3px;
}
.wx-warn-row:hover {
  background: var(--bp-surface-background-color-default-hover);
}
.map-popup-wx {
  margin: 4px 0 8px;
}
.map-panel .map-weather:empty,
.map-panel .map-warnings:empty {
  display: none;
}

.map-marker-label .bp6-icon {
  font-size: 12px;
  vertical-align: -2px;
  margin: 0 1px;
}
.map-marker-label .bp6-icon::before {
  font-size: 12px;
}

/* ------------------------------------------------------------ Ausbau 8: Karte als Verwaltungswerkzeug */
:root {
  --map-kind-PROJECT: var(--viz-s1);
  --map-kind-FACILITY: var(--viz-s3);
  --map-kind-VEHICLE: var(--viz-s2);
  --map-kind-CUSTOMER: var(--viz-s7);
  --map-kind-LEAD: var(--viz-s4);
}
.map-pin.kind-CUSTOMER {
  background: var(--map-kind-CUSTOMER);
}
/* Ausbau 13: Leads (CRM) als eigene Punktart */
.map-pin.kind-LEAD {
  background: var(--map-kind-LEAD);
}
.map-pin.kind-CLUSTER {
  background: conic-gradient(
    var(--map-kind-PROJECT) 0 120deg,
    var(--map-kind-FACILITY) 120deg 240deg,
    var(--map-kind-VEHICLE) 240deg 360deg
  );
}
/* Sammelmarker: Ring mit Anteilen je Art, Zahl in der Mitte */
.leaflet-div-icon.map-cluster-marker {
  background: transparent;
  border: 0;
}
.map-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px var(--viz-surface),
    0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 120ms;
}
.map-cluster:hover {
  transform: scale(1.08);
}
.map-cluster-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: var(--viz-surface);
  color: var(--viz-ink-1);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Kurs-Pfeil am Fahrzeugmarker (nur in Fahrt) */
.map-pin {
  position: relative;
}
.map-pin-heading {
  position: absolute;
  inset: -7px;
  pointer-events: none;
}
.map-pin-heading::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--viz-ink-1);
}
.map-marker.stale .map-pin {
  opacity: 0.75;
  outline: 2px dashed var(--viz-warning);
  outline-offset: 1px;
}
/* Filterzeilen und Ebenen-Schalter */
.map-filter-row {
  display: flex;
  gap: 6px;
}
.map-filter-row > * {
  flex: 1 1 0;
  min-width: 0;
}
.map-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.map-switches .bp6-switch {
  margin-bottom: 0;
}
.map-panel .map-focus:empty,
.map-panel .map-lage:empty {
  display: none;
}
/* Fokus-Karte des ausgewählten Punkts: ganz oben in der Leiste, immer vollständig sichtbar */
.map-panel .map-focus {
  flex: 0 0 auto;
}
.map-panel .map-list {
  min-height: 140px;
}
.map-focus-card {
  padding: 8px 10px;
  border: 1px solid var(--bp-intent-primary-rest);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bp-surface-background-color-default);
  box-shadow: inset 3px 0 0 var(--bp-intent-primary-rest);
}
body.bp6-dark .map-focus-card {
  background: var(--bp-palette-dark-gray-4);
}
.map-focus-card .map-popup-head b {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-focus-card .map-pin {
  width: 22px;
  height: 22px;
  font-size: 12px;
  flex: 0 0 auto;
}
.map-focus-card .kv {
  font-size: 12px;
  margin: 2px 0 4px;
  grid-template-columns: 96px 1fr;
}
/* Lagebild-Chips (Dashboard) */
.map-lage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.map-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 6px 10px;
  border: 1px solid var(--bp-surface-border-color-default);
  border-radius: 4px;
  background: var(--bp-surface-background-color-default);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  min-width: 0;
}
body.bp6-dark .map-chip {
  background: var(--bp-palette-dark-gray-4);
}
.map-chip.clickable {
  cursor: pointer;
}
.map-chip.clickable:hover {
  background: var(--bp-surface-background-color-default-hover);
}
.map-chip .map-chip-value {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}
.map-chip .map-chip-label {
  font-size: 11px;
  color: var(--bp-typography-color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.map-chip.tone-warning .map-chip-value {
  color: var(--viz-serious);
}
.map-chip.tone-good .map-chip-value {
  color: var(--viz-good);
}
.wx-sun {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}
.wx-sun .bp6-icon {
  color: var(--viz-s4);
}
/* Eingebettet im Dashboard: feste Höhe, Leiste scrollt als Ganzes (Liste läuft im Fluss mit) */
.map-layout.embedded {
  height: clamp(520px, 72vh, 760px);
  grid-template-columns: 320px minmax(0, 1fr);
}
.app.has-banner .map-layout.embedded {
  height: clamp(520px, 72vh, 760px);
}
.map-layout.embedded .map-list {
  flex: 0 0 auto;
  overflow: visible;
  min-height: 0;
}
.widget-map > .panel-body {
  overflow: hidden;
}
.map-panel.embedded .map-kinds .bp6-button {
  flex: 1 1 0;
}
.widget-map > .panel-body {
  padding: 8px;
}
@media (max-width: 1199.98px) {
  .map-layout.embedded {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}
@media (max-width: 719.98px) {
  .map-layout.embedded {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(300px, 60vh) minmax(0, 1fr);
  }
  .map-panel.embedded {
    order: 2;
    max-height: 60vh;
  }
  .map-lage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------------------------------------------- Ausbau 12b: aufgeräumte Leiste (Tablet-Screenshot 26.09.) */
/* Arten als 2×2-Raster statt vier gequetschter Knöpfe */
.map-panel:not(.embedded) .map-kinds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.map-panel:not(.embedded) .map-kinds .bp6-button {
  justify-content: flex-start;
  min-width: 0;
  border-radius: 3px !important;
  margin: 0 !important;
}
.map-panel:not(.embedded) .map-kinds .bp6-button .bp6-button-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Ebenen & Filter zusammengeklappt */
.map-more {
  border: 1px solid var(--bp-surface-border-color-default);
  border-radius: 4px;
}
.map-more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  min-height: var(--hit);
}
.map-more > summary::-webkit-details-marker {
  display: none;
}
.map-more > summary > .bp6-fill {
  flex: 0 0 auto;
  white-space: nowrap;
}
.map-more > summary .map-more-hint {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.map-more > summary .map-more-caret {
  transition: transform 150ms;
}
.map-more[open] > summary .map-more-caret {
  transform: rotate(180deg);
}
.map-more > summary:hover {
  background: var(--bp-surface-layer-primary, rgba(45, 114, 210, 0.06));
}
.map-more-body {
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--bp-surface-border-color-default);
}
/* Aktionen der Fokus-Karte als gleichmäßiges Raster statt Zeilenumbruch nach Zufall */
.map-focus-card .map-popup-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 4px;
}
.map-focus-card .map-popup-actions .bp6-button {
  justify-content: flex-start;
  min-width: 0;
}
.map-focus-card .map-popup-actions .bp6-button .bp6-button-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Kurzes Popup: Kopf, eine Zeile, Aktionen */
.map-popup.compact .map-popup-actions {
  margin-top: 6px;
}

/* ---------------------------------------------- Aufgeräumte Lagekarte (iPad-Screenshot 27.09.) */
/* Wetter der Fokus-Karte: alle Tage in einer Zeile (cols über --wx-cols) */
.wx-strip.compact[style*='--wx-cols'] {
  grid-template-columns: repeat(var(--wx-cols), minmax(0, 1fr));
}
.map-focus-card .wx-day {
  padding: 3px 0;
}
.map-focus-card .wx-sun {
  font-size: 11px;
}
/* Aktionen: zwei gleich breite Hauptknöpfe, darunter eine ruhige Werkzeugzeile */
.map-focus-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.map-actions-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.map-actions-main.single {
  grid-template-columns: 1fr;
}
.map-actions-main .bp6-button {
  justify-content: center;
  min-width: 0;
}
.map-actions-more {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  padding-top: 6px;
  border-top: 1px solid var(--bp-surface-border-color-default);
}
.map-actions-more .bp6-button {
  min-width: 0;
  color: var(--bp-typography-color-muted);
}
.map-actions-more .bp6-button:hover {
  color: inherit;
}
/* Fokus-Karte: Beschriftungen schmaler, Zeilen dichter */
.map-focus-card .kv {
  grid-template-columns: 78px 1fr;
  row-gap: 1px;
}
/* Lagebild-Chips im Dashboard: eine Zeile, Wert über zweizeiliger Beschriftung */
.map-panel.embedded .map-lage {
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 4px;
}
.map-panel.embedded .map-chip {
  padding: 4px 6px;
}
.map-panel.embedded .map-chip .map-chip-value {
  font-size: 16px;
}
.map-panel.embedded .map-chip .map-chip-label {
  font-size: 10px;
  line-height: 1.2;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* Verschieben-Modus: Hinweis als Leiste am unteren Kartenrand – oben liegen Suchfeld und Vorschläge */
.map-stage.picking .map-overlay {
  top: auto;
  bottom: 22px;
  left: 10px;
  right: 10px;
  max-width: none;
  justify-content: center;
}
.map-stage.picking .map-legend {
  display: none;
}
.map-overlay .map-pick-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  max-width: 640px;
  padding: 8px 10px 8px 38px;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: var(--bp-surface-background-color-default, #fff);
}
body.bp6-dark .map-overlay .map-pick-bar {
  background-color: var(--bp-palette-dark-gray-3, #2f343c);
}
.map-pick-bar .map-pick-text {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.map-pick-bar .map-pick-text span {
  font-size: 12px;
  color: var(--bp-typography-color-muted);
}
/* Kopf der Fokus-Karte: eine Zeile – Titel kürzt, Schließen-Knopf bleibt rechts */
.map-focus-card > .map-popup-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}
.map-focus-card > .map-popup-head .bp6-tag {
  flex: 0 0 auto;
}
.map-focus-card > .map-popup-head > .bp6-button {
  flex: 0 0 auto;
  margin-left: auto;
}
/* Verschieben-Leiste deckend (Blueprint-Callout ist halbtransparent und über der Karte schlecht lesbar) */
.map-stage .map-overlay .bp6-callout.map-pick-bar {
  background: linear-gradient(rgba(45, 114, 210, 0.12), rgba(45, 114, 210, 0.12)), #ffffff;
}
body.bp6-dark .map-stage .map-overlay .bp6-callout.map-pick-bar {
  background: linear-gradient(rgba(45, 114, 210, 0.22), rgba(45, 114, 210, 0.22)), #2f343c;
}
