/**
 * Image Map Hotspot — frontend styles.
 *
 * Everything is scoped under .imh-6310-* so no theme rule is overwritten and
 * no theme rule can reach in. Class names match the original plugin so any
 * custom CSS written against the old build keeps working.
 */

/* ---------------------------------------------------------------- Layout */

.imh-6310-annotation-box-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	flex: 1 1 100%;
	box-sizing: border-box;
}

.imh-6310-annotation-box {
	position: relative;
	width: 100%;
	max-width: 100%;
	padding: 0;
	overflow: hidden;
	box-sizing: border-box;
	line-height: 0;
}

.imh-6310-annotation-box-inner {
	position: relative;
	transform-origin: center center;
	transition: transform 0.25s ease;
	will-change: transform;
	line-height: 0;
}

.imh-6310-annotation-box-inner:active {
	transition: none;
}

.imh-6310-annotation-box .imh-6310-main-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	vertical-align: top;
	box-shadow: none;
}

.imh-6310-missing-image {
	padding: 40px 20px;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: #6b6b6b;
	background: #f4f4f4;
	border: 1px dashed #cfcfcf;
	box-sizing: border-box;
}

/* --------------------------------------------------------------- Markers */

.imh-6310-drag {
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 5;
	display: inline-block;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	line-height: 0;
	-webkit-tap-highlight-color: transparent;
}

.imh-6310-drag:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 3px;
}

.imh-6310-point-icons {
	position: relative;
	display: block;
	line-height: 1;
}

.imh-6310-drag .imh-6310-pin-main-img,
.imh-6310-drag .imh-6310-pin-hover-img {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	max-width: none;
	text-decoration: none;
	box-shadow: none;
	line-height: 1;
}

.imh-6310-drag .imh-6310-pin-hover-img {
	display: none;
}

.imh-6310-drag:hover .imh-6310-pin-hover-img,
.imh-6310-drag:focus-visible .imh-6310-pin-hover-img,
.imh-6310-drag.is-active .imh-6310-pin-hover-img {
	display: block;
}

.imh-6310-drag:hover .imh-6310-pin-main-img,
.imh-6310-drag:focus-visible .imh-6310-pin-main-img,
.imh-6310-drag.is-active .imh-6310-pin-main-img {
	display: none;
}

.imh-6310-customtext {
	display: inline-block;
	white-space: nowrap;
	line-height: 1.2;
}

/* -------------------------------------------------------------- Tooltips */

.imh-6310-overlays {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.imh-6310-hover-content {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 99999;
	transform: scale(0);
	transform-origin: center bottom;
	transition: transform 0.25s ease;
	line-height: normal;
	box-sizing: border-box;
}

.imh-6310-hover-content * {
	box-sizing: border-box;
	text-decoration: none;
}

.imh-6310-hover-content a {
	text-decoration: none;
}

.imh-6310-hover-content img {
	max-width: 100%;
	height: auto;
}

.imh-6310-template-01-hover-content {
	position: relative;
	display: block;
	width: 100%;
	text-align: center;
	border-radius: 6px;
}

/* Template 02 — embedded media */

.imh-6310-template-02-hover-content {
	position: relative;
	color: #fff;
	text-align: center;
	border-radius: 6px;
}

.imh-6310-template-02-content {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.imh-6310-template-02-content iframe {
	position: absolute;
	max-width: 97%;
	max-height: 96%;
	border: 2px solid #fff;
}

/* Template 03 — image beside text */

.imh-6310-template-03-hover-content {
	position: relative;
	z-index: 1;
}

.imh-6310-template-03-tooltip-testimonial {
	display: flex;
	gap: 24px;
	padding: 20px;
	width: 100%;
	border-radius: 6px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.imh-6310-template-03-tooltip-pic {
	position: relative;
	flex: 0 0 30%;
}

.imh-6310-template-03-tooltip-pic::before,
.imh-6310-template-03-tooltip-pic::after {
	content: "";
	position: absolute;
	display: block;
	width: 50%;
	height: 50%;
}

.imh-6310-template-03-tooltip-pic::before {
	bottom: -10%;
	left: -10%;
	border-bottom: 3px solid #e16b47;
	border-left: 3px solid #e16b47;
}

.imh-6310-template-03-tooltip-pic::after {
	top: -10%;
	right: -10%;
	border-top: 3px solid #e16b47;
	border-right: 3px solid #e16b47;
}

.imh-6310-template-03-tooltip-pic img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}

.imh-6310-template-03-tooltip-testimonial-content {
	flex: 1 1 auto;
	text-align: left;
}

.imh-6310-template-03-tooltip-testimonial-title {
	text-transform: capitalize;
}

/* Template 04 — centred card */

.imh-6310-template-04-tooltip-testimonial {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-top: 50px;
	border-radius: 6px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.imh-6310-template-04-tooltip-testimonial-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-bottom: 12px;
}

.imh-6310-template-04-tooltip-pic {
	width: 120px;
	height: 120px;
	margin-top: -50px;
	overflow: hidden;
	border: 8px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
}

.imh-6310-template-04-tooltip-pic img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.imh-6310-template-04-tooltip-title {
	margin: 10px 0 0;
	font-weight: 700;
}

.imh-6310-template-04-tooltip-description {
	display: inline-block;
	margin: 10px;
	padding: 8px;
	border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Template 05 — split card */

.imh-6310-template-05-hover-content {
	position: relative;
	z-index: 1;
	border-radius: 6px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.imh-6310-template-05-tooltip-testimonial {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	margin: 16px 0;
	width: 100%;
}

.imh-6310-template-05-tooltip-testimonial-content {
	flex: 0 0 calc(50% - 16px);
	margin: 8px;
	text-align: center;
}

.imh-6310-template-05-tooltip-pic {
	overflow: hidden;
	border-radius: 50%;
}

.imh-6310-template-05-tooltip-pic img {
	display: block;
	width: 100%;
	height: auto;
}

.imh-6310-template-05-tooltip-title {
	margin-top: 10px;
	font-weight: 700;
}

.imh-6310-template-05-tooltip-description {
	flex: 0 0 calc(50% - 16px);
	margin: 8px;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	text-align: left;
}

/* WooCommerce grid */

.imh-6310-woocommerce-product {
	position: relative;
}

.imh-6310-woocommerce-product-col img {
	display: block;
	width: 100%;
	height: auto;
}

.imh-6310-product-control {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	justify-content: center;
}

.imh-6310-product-control a {
	text-decoration: none;
}

/* Shortcode tooltip */

.imh-6310-template-06-hover-content {
	position: relative;
	text-align: left;
	line-height: normal;
}

/* --------------------------------------------------------------- Close */

.imh-6310-close-button {
	position: absolute;
	z-index: 9;
	padding: 0;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	border: 0;
	cursor: pointer;
	appearance: none;
}

.imh-6310-close-button-mobile {
	display: none;
}

/* --------------------------------------------------------------- Modals */

.imh-6310-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	width: 100%;
	height: 100%;
	padding-top: 70px;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.6);
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
}

.imh-6310-modal-content {
	position: relative;
	width: 70%;
	margin: auto;
	padding: 0;
	background-color: #fefefe;
	box-shadow: 0 0 12px 1px rgba(0, 0, 0, 0.9);
	animation: imh-modal-in 0.3s ease;
}

@keyframes imh-modal-in {
	from { opacity: 0; transform: translateY(-16px); }
	to   { opacity: 1; transform: none; }
}

.imh-6310-modal-content iframe {
	display: block;
	border: 0;
	max-width: 100%;
}

.imh-6310-popup {
	position: relative;
	display: block;
	margin: 0;
	padding: 0 0 40px;
}

.imh-6310-popup img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------- Zoom controls */

.imh-6310-zoom-buttons {
	display: none;
	line-height: 0;
	box-sizing: border-box;
}

.imh-6310-zoom-buttons img {
	transition: opacity 0.2s ease;
}

.imh-6310-zoom-buttons img:hover,
.imh-6310-zoom-buttons img:focus-visible {
	opacity: 1;
}

.imh-6310-builder-box-divider {
	width: 100%;
	height: 1px;
	background: #bfbfbf;
}

/* ------------------------------------------------------------ Responsive */

@media screen and (max-width: 1366px) {
	.imh-6310-close-button-mobile {
		display: block;
	}

	.imh-6310-modal-content {
		width: calc(100% - 30px);
	}
}

@media screen and (max-width: 767px) {
	.imh-6310-template-03-tooltip-testimonial {
		flex-direction: column;
		align-items: center;
		gap: 12px;
		padding: 15px 10px;
	}

	.imh-6310-template-03-tooltip-pic {
		flex: 0 0 auto;
		width: 50%;
	}

	.imh-6310-template-03-tooltip-testimonial-content {
		width: 100%;
		text-align: center;
	}

	.imh-6310-template-05-tooltip-testimonial-content,
	.imh-6310-template-05-tooltip-description {
		flex: 0 0 calc(100% - 16px);
	}

	.imh-6310-template-05-tooltip-pic {
		width: 50%;
		margin: 0 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.imh-6310-hover-content,
	.imh-6310-annotation-box-inner,
	.imh-6310-modal-content {
		transition: none;
		animation: none;
	}

	.imh-6310-point-icons::after {
		animation: none !important;
	}
}
