/**
 * ENI - Flatsome Product Hotspots
 * Giao diện ảnh nền, nút sản phẩm, điểm neo, đường nối và ảnh tròn.
 */

.eni-product-hotspots {
	--eni-button-bg: #fff;
	--eni-button-color: #111;
	--eni-button-font-size: 16px;
	--eni-line-color: #fff;
	--eni-line-width: 1.5px;
	--eni-point-color: #fff;
	--eni-point-size: 18px;
	--eni-product-bg: #fff;
	--eni-product-border: #fff;
	--eni-radius: 0;
	display: block;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.eni-product-hotspots,
.eni-product-hotspots * {
	box-sizing: border-box;
}

.eni-hotspots--align-left {
	margin-left: 0;
	margin-right: auto;
}

.eni-hotspots--align-center {
	margin-left: auto;
	margin-right: auto;
}

.eni-hotspots--align-right {
	margin-left: auto;
	margin-right: 0;
}

.eni-hotspots__stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: var(--eni-radius);
	isolation: isolate;
}

.eni-hotspots__background {
	display: block;
	position: relative;
	z-index: 0;
	width: 100%;
	margin: 0;
	line-height: 0;
}

.eni-hotspots__background picture,
.eni-hotspots__background-img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
}

.eni-hotspots__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 360px;
	aspect-ratio: 1903 / 807;
	padding: 32px;
	background:
		linear-gradient(135deg, rgba(22, 69, 53, 0.05) 25%, transparent 25%) 0 0 / 24px 24px,
		linear-gradient(315deg, rgba(22, 69, 53, 0.05) 25%, transparent 25%) 0 0 / 24px 24px,
		#f5f8f7;
	color: #164535;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.eni-hotspots__placeholder strong {
	margin-bottom: 5px;
	font-size: 20px;
}

.eni-hotspots__items {
	position: absolute;
	z-index: 2;
	inset: 0;
	pointer-events: none;
}

.eni-hotspot {
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	pointer-events: none;
}

.eni-hotspot__visual {
	display: block;
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.eni-hotspot__line {
	display: block;
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

.eni-hotspot__line path {
	fill: none;
	stroke: var(--eni-line-color);
	stroke-width: var(--eni-line-width);
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.eni-hotspot--line-none .eni-hotspot__line,
.eni-hotspot--line-none .eni-hotspot__point {
	display: none;
}

.eni-hotspot__button {
	display: inline-flex;
	position: absolute;
	z-index: 4;
	left: var(--eni-btn-x);
	top: var(--eni-btn-y);
	align-items: center;
	justify-content: center;
	gap: 9px;
	max-width: min(420px, calc(100% - 24px));
	min-height: 46px;
	margin: 0;
	padding: 10px 14px 10px 17px;
	transform: translate(-50%, -50%);
	border: 1px solid rgba(17, 17, 17, 0.04);
	border-radius: 999px;
	background: var(--eni-button-bg);
	box-shadow: 0 7px 24px rgba(0, 0, 0, 0.08);
	color: var(--eni-button-color);
	font-family: inherit;
	font-size: var(--eni-button-font-size);
	font-style: normal;
	font-weight: 500;
	line-height: 1.25;
	text-align: left;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	pointer-events: auto;
	transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.eni-hotspot__button:hover,
.eni-hotspot__button:focus-visible {
	transform: translate(-50%, -50%) translateY(-2px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
	color: var(--eni-button-color);
	text-decoration: none;
}

.eni-hotspot__button:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.8);
	outline-offset: 3px;
}

.eni-hotspot__button--static {
	cursor: default;
}

.eni-hotspot__button-text {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eni-hotspot__button::after {
	display: block;
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	margin-right: 2px;
	transform: rotate(45deg);
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	content: '';
	transition: margin 180ms ease;
}

.eni-hotspot__button:hover::after,
.eni-hotspot__button:focus-visible::after {
	margin-right: 0;
	margin-left: 2px;
}

.eni-hotspot__point {
	display: flex;
	position: absolute;
	z-index: 5;
	left: var(--eni-point-x);
	top: var(--eni-point-y);
	align-items: center;
	justify-content: center;
	width: var(--eni-point-size);
	height: var(--eni-point-size);
	transform: translate(-50%, -50%);
	border: 2px solid var(--eni-point-color);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
	pointer-events: none;
}

.eni-hotspot__point::before {
	position: absolute;
	inset: -5px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: inherit;
	content: '';
	opacity: 0;
	animation: eni-hotspot-pulse 2.4s ease-out infinite;
}

.eni-hotspot__point i {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--eni-point-color);
}

.eni-hotspot__product {
	display: flex;
	position: absolute;
	z-index: 3;
	left: var(--eni-product-x);
	top: var(--eni-product-y);
	align-items: center;
	justify-content: center;
	width: var(--eni-product-size);
	height: var(--eni-product-size);
	padding: clamp(7px, 1vw, 13px);
	transform: translate(-50%, -50%);
	overflow: hidden;
	border: 1px solid var(--eni-product-border);
	border-radius: 50%;
	background: color-mix(in srgb, var(--eni-product-bg) 82%, transparent);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
	backdrop-filter: blur(5px);
	pointer-events: none;
	transition: opacity 180ms ease, transform 180ms ease;
}

@supports not (background: color-mix(in srgb, white 80%, transparent)) {
	.eni-hotspot__product {
		background: var(--eni-product-bg);
	}
}

.eni-hotspot__product img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.eni-hotspot--image-hover .eni-hotspot__product {
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.86);
}

.eni-hotspot--image-hover .eni-hotspot__button:hover + .eni-hotspot__visual .eni-hotspot__product,
.eni-hotspot--image-hover .eni-hotspot__button:focus-visible + .eni-hotspot__visual .eni-hotspot__product {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.eni-hotspot--image-active .eni-hotspot__product {
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.86);
}

.eni-hotspot--image-active.is-active .eni-hotspot__product {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.eni-hotspot--shape-free .eni-hotspot__product {
	padding: 0;
	overflow: visible;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
}

@keyframes eni-hotspot-pulse {
	0% {
		transform: scale(0.75);
		opacity: 0.9;
	}
	70%,
	100% {
		transform: scale(1.55);
		opacity: 0;
	}
}

@media (max-width: 1024px) {
	.eni-hotspot__button {
		min-height: 40px;
		padding: 8px 12px 8px 14px;
		font-size: min(var(--eni-button-font-size), 14px);
	}
}

@media (max-aspect-ratio: 11/10) {
	.eni-hotspot--mobile-custom .eni-hotspot__button {
		left: var(--eni-btn-x-mobile);
		top: var(--eni-btn-y-mobile);
	}

	.eni-hotspot--mobile-custom .eni-hotspot__point {
		left: var(--eni-point-x-mobile);
		top: var(--eni-point-y-mobile);
	}

	.eni-hotspot--mobile-custom .eni-hotspot__product {
		left: var(--eni-product-x-mobile);
		top: var(--eni-product-y-mobile);
		width: var(--eni-product-size-mobile);
		height: var(--eni-product-size-mobile);
	}

	.eni-hotspots--mobile-overlay .eni-hotspot__button {
		max-width: calc(100% - 16px);
		min-height: 34px;
		gap: 5px;
		padding: 6px 9px 6px 11px;
		font-size: min(var(--eni-button-font-size), 12px);
		white-space: normal;
	}

	.eni-hotspots--mobile-overlay .eni-hotspot__button::after {
		flex-basis: 7px;
		width: 7px;
		height: 7px;
	}

	.eni-hotspots--mobile-list .eni-hotspots__stage {
		overflow: visible;
	}

	.eni-hotspots--mobile-list .eni-hotspots__background {
		overflow: hidden;
		border-radius: var(--eni-radius);
	}

	.eni-hotspots--mobile-list .eni-hotspots__items {
		display: grid;
		position: static;
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 14px 0 0;
		pointer-events: auto;
	}

	.eni-hotspots--mobile-list .eni-hotspot {
		display: block;
		position: relative;
		inset: auto;
		width: 100%;
		height: auto;
		pointer-events: auto;
	}

	.eni-hotspots--mobile-list .eni-hotspot__visual {
		display: none;
	}

	.eni-hotspots--mobile-list .eni-hotspot__button {
		display: flex;
		position: relative;
		left: auto;
		top: auto;
		justify-content: space-between;
		width: 100%;
		max-width: none;
		min-height: 46px;
		padding: 10px 14px 10px 17px;
		transform: none;
		border: 1px solid rgba(17, 17, 17, 0.08);
		font-size: min(var(--eni-button-font-size), 15px);
		white-space: normal;
	}

	.eni-hotspots--mobile-list .eni-hotspot__button:hover,
	.eni-hotspots--mobile-list .eni-hotspot__button:focus-visible {
		transform: translateY(-1px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.eni-hotspot__button,
	.eni-hotspot__button::after,
	.eni-hotspot__product {
		transition: none;
	}

	.eni-hotspot__point::before {
		animation: none;
	}
}
