/* Native modal keeps the existing map loader and offer links intact. */
dialog.ems-map-dialog:not([open]){display:none!important}
dialog.ems-map-dialog[open]{display:flex;position:fixed;inset:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:24px;border:0;background:transparent;color:#344353;overflow:hidden;overscroll-behavior:contain}
dialog.ems-map-dialog::backdrop{background:rgba(30,42,52,.4);backdrop-filter:blur(3px)}
dialog.ems-map-dialog .yandex-map{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;box-sizing:border-box;width:min(1120px,100%);height:min(760px,100%);min-width:0;min-height:0;padding:0;border:1px solid #dfe6eb;border-radius:18px;background:#fff;color:#344353;box-shadow:0 24px 80px rgba(20,35,45,.22);overflow:hidden}
.ems-map-dialog .ems-map-header{display:flex;align-items:flex-start;gap:20px;flex-shrink:0;padding:20px 22px;border-bottom:1px solid #e4e9ed;background:#fff}
.ems-map-dialog .ems-map-heading{flex:1;min-width:0;padding:1px 0}
.ems-map-dialog [data-ems-map-organization]{margin:0;color:#2f4351;font-size:21px;font-weight:600;line-height:1.4;overflow-wrap:break-word}
.ems-map-dialog [data-ems-map-address]{margin:5px 0 0;color:#626f7b;font-size:14px;line-height:1.5;overflow-wrap:break-word}
dialog.ems-map-dialog .yandex-map .yandex-map-close-button{position:static;display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:1px solid #dce4e9;border-radius:10px;background:#f7f9fa;color:#4f6270;cursor:pointer}
.ems-map-dialog .ems-map-close svg{pointer-events:none}
dialog.ems-map-dialog .yandex-map .yandex-map-close-button:hover{border-color:#b9c9d2;background:#edf2f5;color:#2f4351}
.ems-map-dialog .ems-map-stage{position:relative;flex:1;min-width:0;min-height:0;background:#f3f6f7;overflow:hidden}
dialog.ems-map-dialog .yandex-map #map{width:100%;height:100%!important;min-height:0}
.ems-map-dialog .ems-map-status{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;box-sizing:border-box;margin:0;padding:28px;color:#526575;font-size:15px;line-height:1.65;text-align:center;overflow:auto}
.ems-map-dialog .ems-map-status[hidden],.ems-map-dialog [hidden]{display:none!important}
.ems-map-dialog .ems-map-status a{max-width:100%;color:#356b48;font-size:14px}
.ems-map-dialog .ems-map-footer{display:flex;justify-content:flex-end;align-items:center;flex-shrink:0;min-height:60px;padding:8px 20px;border-top:1px solid #e4e9ed;background:#fff}
.ems-map-dialog [data-ems-map-external]{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:8px 13px;border:1px solid #d6e1db;border-radius:8px;background:#fff;color:#356646;font-size:14px;line-height:1.5;text-decoration:none}
.ems-map-dialog [data-ems-map-external]:hover{border-color:#abc3b3;background:#f3f8f4;color:#235735}
.ems-map-dialog button:focus-visible,.ems-map-dialog a:focus-visible{outline:2px solid #527b65;outline-offset:3px}
@media(max-width:767.98px){
 dialog.ems-map-dialog[open]{padding:12px}
 dialog.ems-map-dialog .yandex-map{width:100%;height:100%;border-radius:14px}
 .ems-map-dialog .ems-map-header{gap:12px;padding:15px}
 .ems-map-dialog [data-ems-map-organization]{font-size:18px;line-height:1.4}
 .ems-map-dialog [data-ems-map-address]{font-size:13px}
 .ems-map-dialog .ems-map-footer{min-height:64px;padding:8px 12px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .ems-map-dialog [data-ems-map-external]{width:100%;font-size:14px}
}
@media(max-height:500px) and (min-width:768px){
 dialog.ems-map-dialog[open]{padding:12px}
 .ems-map-dialog .ems-map-header{padding:10px 16px}
 .ems-map-dialog [data-ems-map-organization]{font-size:18px}
 .ems-map-dialog .ems-map-footer{min-height:52px;padding:4px 12px}
}
