/* ==========================================================================
   ACF Dual Project Maps — acf-project-maps.css
   ========================================================================== */

/* ── Elementor container fix ──────────────────────────────────────────────── */
.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container,
.elementor-widget-shortcode .elementor-shortcode {
	width: 100%;
	display: block;
	align-self: stretch;
}

/* ── Layout: two maps edge-to-edge, 50/50 ────────────────────────────────── */
.apm-wrapper {
	display: flex;
	gap: 0;
	width: 100%;
	box-sizing: border-box;
}

.apm-map-col {
	flex: 1 1 50%;
	min-width: 0;
	position: relative;
}

/* 5px dark blue divider split across both maps */
.apm-map-col:first-child {
	border-right: 5px solid #1d2b4e;
}
.apm-map-col:last-child {
	border-left: 5px solid #1d2b4e;
}

/* Remove divider when stacked on mobile */
@media (max-width: 768px) {
	.apm-map-col:first-child {
		border-right: none;
	}
	.apm-map-col:last-child {
		border-left: none;
	}
}

/* Stack vertically on mobile */
@media (max-width: 768px) {
	.apm-wrapper {
		flex-direction: column;
	}
	.apm-map-col {
		width: 100%;
	}
	.apm-map {
		height: 100vw !important;
		aspect-ratio: unset;
	}
}

/* ── Map canvas: 4:3 aspect ratio ────────────────────────────────────────── */
.apm-map {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	background: #1d2b4e;
}

/* ── Zoom controls: black background, white +/- ─────────────────────────── */
.apm-map .gmnoprint {
	top: 12px !important;
	left: 12px !important;
}

.apm-map .gm-svpc,
.apm-map .gm-bundled-control-on-bottom {
	display: none !important;
}

.apm-map .gm-control-active {
	background-color: #000000 !important;
	border-radius: 2px !important;
}

.apm-map button.gm-control-active img,
.apm-map button.gm-control-active svg {
	filter: brightness(0) invert(1) !important;
}

/* Remove divider between + and - buttons, scoped to zoom control only */
.apm-map .gm-bundled-control .gmnoprint > div {
	background-color: #000000 !important;
}
.apm-map .gm-bundled-control .gmnoprint > div > div {
	background-color: #000000 !important;
	border: none !important;
	box-shadow: none !important;
}

/* Copyright and terms — transparent background, white text */
.apm-map .gm-style-cc,
.apm-map .gm-style-cc div,
.apm-map .gm-style-cc span,
.apm-map .gm-style-cc a,
.apm-map a[href^="https://maps.google.com"],
.apm-map a[href^="https://www.google.com/maps"] {
	background: transparent !important;
	background-color: transparent !important;
	color: #ffffff !important;
}

/* Hide keyboard shortcuts button */
.apm-map a[href="https://maps.google.com/intl/en_us/help/maps/hiddenmaps/"],
.apm-map a[href*="keyboard"],
.apm-map button[aria-label="Keyboard shortcuts"] {
	display: none !important;
}

/* ── Mobile: prevent Google capping map heights ──────────────────────────── */
@media (max-width: 600px) {
	.apm-map .gm-style .gm-style-iw-c { max-height: none !important; }
	.apm-map .gm-style .gm-style-iw-d { max-height: none !important; overflow: visible !important; }
	.apm-map .gm-style-iw              { max-height: none !important; }
}

/* ── Balloon marker ───────────────────────────────────────────────────────── */

/*
 * Layout (top to bottom):
 *
 *  ┌──────────────────┐
 *  │  50×50 thumbnail │  ← 2px white border, rounded corners
 *  └──────────────────┘
 *    Google-style balloon SVG (teardrop with circular hole)
 *    tip of balloon = lat/lng anchor point
 */

.apm-balloon-wrap {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* ── Thumbnail ── */
.apm-balloon-thumb {
	width: 50px;
	height: 50px;
	border: 2px solid #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	flex-shrink: 0;
	background: #af1062;
}

.apm-balloon-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Balloon SVG pin ── */
.apm-balloon-pin {
	display: block;
	flex-shrink: 0;
	/* sizing set on the SVG element itself */
}

/* ── Map style toggle ─────────────────────────────────────────────────────── */
.apm-style-toggle {
	display: flex;
	margin: 8px 8px 0 0;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	border-radius: 2px;
	overflow: hidden;
}

.apm-style-btn {
	background: #ffffff !important;
	background-color: #ffffff !important;
	border: none !important;
	border-left: 1px solid #e0e0e0 !important;
	padding: 0 6px !important;
	height: 22px !important;
	font-size: 10px !important;
	font-weight: 500 !important;
	color: #555555 !important;
	cursor: pointer !important;
	line-height: 22px !important;
	white-space: nowrap !important;
	min-width: 0 !important;
	min-height: 0 !important;
	border-radius: 0 !important;
	transition: background 0.15s !important;
}

.apm-style-btn:first-child {
	border-left: none !important;
}

.apm-style-btn:hover {
	background: #f5f5f5 !important;
	background-color: #f5f5f5 !important;
}

.apm-style-btn--active {
	background: #1d2b4e !important;
	background-color: #1d2b4e !important;
	color: #ffffff !important;
}

.apm-style-btn--active:hover {
	background: #1d2b4e !important;
	background-color: #1d2b4e !important;
}
