/* Лес Любви — карта */
.forest-map { width: 100%; min-height: 200px; background: #e5eee3; z-index: 0; }

/* Полноэкранная карта */
.map-layout { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.map-layout__header { position: absolute; top: 0; left: 0; right: 0; z-index: 1100; }
.site-header--overlay { background: linear-gradient(180deg, rgba(35,79,43,.95), rgba(35,79,43,.75)); backdrop-filter: blur(4px); }
.map-layout__flash { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 1100; width: min(560px, 92vw); }
.map-page { position: relative; width: 100%; height: 100%; }
.map-page__map { position: absolute; inset: 0; height: 100%; }

.map-filters { position: absolute; top: 72px; right: 12px; z-index: 1000; max-width: 320px; }
.map-legend { position: absolute; bottom: 28px; left: 12px; z-index: 1000; }
.map-legend img { vertical-align: -3px; }
.map-status { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 1000; background: rgba(255,255,255,.95); border-radius: 1rem; padding: .25rem .75rem; box-shadow: 0 1px 4px rgba(0,0,0,.2); }

/* Боковая панель карточки дерева */
.tree-panel { position: absolute; top: 72px; left: 12px; max-height: calc(100% - 180px); width: 340px; z-index: 1050; background: #fff; border-radius: .5rem; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.2); overflow-y: auto; padding: 1rem; }
.tree-panel__close { position: absolute; top: .5rem; right: .5rem; }
.tree-popup__photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

@media (max-width: 767.98px) {
    .map-filters { top: auto; bottom: 12px; right: 12px; left: 12px; max-width: none; }
    .map-legend { display: none; }
    .tree-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 65vh; border-radius: 1rem 1rem 0 0; }
}

/* Маркеры и кластеры */
.marker-named { filter: drop-shadow(0 0 4px rgba(224,161,0,.8)); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(47,107,58,.25); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: rgba(47,107,58,.85); color: #fff; font-weight: 600; }
.marker-cluster--named div { box-shadow: 0 0 0 3px var(--named, #e0a100); }

/* Кнопка геолокации */
.map-locate { width: 34px; height: 34px; line-height: 34px; text-align: center; background: #fff; font-size: 18px; color: #333; }
.map-locate.is-loading i { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; width: min(520px, 92vw); }

/* Баннеры поверх карты */
.map-banner { position: absolute; z-index: 1040; max-width: min(728px, 92vw); box-shadow: 0 .25rem 1rem rgba(0,0,0,.25); border-radius: .5rem; overflow: hidden; background: #fff; }
.map-banner__img { display: block; max-width: 100%; height: auto; max-height: 120px; }
.map-banner__label { position: absolute; left: 6px; bottom: 4px; font-size: 10px; color: #fff; background: rgba(0,0,0,.45); padding: 0 4px; border-radius: 3px; }
.map-banner__close { position: absolute; top: 2px; right: 2px; border: 0; background: rgba(0,0,0,.45); color: #fff; border-radius: 50%; width: 22px; height: 22px; line-height: 1; padding: 0; }
.map-banner--top { top: 72px; left: 50%; transform: translateX(-50%); }
.map-banner--bottom { bottom: 28px; left: 50%; transform: translateX(-50%); }
.map-banner--top-left { top: 72px; left: 60px; }
.map-banner--top-right { top: 140px; right: 12px; }
.map-banner--bottom-left { bottom: 120px; left: 12px; }
.map-banner--bottom-right { bottom: 28px; right: 12px; }
@media (max-width: 767.98px) {
    .map-banner--top-right, .map-banner--top-left, .map-banner--top { top: 64px; left: 8px; right: 8px; transform: none; }
    .map-banner--bottom, .map-banner--bottom-left, .map-banner--bottom-right { bottom: 112px; left: 8px; right: 8px; transform: none; }
}

/* Элементы управления Leaflet под шапкой */
.map-layout .leaflet-top { top: 60px; }
