/*
 * Homesite map popup + its map-only frame (inc/homesite-map.php, templates/map-embed.php).
 */

/* Popup (Clear Pop `homesite-map`, fullscreen 96vw x 96vh, no padding): the frame fills it. */
.hsp-popup-overlay[data-popup-slug="homesite-map"] .hsp-popup-container { overflow: hidden; }
.gw-map-pop { width: 100%; height: 96vh; height: 96dvh; background: var(--gw-surface-page); }
.gw-map-pop__frame { display: block; width: 100%; height: 100%; border: 0; }

/* Map-only frame */
body.gw-map-embed { margin: 0 !important; padding: 0 !important; background: var(--gw-surface-page); overflow-x: hidden; }
.gw-map-embed__main { display: block; }
.gw-map-embed .gw-place-map { padding: 0; }
@media (min-width: 1000px) {
  .gw-map-embed .gw-place-map, .gw-map-embed .gw-place-map__map { --gw-map-h: 100vh; --gw-map-h: 100dvh; }
  .gw-map-embed .gw-place-map__map .clear-map-3-container { height: var(--gw-map-h) !important; }
  .gw-map-embed .gw-map-legend { right: 84px; } /* clear of the popup's close button (top right) */
}
@media (max-width: 999px) {
  .gw-map-embed .gw-place-map { padding-top: 64px; } /* room for the popup's close button above the switch */
  .gw-map-embed .gw-place-map__map .clear-map-3-container { min-height: 70vh; }
  .gw-map-embed .gw-place-map__side { padding-bottom: var(--gw-space-6); }
}

/* Close (Danny: more visible): a solid green 46 px circle with a cream x and a soft shadow, the header buttons' size,
   so it reads over the map and over the cream panel alike. Clear Pop prints the colour inline (hence !important). */
body .hsp-popup-overlay[data-popup-slug="homesite-map"] .hsp-popup-close { top: 16px; right: 16px; width: 46px !important; height: 46px !important; border-radius: 50% !important; background: var(--gw-green-700) !important; color: var(--gw-cream-100) !important; box-shadow: 0 6px 18px -4px rgba(1, 46, 43, 0.55), 0 0 0 2px rgba(255, 251, 246, 0.9); transition: background var(--gw-dur) var(--gw-ease), color var(--gw-dur) var(--gw-ease), transform 0.2s ease; }
body .hsp-popup-overlay[data-popup-slug="homesite-map"] .hsp-popup-close svg { width: 22px; height: 22px; }
body .hsp-popup-overlay[data-popup-slug="homesite-map"] .hsp-popup-close svg path { stroke-width: 2.4; }
body .hsp-popup-overlay[data-popup-slug="homesite-map"] .hsp-popup-close:hover { background: var(--gw-teal-500) !important; color: var(--gw-green-900) !important; }
body .hsp-popup-overlay[data-popup-slug="homesite-map"] .hsp-popup-close:focus-visible { outline: 2px solid var(--gw-citron-400); outline-offset: 3px; }
