.hbs-siteplan {
	position: relative;
	width: 100%;
	overflow: visible;
}

.hbs-siteplan-stage {
	position: relative;
	width: 100%;
	overflow: visible;
	background: #f3f4f6;
}

.hbs-siteplan-image {
	display: block;
	width: 100%;
	height: auto;
}

.hbs-siteplan-shapes,
.hbs-siteplan-pins {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.hbs-siteplan-pins {
	pointer-events: none;
}

.hbs-siteplan-pin {
	position: absolute;
	z-index: 2;
	width: 15px;
	height: 15px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--hbs-item-color, #2563eb);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	pointer-events: auto;
	transform: translate(-50%, -50%);
	transition: transform 140ms ease, box-shadow 140ms ease;
}

.hbs-siteplan-pin::after {
	position: absolute;
	inset: 6px;
	border-radius: inherit;
	background: rgba(255, 255, 255, 0.88);
	content: "";
}

.hbs-siteplan-pin:hover,
.hbs-siteplan-pin:focus-visible {
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
	outline: none;
	transform: translate(-50%, -50%) scale(1.14);
}

.hbs-siteplan-shape {
	fill: var(--hbs-item-color, #2563eb);
	fill-opacity: 0.35;
	stroke: var(--hbs-item-color, #2563eb);
	stroke-width: 0.10;
	cursor: pointer;
	pointer-events: auto;
	transition: fill 140ms ease, stroke-width 140ms ease;
}

.hbs-siteplan-shape:hover,
.hbs-siteplan-shape:focus {
	fill-opacity: 0.48;
	outline: none;
	stroke-width: 0.15;
}

.hbs-siteplan-popup {
	position: absolute;
	z-index: 4;
	top: 50%;
	left: 50%;
	width: min(360px, calc(100% - 24px));
	padding: 14px;
	border: 1px solid rgba(17, 24, 39, 0.12);
	background: #fff;
	box-shadow: 0 12px 32px rgba(17, 24, 39, 0.22);
	color: #111827;
	font-size: 14px;
	line-height: 1.35;
	transform: translate(-50%, calc(-100% - 16px));
}

.hbs-siteplan-popup[hidden] {
	display: none;
}

.hbs-siteplan-popup::after {
	position: absolute;
	bottom: -8px;
	left: 50%;
	width: 16px;
	height: 16px;
	background: #fff;
	box-shadow: 1px 1px 0 rgba(17, 24, 39, 0.12);
	content: "";
	transform: translateX(-50%) rotate(45deg);
}

.hbs-siteplan-popup.is-right-edge {
	transform: translate(calc(-100% + 20px), calc(-100% - 16px));
}

.hbs-siteplan-popup.is-right-edge::after {
	left: calc(100% - 20px);
}

.hbs-siteplan-popup.is-bottom-edge {
	transform: translate(-50%, 18px);
}

.hbs-siteplan-popup.is-bottom-edge::after {
	top: -8px;
	bottom: auto;
	box-shadow: -1px -1px 0 rgba(17, 24, 39, 0.12);
}

.hbs-siteplan-popup.is-right-edge.is-bottom-edge {
	transform: translate(calc(-100% + 20px), 18px);
}

.hbs-popup-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: #fff;
	color: #4b5563;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
}

.hbs-popup-status {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	margin: 0 34px 8px 0;
	padding: 2px 8px;
	background: var(--hbs-item-color, #2563eb);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.hbs-popup-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 195px;
	margin: 0 0 12px;
	object-fit: cover;
}

.hbs-siteplan-popup h3 {
	margin: 0 28px 6px 0;
	color: inherit;
	font-size: 18px;
	line-height: 1.2;
}

.hbs-popup-address {
	margin: 0 0 10px;
	color: #4b5563;
}

.hbs-popup-details {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin: 0;
}

.hbs-popup-detail dt {
	margin: 0;
	color: #6b7280;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.hbs-popup-detail dd {
	margin: 2px 0 0;
	font-weight: 700;
}

.hbs-popup-manual-text {
	margin: 10px 0 0;
	white-space: pre-line;
}

.hbs-popup-link {
	display: inline-flex;
	margin-top: 12px;
	color: #1d4ed8;
	font-weight: 700;
	text-decoration: none;
}

.hbs-popup-link:hover,
.hbs-popup-link:focus {
	text-decoration: underline;
}

.hbs-siteplan-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-top: 14px;
}

.hbs-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	line-height: 1.2;
}

.hbs-legend-swatch {
	width: 14px;
	height: 14px;
	border: 1px solid rgba(17, 24, 39, 0.18);
	border-radius: 999px;
	background: var(--hbs-item-color, #2563eb);
}

@media (max-width: 640px) {
	.hbs-siteplan-pin {
		width: 20px;
		height: 20px;
	}

	.hbs-siteplan-popup,
	.hbs-siteplan-popup.is-right-edge,
	.hbs-siteplan-popup.is-bottom-edge,
	.hbs-siteplan-popup.is-right-edge.is-bottom-edge {
		left: 50% !important;
		width: calc(100% - 24px);
		transform: translate(-50%, 18px);
	}

	.hbs-siteplan-popup::after {
		display: none;
	}
}
