/*
 * Myhome Yandex Maps Общие стили для карт поиска и детальной страницы.
 * Подключается и на страницах со списком (#myhome-map), и на детальной
 * (single estate). Кластер/loader/empty-state используются только картой
 * поиска, но в одном файле экономия запросов важнее микрооптимизации.
 * версия 1.2
 * @package Myhome_Yandex_Maps
 */

/* Маркер (SVG-pin, копия flaticon-pin темы) */
.mhym-marker {
  width: 40px;
  height: 40px;
  margin: -32px 0 0 -16px;
  color: #FF3D32;
}

.mhym-marker-svg {
  width: 40px;
  height: 40px;
  display: block;
}

.mhym-marker-svg path {
  fill: #FF3D32;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Баллон маркера (Изолировано для старого балуна) */
ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) ymaps[class*="-balloon__layout"] {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  position: relative !important;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) ymaps[class*="-balloon__content"] {
  padding: 0 !important;
  background: transparent !important;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) ymaps[class*="-balloon__content"]>ymaps {
  width: 320px !important;
  height: auto !important;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) ymaps[class*="-balloon__close"] {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  z-index: 10;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) ymaps[class*="-balloon__tail"]:before,
ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) ymaps[class*="-balloon__tail"]:after {
  background-color: #29AAE3;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox {
  display: block;
  width: 320px;
  background: #29AAE3;
  border-radius: 8px;
  overflow: hidden;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  position: relative;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox a {
  display: block;
  color: #fff;
  text-decoration: none;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox a:hover {
  text-decoration: none;
  color: #fff;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox__img-wrapper {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #ccc;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox__name {
  display: block;
  margin: 9px 12px 0;
  padding: 0;
  font: 400 21px/25.2px Play, Arial, Helvetica, sans-serif;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox__price {
  display: block;
  margin: 0 12px 12px;
  padding: 0;
  font: 700 24px/28.8px Play, Arial, Helvetica, sans-serif;
  color: #fff;
}

/* Кластер */
.mhym-cluster {
  width: 70px;
  height: 70px;
  position: relative;
  margin: -35px 0 0 -35px;
}

.mhym-cluster-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mhym-cluster-svg circle {
  fill: rgba(102, 102, 102, 0.9);
}

.mhym-cluster-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 700 11px Arial, sans-serif;
  pointer-events: none;
}

/* Loader */
.mhym-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 227, 223, 0.4);
  pointer-events: none;
}

/* Сообщение Объекты не найдены */
.mhym-empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000000;
  padding: 14px 22px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  white-space: nowrap;
}

/* Дополнительные корректировки для старого балуна */
ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox .mh-map-infobox__img-wrapper img {
  top: 0;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox .mh-map-infobox__img-wrapper {
  height: 201px;
}

ymaps .mh-map-infobox .mh-map-infobox__img-wrapper {
  height: 118px;
}


ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) [class*="-balloon__close"]+[class*="-balloon__content"] {
  margin-right: 0 !important;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) [class*="-balloon__close-button"] {
  background: url('../img/close.png') !important;
  height: 30px !important;
  opacity: 1 !important;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) .mh-map-infobox {
  padding: 13px 0 0;
  margin-top: 0;
}

ymaps[class*="-balloon"]:not(:has([class*="-b-cluster-carousel"])) [class*="-balloon__tail"] {
  left: 51px !important;
  width: 6px !important;
  height: 13px !important;
}

/* Кнопка управления картой */
[class*="-float-button"]:has([class*="-float-button-icon_icon_expand"]) {
  display: none !important;
}

/* ── Suggest dropdown (фронт-форма /panel/#/submit-property) ──
   Используется в panel-form.js — выпадающий список результатов
   ymaps.geocode под полем "Введите местоположение". */
.mhym-suggest-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100001;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

.mhym-suggest-item {
  padding: 10px 14px;
  font-size: 14px;
  color: #1d2327;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f1;
  transition: background-color 0.15s;
}

.mhym-suggest-item:last-child {
  border-bottom: none;
}

.mhym-suggest-item:hover {
  background-color: #f0f7ff;
}

.mhym-suggest-empty {
  color: #646970;
  font-style: italic;
  cursor: default;
}

.mhym-suggest-empty:hover {
  background-color: transparent;
}

.mh-search-horizontal {
  position: relative;
  z-index: 999999 !important;
}

.bootstrap-select.btn-group.bs-container .dropdown-menu {
  z-index: 9999999;
}

body #tech_menu {
    z-index: 999999;
}

body .b24-overlay {
	z-index: 999999;
}
	
body .b24-widget-button-wrapper {
	z-index: 999999;
}
    