
.custom-map-block { position: relative; min-height: 420px; background: var(--am-placeholder, #e8e6e0); }
.custom-map-block:empty::after { content: "Map loading..."; position: absolute; inset: 0; display: grid; place-items: center; }


.sqs-block-map:not(.info-window-show-title) .info-marker-title:not(.title-only),
.sqs-block-map:not(.info-window-show-image) .info-marker-image,
.sqs-block-map:not(.info-window-show-location) .info-marker-location,
.sqs-block-map:not(.info-window-show-cats) .info-marker-cats,
.sqs-block-map:not(.info-window-show-tags) .info-marker-tags,
.sqs-block-map:not(.info-window-show-date) .info-marker-date,
.sqs-block-map:not(.info-window-show-excerpt) .info-marker-descr { display: none; }


.custom-map-block .gm-style { position: absolute; left: 0; top: 0; z-index: 700; }
.custom-map-block .gm-style-iw-t { position: absolute; left: 0; bottom: 44px; transform: translateX(-50%); }
.custom-map-block .gm-style-iw-c {
  position: relative; width: max-content; max-width: min(280px, 80vw); padding: 14px 36px 14px 14px;
  background: var(--am-iw-bg, #fff); color: var(--am-iw-fg, #111); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); border-radius: 8px;
}
.custom-map-block .gm-style-iw-c::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; background: inherit; transform: translateX(-50%) rotate(45deg);
}
.custom-map-block .gm-style-iw-c [data-info-close] { position: absolute; right: 2px; top: 2px; width: 32px; height: 32px; border: 0; background: transparent; color: inherit; font-size: 22px; cursor: pointer; }
.custom-maps-info-wrapper > div { margin: 0 0 6px; }
.info-marker-title { font-weight: 700; }
.info-marker-title a { color: inherit; }
.gm-style .info-back, .custom-maps-outside-markers-info[data-position="relative"] .info-back { display: none; }
.info-back { cursor: pointer; }
.info-marker-image img { display: block; width: 100%; max-width: 240px; aspect-ratio: 3 / 2; object-fit: cover; }


.custom-map-block .leaflet-marker-icon > span,
.custom-map-block [data-static-marker] {
  display: block; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--am-pin, #c0392b); border: 2px solid var(--am-pin-border, #fff); box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.custom-map-block .leaflet-marker-icon:focus-visible, .custom-map-block [data-static-marker]:focus-visible { outline: 3px solid var(--am-focus, #111); outline-offset: 2px; }
.custom-map-block .leaflet-marker-icon.marker-activated > span, .custom-map-block [data-static-marker].marker-activated { background: var(--am-pin-active, #111); }
.custom-map-block [data-static-marker] { position: absolute; margin: -36px 0 0 -14px; padding: 0; cursor: pointer; transform-origin: center; }
.custom-map-block[data-static-map] {
  background-image: linear-gradient(var(--am-grid, rgba(0, 0, 0, .08)) 1px, transparent 1px), linear-gradient(90deg, var(--am-grid, rgba(0, 0, 0, .08)) 1px, transparent 1px);
  background-size: 40px 40px;
}
.custom-map-block[data-static-map] .gm-style { left: auto; top: auto; }
.custom-map-block [data-static-note] { position: absolute; left: 8px; bottom: 4px; margin: 0; font-size: 12px; }


.custom-maps-outside-markers-info { position: relative; padding: 16px 44px 16px 16px; border: 1px solid currentColor; margin-top: 12px; }
.custom-maps-outside-markers-info[hidden] { display: none; }
.custom-maps-outside-markers-info .close-button { position: absolute; right: 8px; top: 8px; display: inline-grid; place-items: center; width: 32px; height: 32px; color: inherit; }
.custom-maps-outside-markers-info .outside-container { display: grid; gap: 16px; }
.custom-maps-outside-markers-info .outside-marker-info.marker-activated { outline: 2px solid currentColor; outline-offset: 4px; }

.custom-maps-outside-markers-info[data-position="relative"] { padding-right: 16px; }
.custom-maps-outside-markers-info[data-position="relative"] .close-button { display: none; }
.custom-maps-outside-markers-info[data-position="relative"] .outside-container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.custom-maps-outside-markers-info:not([data-position="relative"]).active-marker-info .outside-marker-info:not(.marker-activated) { display: none; }
