/* ============================================================
 * Interaktiver Lageplan — Pannonian Living
 * ============================================================ */

.custom-siteplan {
	width: 100%;
}

.custom-siteplan__stage {
	position: relative;
	width: 100%;
	border-radius: 8px;
	overflow: hidden;
	isolation: isolate;
}

.custom-siteplan__img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

/* Leichter Zoom sobald ein Punkt aktiv ist */
.custom-siteplan.is-focus .custom-siteplan__img {
	transform: scale(1.025);
}

/* Spotlight: flache Abdunklung, in die per Maske ein oder mehrere weiche
 * Löcher gestanzt werden. `mask-composite: intersect` sorgt dafür, dass die
 * Vereinigung aller Spots freigestellt bleibt (statt sich gegenseitig
 * abzudunkeln) — so funktioniert der Effekt auch bei Gruppen (z. B. 6 Häuser).
 * Die Masken-Ebenen werden in siteplan.js aus den Marker-Positionen gesetzt. */
.custom-siteplan__overlay {
	--spot-r: 190px;       /* Radius bei einem einzelnen Punkt   */
	--spot-r-multi: 130px; /* Radius je Punkt innerhalb Gruppen  */
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	background: rgba(18, 22, 29, 0.34);
	-webkit-mask-image: radial-gradient(circle var(--spot-r) at 50% 50%, transparent 0%, transparent 55%, #000 100%);
	mask-image: radial-gradient(circle var(--spot-r) at 50% 50%, transparent 0%, transparent 55%, #000 100%);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
	transition: opacity 0.55s ease;
	z-index: 1;
}

@media (max-width: 991px) {
	.custom-siteplan__overlay {
		--spot-r: 120px;
		--spot-r-multi: 90px;
	}
}

@media (max-width: 767px) {
	.custom-siteplan__overlay {
		--spot-r: 80px;
		--spot-r-multi: 62px;
	}
}

.custom-siteplan.is-spotlight .custom-siteplan__overlay {
	opacity: 1;
}

/* ---------- Marker ---------- */

.custom-siteplan__marker {
	position: absolute;
	left: var(--x);
	top: var(--y);
	transform: translate(-50%, -50%);
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	z-index: 2;
	-webkit-tap-highlight-color: transparent;
	/* Entrance (per IntersectionObserver getriggert) */
	opacity: 0;
	scale: 0.4;
	transition: opacity 0.5s ease, scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
	transition-delay: calc(var(--i, 0) * 70ms);
}

.custom-siteplan.is-inview .custom-siteplan__marker {
	opacity: 1;
	scale: 1;
}

.custom-siteplan__dot {
	position: absolute;
	inset: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid #12161d;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(18, 22, 29, 0.18);
	transition: background-color 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, opacity 0.3s ease;
}

.custom-siteplan__num {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 24px;
	translate: 0 -15%;
	line-height: 1;
	font-weight: 500;
	color: #12161d;
	transition: color 0.3s ease;
}

/* Radar-Ping im Ruhezustand — dezent, gestaffelt */
.custom-siteplan__ping {
	position: absolute;
	inset: 6px;
	border-radius: 50%;
	border: 1px solid rgba(18, 22, 29, 0.45);
	opacity: 0;
	pointer-events: none;
}

.custom-siteplan.is-inview .custom-siteplan__ping {
	animation: siteplan-ping 3.6s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
	animation-delay: calc(var(--i, 0) * 450ms);
}

@keyframes siteplan-ping {
	0%   { opacity: 0;   transform: scale(1); }
	8%   { opacity: 0.7; }
	38%  { opacity: 0;   transform: scale(2.1); }
	100% { opacity: 0;   transform: scale(2.1); }
}

/* ---------- Aktiv / Hover ---------- */

.custom-siteplan__marker.is-active .custom-siteplan__dot {
	background: #12161d;
	transform: scale(1.18);
	box-shadow: 0 6px 22px rgba(18, 22, 29, 0.38);
}

.custom-siteplan__marker.is-active .custom-siteplan__num {
	color: #ffffff;
}

.custom-siteplan__marker.is-active .custom-siteplan__ping {
	animation-play-state: paused;
	opacity: 0;
}

.custom-siteplan__marker.is-dim .custom-siteplan__dot {
	opacity: 0.45;
}

/* ---------- Callout-Label ---------- */

.custom-siteplan__callout {
	position: absolute;
	top: 50%;
	transform: translateY(-50%) translateX(var(--shift, -8px));
	white-space: nowrap;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 19px;
	font-weight: 500;
	line-height: 1;
	color: #12161d;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(18, 22, 29, 0.16);
	border-radius: 999px;
	padding: 10px 18px;
	box-shadow: 0 8px 26px rgba(18, 22, 29, 0.2);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 3;
}

.custom-siteplan__marker[data-side="right"] .custom-siteplan__callout {
	left: calc(100% + 8px);
	--shift: -10px;
}

.custom-siteplan__marker[data-side="left"] .custom-siteplan__callout {
	right: calc(100% + 8px);
	--shift: 10px;
}

.custom-siteplan__marker.is-callout .custom-siteplan__callout {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

/* ---------- Legende (Liste in der Städtebau-Sektion) ---------- */

.pl-plan-item {
	cursor: pointer;
	border-radius: 8px;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.pl-plan-item.is-active {
	transform: translateX(10px);
}

/* Kreis füllt sich, Nummer invertiert */
.pl-plan-item > .brxe-div {
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.pl-plan-item.is-active > .brxe-div {
	background-color: #12161d;
	box-shadow: 0 4px 14px rgba(18, 22, 29, 0.28);
}

.pl-plan-item.is-active > .brxe-div p {
	color: #ffffff !important;
}

.pl-plan-item > .brxe-text-basic {
	transition: color 0.3s ease;
}

.pl-plan-item.is-active > .brxe-text-basic {
	color: #12161d !important;
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
	.custom-siteplan__img,
	.custom-siteplan__marker,
	.custom-siteplan__dot,
	.custom-siteplan__callout,
	.pl-plan-item {
		transition: none;
	}
	.custom-siteplan__marker {
		opacity: 1;
		scale: 1;
	}
	.custom-siteplan.is-inview .custom-siteplan__ping {
		animation: none;
	}
	.custom-siteplan.is-focus .custom-siteplan__img {
		transform: none;
	}
}

/* Touch-Geräte: Marker sofort sichtbar (kein Hover-Ping nötig) */
@media (hover: none) {
	.custom-siteplan__marker {
		width: 40px;
		height: 40px;
	}
}
