/* =========================================================
   AB Portfolio – Caption am Cursor
   Gilt nur mit html.abx-caption-on (echte Maus + Carousel auf der Seite).
   Auf Touch-Geräten bleibt Lays Caption-Zeile unverändert sichtbar
   (Wunsch AB, 04.10.2026).
   ========================================================= */

/* Lays Caption-Zeile unter dem Carousel nur optisch ausblenden.
   Screenreader können sie weiterhin lesen. */
html.abx-caption-on .lay-carousel-sink-parent {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.abx-caption {
	display: none;
}

html.abx-caption-on .abx-caption {
	display: block;
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 200005;
	pointer-events: none;
	visibility: hidden;
	will-change: transform;
}

html.abx-caption-on .abx-caption.abx-caption--visible {
	visibility: visible;
}

/* Bei offenem Overlay keine Caption. */
html.abx-caption-on body.lay-overlay-open .abx-caption {
	visibility: hidden;
}

.abx-caption__pop {
	animation: abx-caption-pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
	transform-origin: center center;
}

@keyframes abx-caption-pop {
	0% {
		opacity: 0;
		transform: scale(1.15);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.abx-caption__pop {
		animation: none;
	}
}
