/**
* @package      CRE8 Social
* @copyright    Copyright (C) Creative Graphics. All rights reserved.
* @license      GNU/GPL, see LICENSE.php
*
* Hand-written styling for the "browse on map" clustered marker feature (media/scripts/geomap.js).
* Not sourced from a third-party package, so it lives here rather than media/styles/vendors/.
*/

.es-geomap {
	position: relative;
	width: 100%;
	height: var(--es-geomap-height, 400px);
}

.es-geomap-fullscreen-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1000;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: #fff;
	border: none;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	color: #333;
	cursor: pointer;
}

.es-geomap-fullscreen-btn svg {
	width: 18px;
	height: 18px;
}

/* Expands the map's own container (not its wrapper) over the full viewport. !important is needed
   here specifically because the standalone module already sets its own per-instance inline
   `height` style on this same element (see project memory) - normal specificity can't beat an
   inline style, so this is the one place in this stylesheet that legitimately needs it. */
.es-geomap--fullscreen {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	z-index: 999999 !important;
}

body.es-geomap-fullscreen-lock {
	overflow: hidden !important;
}

.es-geomap-cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15);
	cursor: pointer;
}

/* An unsplittable same-location stack (more than SPIDERFY_LIMIT items at one point, see
   geomap.js) reuses the cluster bubble look but in a different color - it opens a list on click
   instead of zooming, and looking identical to a normal cluster would be misleading. */
.es-geomap-cluster--stack {
	background: rgba(192, 57, 43, 0.85);
}

.es-geomap-popup {
	min-width: 160px;
}

.es-geomap-popup__thumb {
	display: block;
	width: 100%;
	height: 90px;
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 6px;
}

.es-geomap-popup__title a {
	font-weight: 600;
	text-decoration: none;
}

.es-geomap-stacklist {
	min-width: 200px;
	max-width: 260px;
}

.es-geomap-stacklist__count {
	font-weight: 600;
	font-size: 12px;
	margin-bottom: 6px;
}

.es-geomap-stacklist__scroll {
	max-height: 220px;
	overflow-y: auto;
}

.es-geomap-stacklist__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	text-decoration: none;
}

.es-geomap-stacklist__thumb {
	width: 32px;
	height: 32px;
	object-fit: cover;
	border-radius: 3px;
	flex: 0 0 auto;
	margin-bottom: 0;
}

.es-geomap-stacklist__item span {
	font-size: 13px;
	line-height: 1.3;
}

/* The theme's global img{} resets (max-width, opacity, object-fit, border-radius - meant for
   content thumbnails) bleed into Google's own map chrome (Street View pegman, control icons),
   which needs exact unscaled sprite dimensions to render. #es#es (double ID) matches the site's
   established trick for reliably beating style.min.css regardless of WAM stylesheet load order -
   see feedback_yootheme_element_css_keyframes / the CSS specificity note in project memory.
   :not(.es-geomap-popup__thumb) carves out our own popup thumbnail - it also lives inside
   .gm-style (Google's InfoWindow renders our popup content), so without the exclusion this same
   reset was clobbering its own object-fit/border-radius (forcing object-fit:fill, stretching the
   image) despite winning on specificity alone. .es-geomap-stacklist__thumb (the same-location
   stack popup's list thumbnails, also rendered inside a Google InfoWindow) needs the identical
   exclusion for the same reason. */
#es#es .es-geomap .gm-style img:not(.es-geomap-popup__thumb):not(.es-geomap-stacklist__thumb) {
	max-width: none;
	max-height: none;
	opacity: 1;
	border-radius: 0;
	-o-object-fit: fill;
	object-fit: fill;
}
