/* Hotspots en popup voor de OpenSeadragon-viewer (zie openseadragon-collection.js) */

.osd-hotspot {
	width: 26px;
	height: 26px;
	padding: 0;
	border-radius: 50%;
	background: #5d8376;
	border: 3px solid #fff;
	cursor: pointer;
	animation: osd-hotspot-puls 2s infinite;
	touch-action: manipulation;
}

.osd-hotspot:focus-visible {
	outline: 3px solid #ffd166;
	outline-offset: 2px;
}

@keyframes osd-hotspot-puls {
	0%   { box-shadow: 0 0 0 0 rgba(93, 131, 118, 0.6); }
	70%  { box-shadow: 0 0 0 14px rgba(200, 16, 46, 0); }
	100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

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

.osd-hotspot-popup {
	position: relative;
	box-sizing: border-box;
	width: 280px;
	max-width: calc(100% - 16px); /* nooit breder dan de viewer */
	padding: 14px 36px 14px 16px;
	background: #fff;
	color: #222;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
	font-size: 15px;
	line-height: 1.45;

	/* --osd-shift-x wordt door het script gezet om binnen de viewer te blijven */
	transform: translate(var(--osd-shift-x, 0px), var(--osd-shift-y, -22px)); /* boven de hotspot */
}

/* Te weinig ruimte boven de hotspot: popup eronder */
.osd-hotspot-popup.osd-popup-onder {
	--osd-shift-y: 22px;
}

/* Kort onzichtbaar terwijl de positie wordt bepaald */
.osd-hotspot-popup.osd-popup-meten {
	visibility: hidden;
}

/* Lange teksten: scrollen binnen de popup */
.osd-hotspot-popup p {
	max-height: 40vh;
	overflow-y: auto;
}

.osd-hotspot-popup strong {
	display: block;
	margin-bottom: 4px;
	font-size: 16px;
}

.osd-hotspot-popup p {
	margin: 0;
	white-space: pre-line; /* regeleinden uit het ACF-tekstveld behouden */
}

.osd-hotspot-sluiten {
	position: absolute;
	top: 6px;
	right: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: #666;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

/* Alleen zichtbaar met ?osd-debug=1 in de URL */
.osd-debug-label {
	position: fixed;
	right: 12px;
	bottom: 12px;
	z-index: 99999;
	padding: 8px 12px;
	background: #111;
	color: #fff;
	font: 13px/1.4 monospace;
	border-radius: 6px;
	user-select: all;
}
