/* Страница карты на Яндекс Картах API v3 — 2026-12-01 (Site/map3.twig, App/Resources/js/pages/map3.js, docs/map3.md).
   Остальное (размер страницы, «Закрыть карту», карточка .custom-popup) — общие правила main.css для #map / .wrapper-5 */

#map.map3 {
  position: relative;
}
/* YMap ставит своему контейнеру position: relative — абсолютное «растягивание» не действует, поэтому высота явно 100% */
.map3-canvas {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/* Блок с ближайшим городом слева вверху (было — угол Leaflet .leaflet-top.leaflet-left из leafletall.css; те же отступы) */
.map3-topleft {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  pointer-events: none;
}
.map3-control {
  position: relative;
  pointer-events: auto;
  margin: 10px 0 0 10px;
}

/* Значок объекта/города: точка привязки — низ «капли» (как iconAnchor [12, 34] в старой карте) */
.map3-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
  line-height: 0;
}
.map3-pin img {
  width: 24px;
  height: 34px;
}
/* Неоплаченный объект — серая точка, привязка по центру */
.map3-pin--inactive {
  transform: translate(-50%, -50%);
}
.map3-pin--inactive img {
  width: 11px;
  height: 11px;
}

/* Группа значков — круги как у прежней карты (markercluster): зелёный / жёлтый / оранжевый */
.map3-cluster {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: 600 12px/1 'Helvetica Neue', Arial, Helvetica, sans-serif;
  color: #2f3544;
}
.map3-cluster span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.map3-cluster--s { background: rgba(181, 226, 140, 0.6); }
.map3-cluster--s span { background: rgba(110, 204, 57, 0.6); }
.map3-cluster--m { background: rgba(241, 211, 87, 0.6); }
.map3-cluster--m span { background: rgba(240, 194, 12, 0.6); }
.map3-cluster--l { background: rgba(253, 156, 115, 0.6); }
.map3-cluster--l span { background: rgba(241, 128, 23, 0.6); }

/* API не загрузился */
.map3-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 320px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(46, 52, 68, 0.2);
  text-align: center;
}

/* Телефон: карточка на всю ширину внизу — поднимаем её над строкой копирайтов Яндекса (условия API: не перекрывать) */
@media only screen and (max-width: 767px) {
  .wrapper-5 > #map.map3 + .custom-popup {
    margin-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  }
}
