/* AB Image Hotspots – Frontend */

.abih-map {
	--abih-gap: 24px;
	--abih-radius: 4px;
	display: flex;
	align-items: flex-start;
	gap: var(--abih-gap);
	width: 100%;
	box-sizing: border-box;
}

.abih-map *,
.abih-lightbox * {
	box-sizing: border-box;
}

.abih-layout-left { flex-direction: row-reverse; }
.abih-layout-below { flex-direction: column; align-items: stretch; }
.abih-layout-tooltip,
.abih-layout-lightbox,
.abih-layout-none { display: block; }

/* Bild + SVG-Overlay */
.abih-image-wrap {
	position: relative;
	flex: 0 1 var(--abih-image-width, 100%);
	width: var(--abih-image-width, 100%);
	max-width: 100%;
	min-width: 0;
	margin-left: var(--abih-image-ml, 0);
	margin-right: var(--abih-image-mr, 0);
	line-height: 0;
}

.abih-image-wrap img.abih-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.abih-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.abih-spot {
	fill: var(--spot-fill, var(--abih-fill, #fff));
	fill-opacity: var(--abih-fill-op, 0);
	stroke: var(--spot-border, var(--abih-border, #fff));
	stroke-opacity: var(--abih-border-op, .8);
	stroke-width: var(--abih-border-w, 2px);
	vector-effect: non-scaling-stroke;
	stroke-linejoin: round;
	cursor: pointer;
	outline: none;
	transition: fill .2s ease, fill-opacity .2s ease, stroke .2s ease, stroke-opacity .2s ease;
}

.abih-spot:hover,
.abih-spot:focus-visible,
.abih-spot.is-active,
.abih-spot-link:hover .abih-spot,
.abih-spot-link:focus-visible .abih-spot {
	fill: var(--spot-hover, var(--abih-hover-fill, #2271b1));
	fill-opacity: var(--abih-hover-fill-op, .45);
	stroke: var(--spot-hover, var(--abih-hover-border, #2271b1));
	stroke-opacity: var(--abih-hover-border-op, 1);
}

.abih-spot:focus-visible,
.abih-spot-link:focus-visible .abih-spot {
	stroke-width: calc(var(--abih-border-w, 2px) + 2px);
}

.abih-spot-link { outline: none; }

/* Infobereich */
.abih-panel {
	position: relative;
	flex: 0 0 var(--abih-panel-width, 35%);
	max-width: var(--abih-panel-width, 35%);
	padding: 20px 24px;
	background: var(--abih-panel-bg, #fff);
	color: var(--abih-panel-text, #1e1e1e);
	border-radius: var(--abih-radius);
	line-height: 1.55;
}

.abih-layout-below .abih-panel {
	flex: none;
	max-width: none;
	width: 100%;
}

.abih-panel.is-empty:not(.has-active) {
	background: transparent;
	padding: 0;
}

.abih-content-title {
	margin: 0 0 .6em;
	color: var(--abih-title-color, inherit);
	font-size: 1.25em;
	line-height: 1.3;
}

.abih-content-image { margin: 0 0 1em; line-height: 0; }
.abih-content-image img { display: block; max-width: 100%; height: auto; border-radius: calc(var(--abih-radius) / 2); }
.abih-content-body > :first-child { margin-top: 0; }
.abih-content-body > :last-child { margin-bottom: 0; }

.abih-close {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 24px;
	line-height: 32px;
	text-align: center;
	cursor: pointer;
	opacity: .6;
	box-shadow: none;
}
.abih-close:hover,
.abih-close:focus-visible { opacity: 1; background: transparent; color: inherit; }

.abih-panel .abih-close + .abih-content-title,
.abih-tooltip .abih-close + .abih-content-title { padding-right: 28px; }

/* Tooltip */
.abih-tooltip {
	position: absolute;
	z-index: 20;
	width: max-content;
	max-width: min(340px, 100%);
	padding: 16px 18px;
	background: var(--abih-panel-bg, #fff);
	color: var(--abih-panel-text, #1e1e1e);
	border-radius: var(--abih-radius);
	box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
	line-height: 1.5;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .15s ease, transform .15s ease;
	pointer-events: none;
}
.abih-tooltip.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.abih-tooltip .abih-content-title { font-size: 1.05em; }

/* Lightbox */
.abih-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.abih-lightbox[hidden] { display: none; }
.abih-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .7);
}
.abih-lightbox-dialog {
	position: relative;
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 28px 32px;
	background: var(--abih-panel-bg, #fff);
	color: var(--abih-panel-text, #1e1e1e);
	border-radius: var(--abih-radius, 4px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
	line-height: 1.55;
	outline: none;
}
.abih-lightbox-dialog .abih-content-title { color: var(--abih-title-color, inherit); padding-right: 28px; }
body.abih-noscroll { overflow: hidden; }

/* Responsiv: Infobereich unter das Bild */
@media (max-width: 767px) {
	.abih-layout-right,
	.abih-layout-left { flex-direction: column; align-items: stretch; }
	.abih-layout-right .abih-panel,
	.abih-layout-left .abih-panel { flex: none; max-width: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.abih-spot, .abih-tooltip { transition: none; }
}

.abih-elementor-placeholder {
	padding: 30px;
	text-align: center;
	border: 2px dashed #c3c4c7;
	color: #646970;
}
