#smart-search-map {
  height: 100%;
  min-height: 540px;
  width: 100%;
  background: #f8fafd;
}

.map-view-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e8eaed;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #fff;
}

.map-view-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
  color: #202124;
}

.map-search-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  font-size: 12px;
  color: #5f6368;
  position: static;
  max-width: min(560px, 58vw);
  padding: 6px 8px;
  border: 1px solid #e8eaed;
  border-radius: 999px;
  background: #f8fafd;
  box-shadow: none;
  overflow: hidden;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.cluster-pill {
  border-radius: 999px;
  background: #1a73e8;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(60, 64, 67, 0.24);
  font-weight: 800;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.company-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(60, 64, 67, 0.24);
}

@media (max-width: 1440px) {
  .map-view-head h2 {
    font-size: 1.35rem;
  }
}

@media (max-width: 1200px) {
  #smart-search-map {
    min-height: 480px;
  }
}

/* Modern map-search map panel */
#smart-search-map {
  border-radius: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(218, 220, 224, .9);
}

.map-search-legend {
  box-shadow: none;
  backdrop-filter: none;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(60, 64, 67, .22);
}

.smart-search-shell .map-search-legend {
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.smart-search-shell .map-view-head {
  display: grid;
  align-items: start;
}

.smart-search-shell #smart-search-map {
  height: 280px;
  min-height: 280px;
  border-radius: 8px;
}

@media (max-width: 1080px) {
  .smart-search-shell #smart-search-map {
    height: 360px;
    min-height: 360px;
  }
}
