.aem-map-block {
	--aem-paper: #f3f1eb;
	--aem-paper-solid: #f8f7f3;
	--aem-ink: var(--wp--preset--color--base, #131313);
	--aem-muted: var(--wp--preset--color--accent-3, #6a6c6e);
	--aem-line: var(--wp--preset--color--accent-6, #c7c3b8);
	--aem-red: var(--wp--preset--color--accent-1, #dd0000);
	--aem-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	--aem-max-width: 1320px;
	--aem-side-inset: 0px;
	--aem-vertical-spacing: 80px;
	position: relative;
	box-sizing: border-box;
	width: 100% !important;
	max-width: none !important;
	margin-top: var(--aem-vertical-spacing) !important;
	margin-right: auto !important;
	margin-bottom: var(--aem-vertical-spacing) !important;
	margin-left: auto !important;
	border-top: 1px solid var(--aem-ink);
	border-bottom: 1px solid var(--aem-ink);
	background: transparent;
	color: var(--aem-ink);
	font-family: var(--aem-mono);
	font-size: 14px;
	line-height: 1.3;
}

.aem-map-block.is-surface-paper { background: var(--aem-paper); }

.aem-map-block.is-width-custom {
	width: calc(100% - var(--aem-side-inset) - var(--aem-side-inset)) !important;
	max-width: var(--aem-max-width) !important;
}

.aem-map-block.is-width-full {
	width: 100vw !important;
	max-width: none !important;
	margin-right: calc(50% - 50vw) !important;
	margin-left: calc(50% - 50vw) !important;
}

.aem-map-block *,
.aem-map-block *::before,
.aem-map-block *::after { box-sizing: border-box; }
.aem-map-block [hidden] { display: none !important; }
body.aem-map-is-expanded { overflow: hidden; }

.aem-map-header {
	display: flex;
	min-height: 88px;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 14px 0;
}

.aem-section-label,
.aem-eyebrow {
	display: block;
	margin: 0;
	color: var(--aem-muted);
	font-family: var(--aem-mono);
	font-size: 9px;
	line-height: 1.4;
	letter-spacing: .11em;
	text-transform: uppercase;
}

.aem-map-heading h2 {
	margin: 5px 0 0;
	font-family: var(--aem-mono);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: -.01em;
	line-height: 1.25;
	text-transform: uppercase;
}

.aem-map-actions { display: flex; align-items: center; gap: 8px; }
.aem-mode-switch { display: flex; align-items: stretch; border: 1px solid var(--aem-ink); background: var(--aem-paper-solid); }

.aem-mode-button,
.aem-tool-button {
	min-height: 36px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--aem-ink);
	cursor: pointer;
	font-family: var(--aem-mono);
	font-size: 9px;
	font-weight: 400;
	letter-spacing: .08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.aem-mode-button { padding: 9px 13px; color: var(--aem-muted); }
.aem-mode-button + .aem-mode-button { border-left: 1px solid var(--aem-line); }
.aem-mode-button.is-active { background: var(--aem-ink); color: #fff; }
.aem-mode-button:focus-visible,
.aem-tool-button:focus-visible,
.aem-icon-button:focus-visible,
.aem-sequence-button:focus-visible { outline: 2px solid var(--aem-red); outline-offset: 2px; }

.aem-tool-button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 11px;
	border: 1px solid var(--aem-ink);
	background: var(--aem-paper-solid);
}

.aem-tool-button:hover { background: #fff; }
.aem-tool-button:disabled { cursor: not-allowed; opacity: .42; }
.aem-tool-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.aem-map-shell {
	position: relative;
	height: clamp(470px, 62vw, 680px);
	min-height: 470px;
	overflow: hidden;
	border: 1px solid var(--aem-ink);
	background: #e6e3dc;
}

.aem-map-block.is-height-compact .aem-map-shell { height: clamp(390px, 48vw, 520px); min-height: 390px; }
.aem-map-block.is-height-immersive .aem-map-shell { height: min(78vh, 860px); min-height: 600px; }
.aem-map-canvas { position: absolute; inset: 0; background: #e6e3dc; }

.aem-map-block.is-expanded {
	position: fixed;
	z-index: 999999;
	inset: 0;
	width: 100vw !important;
	max-width: none !important;
	height: 100dvh;
	margin: 0 !important;
	border: 0;
	background: var(--aem-paper);
}

.aem-map-block.is-expanded .aem-map-header { height: 78px; padding: 12px 20px; border-bottom: 1px solid var(--aem-ink); }
.aem-map-block.is-expanded .aem-map-shell { height: calc(100dvh - 124px); min-height: 0; border: 0; }
.aem-map-block.is-expanded .aem-map-footer { height: 46px; padding: 0 20px; }

.aem-loading,
.aem-zoom-cue {
	position: absolute;
	z-index: 5;
	left: 18px;
	bottom: 18px;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 10px 12px;
	border: 1px solid rgba(19,19,19,.42);
	background: rgba(248,247,243,.94);
	box-shadow: 0 5px 18px rgba(19,19,19,.08);
	font-family: var(--aem-mono);
	font-size: 9px;
	letter-spacing: .08em;
	line-height: 1.25;
	text-transform: uppercase;
}

.aem-precise-point { flex: 0 0 auto; width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; background: var(--aem-red); box-shadow: 0 0 0 1px var(--aem-red); }

.aem-empty {
	position: absolute;
	z-index: 6;
	inset: 50% auto auto 50%;
	display: grid;
	width: min(520px, calc(100% - 40px));
	transform: translate(-50%, -50%);
	gap: 8px;
	padding: 24px;
	border: 1px solid var(--aem-ink);
	background: var(--aem-paper-solid);
	text-align: center;
}

.aem-empty strong { font-size: 13px; font-weight: 400; text-transform: uppercase; }
.aem-empty span { color: var(--aem-muted); font-size: 10px; line-height: 1.5; }

.aem-legend {
	position: absolute;
	z-index: 5;
	right: 72px;
	bottom: 18px;
	display: flex;
	gap: 16px;
	padding: 7px 9px;
	background: rgba(248,247,243,.86);
	color: #505050;
	font-family: var(--aem-mono);
	font-size: 8px;
	letter-spacing: .08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.aem-legend span { display: flex; align-items: center; gap: 6px; }
.aem-legend i { display: inline-block; }
.aem-legend-cluster { width: 13px; height: 13px; border: 1px solid #fff; border-radius: 50%; background: var(--aem-red); box-shadow: 0 0 0 1px var(--aem-ink); }
.aem-legend-photo { position: relative; width: 17px; height: 12px; border: 1px solid var(--aem-ink); background: #fff; }
.aem-legend-photo::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 5px; background: var(--aem-ink); }

.aem-photo-marker {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 66px;
	height: 68px;
	margin: 0 !important;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}

.aem-photo-marker-card {
	position: absolute;
	z-index: 2;
	top: 0;
	left: 50%;
	width: 60px;
	height: 45px;
	transform: translateX(-50%);
	border: 3px solid rgba(255,255,255,.98);
	outline: 1px solid rgba(19,19,19,.72);
	background: #fff;
	box-shadow: 0 5px 12px rgba(19,19,19,.28);
	transition: width 150ms ease, height 150ms ease, top 150ms ease, box-shadow 150ms ease;
}

.aem-photo-marker:hover .aem-photo-marker-card,
.aem-photo-marker:focus-visible .aem-photo-marker-card,
.aem-photo-marker.is-selected .aem-photo-marker-card {
	top: -7px;
	width: 74px;
	height: 55px;
	box-shadow: 0 8px 20px rgba(19,19,19,.34);
}

.aem-photo-marker:focus-visible { outline: 2px solid var(--aem-red); outline-offset: 3px; }
.aem-photo-marker-card img { width: 100%; height: 100%; display: block; object-fit: cover; }

.aem-photo-marker-stem {
	position: absolute;
	z-index: 1;
	left: 50%;
	bottom: 6px;
	width: 1px;
	height: 19px;
	transform: translateX(-50%);
	background: var(--aem-ink);
	box-shadow: 0 0 0 1px rgba(255,255,255,.65);
}

.aem-photo-marker-point {
	position: absolute;
	z-index: 3;
	left: 50%;
	bottom: 0;
	width: 8px;
	height: 8px;
	transform: translateX(-50%);
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--aem-red);
	box-shadow: 0 0 0 1px var(--aem-ink);
}

.aem-photo-marker.is-selected .aem-photo-marker-point { width: 10px; height: 10px; box-shadow: 0 0 0 2px var(--aem-red), 0 0 0 4px #fff; }

.aem-marker-count {
	position: absolute;
	z-index: 3;
	top: -10px;
	right: -10px;
	display: grid;
	min-width: 22px;
	height: 22px;
	place-items: center;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--aem-red);
	color: white;
	font-family: var(--aem-mono);
	font-size: 9px;
	font-weight: 600;
}

.aem-location-tray,
.aem-follow-card {
	position: absolute;
	z-index: 8;
	left: 18px;
	bottom: 58px;
	border: 1px solid var(--aem-ink);
	background: rgba(248,247,243,.97);
	box-shadow: 8px 8px 0 rgba(19,19,19,.14);
}

.aem-location-tray { width: min(470px, calc(100% - 36px)); padding: 17px; }
.aem-tray-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.aem-tray-heading h3,
.aem-follow-copy h3 { margin: 4px 0 0; font-family: var(--aem-mono); font-size: 15px; font-weight: 400; line-height: 1.2; text-transform: uppercase; }
.aem-tray-coordinates { margin: 6px 0 0; color: var(--aem-muted); font-family: var(--aem-mono); font-size: 9px; letter-spacing: .03em; }

.aem-icon-button,
.aem-sequence-button { display: grid; place-items: center; border: 1px solid var(--aem-ink); border-radius: 0; background: var(--aem-paper-solid); color: var(--aem-ink); cursor: pointer; font-family: var(--aem-mono); }
.aem-icon-button { width: 30px; height: 30px; font-size: 18px; line-height: 1; }
.aem-tray-list { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.aem-tray-photo { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--aem-ink); text-align: left; cursor: pointer; }
.aem-tray-photo img { width: 132px; height: 88px; display: block; object-fit: cover; border: 1px solid var(--aem-ink); }
.aem-tray-photo span { display: block; margin-top: 7px; color: var(--aem-muted); font-family: var(--aem-mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }

.aem-follow-card { display: grid; grid-template-columns: 150px minmax(180px, 1fr) auto; align-items: center; width: min(600px, calc(100% - 36px)); min-height: 112px; }
.aem-follow-image-button { align-self: stretch; min-height: 112px; padding: 0; border: 0; border-right: 1px solid var(--aem-ink); border-radius: 0; background: var(--aem-ink); cursor: pointer; }
.aem-follow-image-button img { width: 100%; height: 100%; display: block; object-fit: cover; }
.aem-follow-copy { padding: 15px 18px; }
.aem-follow-copy p { margin: 6px 0 0; color: var(--aem-muted); font-family: var(--aem-mono); font-size: 9px; }
.aem-follow-controls { display: flex; gap: 7px; padding-right: 16px; }
.aem-sequence-button { width: 36px; height: 36px; font-size: 15px; }

.aem-map-footer { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 30px; font-family: var(--aem-mono); font-size: 9px; letter-spacing: .05em; line-height: 1.45; }
.aem-map-footer p { max-width: 760px; margin: 0; color: var(--aem-muted); }
.aem-map-footer > span { text-transform: uppercase; white-space: nowrap; }

.aem-map-block .maplibregl-ctrl-bottom-right { right: 10px; bottom: 10px; }
.aem-map-block .maplibregl-ctrl-attrib { background: rgba(248,247,243,.9) !important; color: #505050; font-family: var(--aem-mono); }
.aem-map-block .maplibregl-ctrl-attrib a { color: #333; }
.aem-map-block .maplibregl-ctrl-group { border: 1px solid rgba(19,19,19,.45); border-radius: 0; background: rgba(248,247,243,.94); box-shadow: none; }
.aem-map-block .maplibregl-ctrl-group button + button { border-top-color: rgba(19,19,19,.25); }

.aeg-lightbox-map-link[data-aem-map-link="true"] {
	display: inline-flex !important;
	align-items: center;
	gap: 7px;
}

.aem-lightbox-target {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border: 1px solid #dd0000;
	border-radius: 50%;
}

.aem-lightbox-target::before,
.aem-lightbox-target::after {
	position: absolute;
	top: 50%;
	left: 50%;
	background: #dd0000;
	content: "";
	transform: translate(-50%, -50%);
}

.aem-lightbox-target::before { width: 14px; height: 1px; }
.aem-lightbox-target::after { width: 1px; height: 14px; }

@media (max-width: 1000px) {
	.aem-map-header { align-items: flex-start; flex-direction: column; padding: 15px 0; }
	.aem-map-actions { width: 100%; flex-wrap: wrap; }
	.aem-map-block.is-expanded .aem-map-header { height: auto; min-height: 112px; }
	.aem-map-block.is-expanded .aem-map-shell { height: calc(100dvh - 158px); }
}

@media (max-width: 700px) {
	.aem-map-block.is-width-custom { width: calc(100% - min(var(--aem-side-inset), 20px) - min(var(--aem-side-inset), 20px)) !important; }
	.aem-map-actions { display: grid; grid-template-columns: 1fr auto auto; }
	.aem-mode-switch { grid-column: 1 / -1; }
	.aem-mode-button { flex: 1; }
	.aem-tool-button span { display: none; }
	.aem-map-shell,
	.aem-map-block.is-height-compact .aem-map-shell,
	.aem-map-block.is-height-immersive .aem-map-shell { height: 540px; min-height: 460px; }
	.aem-legend { display: none; }
	.aem-loading,
	.aem-zoom-cue { right: 12px; bottom: 12px; left: 12px; justify-content: center; }
	.aem-follow-card { left: 10px; bottom: 56px; grid-template-columns: 92px minmax(0, 1fr); width: calc(100% - 20px); }
	.aem-follow-image-button { min-height: 100px; }
	.aem-follow-copy { padding: 12px; }
	.aem-follow-copy h3 { font-size: 13px; }
	.aem-follow-controls { grid-column: 1 / -1; justify-content: flex-end; padding: 0 12px 12px; }
	.aem-location-tray { left: 10px; bottom: 56px; width: calc(100% - 20px); }
	.aem-map-footer { align-items: flex-start; padding: 12px 0; flex-direction: column; gap: 8px; }
	.aem-map-block.is-expanded .aem-map-header { min-height: 130px; padding: 10px 12px; }
	.aem-map-block.is-expanded .aem-map-shell { height: calc(100dvh - 130px); }
	.aem-map-block.is-expanded .aem-map-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.aem-map-block *,
	.aem-map-block *::before,
	.aem-map-block *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

