.icms-map-editor{--map-green:#008249;--map-dark:#31312f}.icms-map-editor__toolbar{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;margin-bottom:.5rem}.icms-map-editor__upload{max-width:440px;flex:1 1 280px}.icms-map-editor__stage{position:relative;width:100%;min-height:280px;background:#eef2ef;border:1px solid #dce8e1;border-radius:16px;overflow:hidden;touch-action:none;user-select:none}.icms-map-editor__stage.is-empty{display:flex;align-items:center;justify-content:center}.icms-map-editor__empty{display:none;color:#7d817c}.icms-map-editor__stage.is-empty .icms-map-editor__empty{display:block}.icms-map-editor__stage.is-empty .icms-map-editor__image{display:none}.icms-map-editor__image{display:block;width:100%;height:auto}.icms-map-editor__points{position:absolute;inset:0}.icms-map-editor__point{position:absolute;left:var(--map-x);top:var(--map-y);transform:translate(-50%,-50%);width:24px;height:24px;border:3px solid var(--map-green);border-radius:50%;background:#fff;box-shadow:0 4px 14px rgba(0,95,52,.22);cursor:grab;z-index:2;padding:0}.icms-map-editor__point:active{cursor:grabbing}.icms-map-editor__point.is-selected{box-shadow:0 0 0 6px rgba(0,130,73,.18)}.icms-map-editor__point--label{width:auto;min-width:70px;height:auto;min-height:30px;padding:4px 10px;border-radius:999px;font-size:12px;white-space:nowrap;color:var(--map-dark)}.icms-map-editor__panel{margin-top:1rem;padding:1rem;border:1px solid #dce8e1;border-radius:14px;background:#fff}.icms-map-editor__panel-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem}
.icms-interactive-map{position:relative;width:100%}.icms-interactive-map__stage{position:relative;width:100%;overflow:hidden;border-radius:18px;background:#eef2ef}.icms-interactive-map__image{display:block;width:100%;height:100%;object-fit:contain}.icms-interactive-map__point{position:absolute;left:var(--map-x);top:var(--map-y);transform:translate(-50%,-50%);width:20px;height:20px;border:3px solid #008249;border-radius:50%;background:#fff;box-shadow:0 4px 14px rgba(0,95,52,.22);cursor:pointer;z-index:2;padding:0}.icms-interactive-map__point:hover,.icms-interactive-map__point:focus-visible{box-shadow:0 0 0 6px rgba(0,130,73,.18)}.icms-interactive-map__point--label{width:auto;height:auto;min-height:30px;padding:4px 10px;border-radius:999px;color:#31312f;font-size:12px;white-space:nowrap}.icms-interactive-map__popup{position:fixed;z-index:1100;width:min(320px,calc(100vw - 24px));padding:18px;background:#fff;border:1px solid #dce8e1;border-radius:14px;box-shadow:0 18px 44px rgba(0,95,52,.18)}.icms-interactive-map__close{position:absolute;right:8px;top:8px;width:30px;height:30px;border:0;border-radius:50%;background:#e8f5ee;color:#006e3b;font-size:21px;line-height:1}.icms-interactive-map__title{padding-right:28px;margin:0 0 8px;font-size:20px}.icms-interactive-map__description{color:#595b57;line-height:1.5}.icms-interactive-map__link{display:inline-block;margin-top:12px;color:#006e3b;font-weight:600}@media(max-width:575.98px){.icms-map-editor__stage{min-height:200px}.icms-interactive-map__stage{border-radius:12px}.icms-interactive-map__point{width:18px;height:18px}.icms-interactive-map__point--label{width:auto;height:auto;min-height:26px;font-size:10px;padding:3px 7px}}

/* v3: заголовок объекта отображается на карте как фирменная плашка */
.icms-map-editor__point--label,.icms-interactive-map__point--label{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;height:auto!important;min-width:0!important;max-width:min(220px,40vw)!important;min-height:30px!important;padding:4px 11px!important;border:2px solid #008249!important;border-radius:999px!important;background:#fff!important;color:#31312f!important;font-size:12px!important;font-weight:500!important;line-height:1.2!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;box-shadow:0 4px 14px rgba(0,95,52,.18)!important}
.icms-map-editor__point--label:hover,.icms-map-editor__point--label.is-selected,.icms-interactive-map__point--label:hover,.icms-interactive-map__point--label:focus-visible{box-shadow:0 0 0 5px rgba(0,130,73,.16),0 5px 16px rgba(0,95,52,.18)!important}
@media(max-width:575.98px){.icms-map-editor__point--label,.icms-interactive-map__point--label{max-width:42vw!important;min-height:25px!important;padding:3px 8px!important;font-size:10px!important}}


/* v4: редактируемый заголовок и описание над картой */
.icms-map-editor__intro-fields{margin:1rem 0 1.25rem;padding:1rem;border:1px solid #dce8e1;border-radius:14px;background:#fff}
.icms-map-editor__intro-fields .form-group:last-child{margin-bottom:0}
.icms-interactive-map__intro{margin-bottom:1.25rem}
.icms-interactive-map__intro-title{margin-bottom:.75rem!important}
.icms-interactive-map__intro-text{max-width:900px;margin-bottom:0!important}
@media(max-width:575.98px){.icms-map-editor__intro-fields{padding:.85rem}.icms-interactive-map__intro{margin-bottom:1rem}.icms-interactive-map__intro-title{font-size:20px!important}}


/* v5: popup всегда позиционируется относительно окна и вынесен в body */
body > .icms-interactive-map__popup{
    position:fixed!important;
    right:auto!important;
    bottom:auto!important;
    margin:0!important;
    transform:none!important;
    max-height:calc(100vh - 24px)!important;
    overflow:auto!important;
    box-sizing:border-box!important;
}
body > .icms-interactive-map__popup::after{
    content:"";
    position:absolute;
    left:var(--popup-arrow-x,50%);
    width:14px;
    height:14px;
    background:#fff;
    border-right:1px solid #dce8e1;
    border-bottom:1px solid #dce8e1;
    transform:translateX(-50%) rotate(45deg);
}
body > .icms-interactive-map__popup.is-above::after{
    bottom:-8px;
}
body > .icms-interactive-map__popup.is-below::after{
    top:-8px;
    transform:translateX(-50%) rotate(225deg);
}
@media(max-width:575.98px){
    body > .icms-interactive-map__popup{
        width:min(300px,calc(100vw - 20px))!important;
        padding:15px!important;
    }
}

/* v6: аккуратный popup без внутренней полосы прокрутки */
body > .icms-interactive-map__popup{
    width:min(380px,calc(100vw - 32px))!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    padding:22px 24px 20px!important;
    overflow:visible!important;
    border:1px solid #dce8e1!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 18px 48px rgba(0,95,52,.18)!important;
}
body > .icms-interactive-map__popup .icms-interactive-map__title{
    margin:0 34px 8px 0!important;
    padding:0!important;
    font-size:20px!important;
    line-height:1.25!important;
    font-weight:500!important;
    color:#31312f!important;
    overflow-wrap:anywhere!important;
}
body > .icms-interactive-map__popup .icms-interactive-map__description{
    margin:0!important;
    padding:0!important;
    max-height:none!important;
    overflow:visible!important;
    color:#595b57!important;
    font-size:15px!important;
    line-height:1.5!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
}
body > .icms-interactive-map__popup .icms-interactive-map__link{
    display:inline-flex!important;
    align-items:center!important;
    margin-top:14px!important;
    color:#006e3b!important;
    font-size:15px!important;
    line-height:1.25!important;
    font-weight:600!important;
    text-decoration:none!important;
}
body > .icms-interactive-map__popup .icms-interactive-map__link:hover{
    color:#009b59!important;
    text-decoration:none!important;
}
body > .icms-interactive-map__popup .icms-interactive-map__close{
    top:10px!important;
    right:10px!important;
    width:32px!important;
    height:32px!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:50%!important;
    background:#e8f5ee!important;
    color:#006e3b!important;
    font-size:20px!important;
    line-height:1!important;
    cursor:pointer!important;
}
body > .icms-interactive-map__popup .icms-interactive-map__close:hover{
    background:#d9eee2!important;
    color:#005f34!important;
}
@media(max-width:575.98px){
    body > .icms-interactive-map__popup{
        width:calc(100vw - 24px)!important;
        max-height:calc(100vh - 24px)!important;
        padding:18px 18px 17px!important;
        overflow-x:hidden!important;
        overflow-y:auto!important;
        border-radius:15px!important;
    }
    body > .icms-interactive-map__popup .icms-interactive-map__title{
        margin-right:32px!important;
        font-size:18px!important;
    }
    body > .icms-interactive-map__popup .icms-interactive-map__description,
    body > .icms-interactive-map__popup .icms-interactive-map__link{
        font-size:14px!important;
    }
}


/* v7: адаптивный popup — desktop возле точки, mobile как нижняя карточка */
@media (min-width:576px) and (max-width:991.98px){
    body > .icms-interactive-map__popup{
        width:min(360px,calc(100vw - 28px))!important;
        max-height:calc(100dvh - 28px)!important;
        padding:20px 22px 18px!important;
        overflow-x:hidden!important;
        overflow-y:auto!important;
        overscroll-behavior:contain!important;
    }
}

@media (max-width:575.98px){
    body > .icms-interactive-map__popup.is-mobile-sheet{
        position:fixed!important;
        left:12px!important;
        right:12px!important;
        top:auto!important;
        bottom:max(12px,env(safe-area-inset-bottom))!important;
        width:auto!important;
        height:auto!important;
        min-height:0!important;
        max-height:min(62dvh,460px)!important;
        margin:0!important;
        padding:17px 48px 16px 17px!important;
        overflow-x:hidden!important;
        overflow-y:auto!important;
        overscroll-behavior:contain!important;
        -webkit-overflow-scrolling:touch!important;
        border:1px solid #dce8e1!important;
        border-radius:17px!important;
        box-shadow:0 14px 42px rgba(0,95,52,.22)!important;
        transform:none!important;
        box-sizing:border-box!important;
        scrollbar-width:thin!important;
        scrollbar-color:rgba(0,110,59,.35) transparent!important;
    }

    body > .icms-interactive-map__popup.is-mobile-sheet::-webkit-scrollbar{
        width:4px!important;
    }
    body > .icms-interactive-map__popup.is-mobile-sheet::-webkit-scrollbar-track{
        background:transparent!important;
    }
    body > .icms-interactive-map__popup.is-mobile-sheet::-webkit-scrollbar-thumb{
        background:rgba(0,110,59,.32)!important;
        border-radius:999px!important;
    }

    body > .icms-interactive-map__popup.is-mobile-sheet::after{
        display:none!important;
    }

    body > .icms-interactive-map__popup.is-mobile-sheet .icms-interactive-map__title{
        margin:0 0 7px!important;
        padding:0!important;
        font-size:18px!important;
        line-height:1.25!important;
        font-weight:500!important;
    }

    body > .icms-interactive-map__popup.is-mobile-sheet .icms-interactive-map__description{
        margin:0!important;
        font-size:14px!important;
        line-height:1.45!important;
    }

    body > .icms-interactive-map__popup.is-mobile-sheet .icms-interactive-map__link{
        margin-top:11px!important;
        font-size:14px!important;
        line-height:1.25!important;
    }

    body > .icms-interactive-map__popup.is-mobile-sheet .icms-interactive-map__close{
        position:absolute!important;
        top:10px!important;
        right:10px!important;
        width:31px!important;
        height:31px!important;
        min-width:31px!important;
        min-height:31px!important;
    }
}

@media (max-width:374.98px){
    body > .icms-interactive-map__popup.is-mobile-sheet{
        left:8px!important;
        right:8px!important;
        bottom:max(8px,env(safe-area-inset-bottom))!important;
        max-height:min(66dvh,430px)!important;
        padding:15px 44px 14px 15px!important;
        border-radius:14px!important;
    }
    body > .icms-interactive-map__popup.is-mobile-sheet .icms-interactive-map__title{
        font-size:17px!important;
    }
    body > .icms-interactive-map__popup.is-mobile-sheet .icms-interactive-map__description,
    body > .icms-interactive-map__popup.is-mobile-sheet .icms-interactive-map__link{
        font-size:13px!important;
    }
}
