/**
 * Wrapper rodzica: position: relative.
 * Img w flow: width: 100%; height: auto (bez position: absolute / object-fit: cover).
 * JS ustawia left/top/width/height nakładki na prostokąt bitmapu.
 */
.image-hotspots {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
}

.image-hotspots__svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

.image-hotspots__hit,
.image-hotspots__poly {
	pointer-events: auto;
	cursor: pointer;
}

.image-hotspots__hit:focus {
	outline: none;
}

.image-hotspots__poly {
	fill: var(--imh-fill, #209fda);
	fill-opacity: 0;
	stroke: var(--imh-stroke, #209fda);
	stroke-opacity: 0;
	stroke-width: 0.25;
	transition:
		fill-opacity 0.2s ease,
		stroke-opacity 0.2s ease;
}

.image-hotspots__poly.is-active,
.image-hotspots__poly:hover,
.image-hotspots__poly:focus {
	fill-opacity: var(--imh-hover-opacity, 0);
	stroke-opacity: var(--imh-hover-opacity, 0);
	outline: none;
}

.image-hotspots__anchor {
	position: absolute;
	left: var(--imh-x, 50%);
	top: var(--imh-y, 50%);
	width: 0;
	height: 0;
	pointer-events: none;
	z-index: 3;
}

.image-hotspots__tooltip {
	position: absolute;
	box-sizing: border-box;
	min-width: 11rem;
	max-width: 22rem;
	padding: 1rem 1.4rem;
	border-radius: 0.4rem;
	background-color: #fff;
	box-shadow: 0 0.4rem 1.6rem rgba(36, 45, 88, 0.12);
	text-align: left;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.28s ease,
		visibility 0.28s ease,
		transform 0.28s ease;
	z-index: 4;
}

.image-hotspots__item.is-active .image-hotspots__tooltip {
	opacity: 1;
	visibility: visible;
}

/* Pinezka = środek tooltipa. Strona odsuwa go w lewo albo w prawo. */
.image-hotspots__tooltip--h-right {
	left: 0;
	top: 0;
	margin-left: 1.2rem;
	transform: translate(1.4rem, -50%);
}

.image-hotspots__item.is-active .image-hotspots__tooltip--h-right {
	transform: translate(0, -50%);
}

.image-hotspots__tooltip--h-left {
	right: 0;
	top: 0;
	margin-right: 1.2rem;
	transform: translate(-1.4rem, -50%);
}

.image-hotspots__item.is-active .image-hotspots__tooltip--h-left {
	transform: translate(0, -50%);
}

.image-hotspots__label {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: #209fda;
}

.image-hotspots__name {
	margin: 0.2rem 0 0;
	font-size: 1.8rem;
	font-weight: 600;
	line-height: 1.25;
	color: #242d58;
}

.image-hotspots__link {
	pointer-events: auto;
}
