/* правка: стили карт OSM/Leaflet (кластеры, балуны, поиск) */
.crmMapClusterBox { background: transparent; }
.crmMapCluster {
    width: 38px; height: 38px; border-radius: 50%;
    background: #d9534f; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font: 700 13px/1 Arial, sans-serif;
    border: 2px solid rgba(255, 255, 255, .85);
    box-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}
.crmMapBalloon { max-width: 230px; font-size: 12px; }
/* правка: width/height auto обязательны — в старых стилях CRM живёт правило
   .baloonComplexImage { width: 300px }; вместе с max-width/max-height оно
   сжимало фото в жёсткий прямоугольник 210×130 без сохранения пропорций */
.crmMapBalloon .baloonComplexImage {
    width: auto; height: auto;
    max-width: 210px; max-height: 130px; display: block; margin-bottom: 6px; border-radius: 6px;
}
.crmMapBalloonTitle { display: block; font-weight: 700; color: #337ab7; text-decoration: none; margin-bottom: 3px; }
.crmMapBalloonTitle:hover { text-decoration: underline; }
.crmMapBalloon .baloonAddress { margin: 0; color: #555; }
.crmMapSearchDrop {
    position: absolute; top: 44px; left: 12px; right: 12px; z-index: 1000;
    background: #fff; border-radius: 6px; box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
    max-height: 220px; overflow: auto;
}
.crmMapSearchItem {
    padding: 8px 12px; font-size: 12px; color: #333; cursor: pointer; border-bottom: 1px solid #eee;
}
.crmMapSearchItem:hover { background: #f5f5f5; }
.crmMapSearchItem:last-child { border-bottom: none; }
.leaflet-container { border-radius: 10px; background: #e8e6e1; }

/* панель слоя инфраструктуры (POI): кнопки «Инфраструктура» и «Районы» в одну строку */
.crmPoiBox {
    position: absolute; top: 10px; right: 10px; z-index: 1000;
    display: flex; flex-direction: row; align-items: flex-start; gap: 6px;
    font-family: Arial, sans-serif;
}
.crmPoiHead {
    display: inline-block;
    padding: 7px 12px;
    background: #fff; color: #333;
    border-radius: 16px;
    font: 700 12px/1 Arial, sans-serif;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
    cursor: pointer; user-select: none;
    white-space: nowrap;
}
.crmPoiHead:hover { background: #f2f2f2; }
.crmPoiHead .fa { color: #d9534f; margin-right: 4px; }
/* список раскрывается под строкой кнопок, прижат к правому краю */
.crmPoiPanel {
    position: absolute; top: 44px; right: 0;
    width: 230px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .3);
    overflow: hidden;
}
.crmPoiList { max-height: 250px; overflow-y: auto; padding: 6px 0; }
.crmPoiLoading { padding: 10px 14px; color: #888; font-size: 12px; }
.crmPoiRow {
    display: flex; align-items: center;
    padding: 5px 14px;
    font-size: 12px; color: #333;
    cursor: pointer; margin: 0;
}
.crmPoiRow:hover { background: #f5f5f5; }
.crmPoiRow input { margin: 0 8px 0 0; }
.crmPoiDot {
    width: 10px; height: 10px; border-radius: 50%;
    flex: 0 0 10px; margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, .25);
}
.crmPoiName { flex: 1 1 auto; }
/* иконка категории в панели (вместо цветной точки) */
.crmPoiIco {
    width: 16px; flex: 0 0 16px; margin-right: 8px;
    text-align: center; font-size: 13px;
}

/* булавка POI на карте: белый круг, рамка и символ — цветом категории */
.crmPoiPinBox { background: transparent; border: none; }
.crmPoiPin {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; box-sizing: border-box;
    background: #fff; border: 2px solid; border-radius: 50%;
    font-size: 10px; line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* чёрная фокус-рамка вокруг кликнутого слоя (район, маркер) не нужна */
.leaflet-interactive:focus { outline: none; }
.crmPoiClear {
    padding: 7px 14px;
    border-top: 1px solid #eee;
    font-size: 12px; color: #337ab7;
    cursor: pointer;
}
.crmPoiClear:hover { background: #f5f5f5; }
.crmPoiFoot {
    padding: 7px 14px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: 10px; color: #999;
}
.crmPoiCatName { margin: 4px 0 0; color: #888; font-size: 11px; }
/* строка «Выбрать все» над списком категорий */
.crmPoiAllRow {
    border-bottom: 1px solid #eee;
    padding: 8px 14px 6px;
}

/* кнопка-переключатель слоя районов: рядом с «Инфраструктурой» (внутри .crmPoiBox
   статична и встаёт в общий flex-ряд), а без неё — своя пилюля в углу карты */
.crmZoneBtn {
    position: absolute; top: 10px; right: 10px; z-index: 1000;
    background: #fff; border-radius: 16px; padding: 7px 14px;
    font: 12px/1 Arial, sans-serif; color: #444; cursor: pointer;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .25); user-select: none;
    white-space: nowrap;
}
.crmPoiBox .crmZoneBtn { position: static; }
.crmZoneBtn .fa { margin-right: 4px; }
.crmZoneBtn:hover { background: #f4f4f4; }
.crmZoneBtn.active { background: #2c7fb8; color: #fff; }

.crmMapZoneTooltip {
    font-size: 13px;
}
.crmMapZoneTooltip b { display: block; font-size: 14px; }
.crmMapZoneTooltip .crmMapZoneRow { white-space: nowrap; margin-top: 3px; }
.crmMapZoneTooltip .crmMapZoneMuted { color: #888; }

/* строки цен в попапе района */
.crmMapBalloon .crmMapZoneRow { margin-top: 4px; font-size: 12px; }
.crmMapBalloon .crmMapZoneMuted { color: #888; }
