/* CM Hero Banner Hotspots — Frontend */

/* Kill theme/Elementor floats around shortcodes */
.cm-hbh-block,
.cm-hbh-block--hero,
.cm-hbh-block--cats,
.cm-hbh,
.cm-hbh-cats {
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	position: relative !important;
	left: auto !important;
	right: auto !important;
	transform: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

/* Elementor / theme parents that float shortcode widgets */
.elementor-widget:has(.cm-hbh-block),
.elementor-widget:has(.cm-hbh),
.elementor-widget:has(.cm-hbh-cats),
.elementor-element:has(> .cm-hbh-block),
.elementor-element:has(.cm-hbh-block),
.wp-block-shortcode:has(.cm-hbh-block) {
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	display: block !important;
}

.cm-hbh {
	--cm-hbh-gold: #c9a227;
	--cm-hbh-gold-soft: rgba(201, 162, 39, 0.55);
	--cm-hbh-bp: 768px;
	margin-top: 0;
	margin-bottom: 0;
	padding: 0;
}

.cm-hbh__stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	aspect-ratio: var(--cm-hbh-desktop-ar, 16 / 9);
	border-radius: 0;
	background: #111;
}

.cm-hbh__picture {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

.cm-hbh__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.cm-hbh__hotspots {
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: 0;
}

/* Desktop-first hotspot overlay visibility (refined by inline breakpoint CSS) */
.cm-hbh__hotspots--mobile {
	display: none;
}

.cm-hbh__hotspots--desktop {
	display: block;
}

.cm-hbh__hotspot {
	position: absolute;
	display: block;
	box-sizing: border-box;
	background: transparent;
	border: 0;
	text-decoration: none;
	padding: 0;
	min-width: 0;
	min-height: 0;
	outline: none;
}

/* Centered marker — always visible (desktop + mobile) */
.cm-hbh__marker {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	pointer-events: none;
	opacity: 0.9;
	transform: scale(1);
	transition: all 0.25s ease;
}

.cm-hbh__marker-ring {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
	box-shadow: 0 0 0 1px var(--cm-hbh-gold-soft), 0 0 10px rgba(201, 162, 39, 0.45);
	animation: cm-hbh-pulse 2s ease-in-out infinite;
	opacity: 0.9;
}

.cm-hbh__marker-dot {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid var(--cm-hbh-gold);
	box-shadow: 0 0 8px rgba(201, 162, 39, 0.55), inset 0 0 4px rgba(255, 255, 255, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #5c4810;
}

.cm-hbh__marker-icon {
	display: block;
	width: 10px;
	height: 10px;
}

.cm-hbh__hotspot:hover .cm-hbh__marker,
.cm-hbh__hotspot:focus-visible .cm-hbh__marker,
.cm-hbh__hotspot:active .cm-hbh__marker {
	opacity: 1;
	transform: scale(1.15);
}

@keyframes cm-hbh-pulse {
	0%,
	100% {
		transform: scale(1);
		opacity: 0.85;
	}
	50% {
		transform: scale(1.35);
		opacity: 0.35;
	}
}

/* Debug mode */
.cm-hbh--debug .cm-hbh__hotspot {
	background: rgba(0, 0, 0, 0.12);
	outline: 1.5px dashed var(--cm-hbh-gold);
	outline-offset: -1px;
}

.cm-hbh--debug .cm-hbh__marker {
	opacity: 1;
}

.cm-hbh__hotspot-label {
	position: absolute;
	left: 4px;
	top: 4px;
	z-index: 3;
	background: rgba(20, 16, 8, 0.82);
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
	padding: 3px 8px;
	border-radius: 4px;
	white-space: nowrap;
	max-width: calc(100% - 8px);
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	font-family: system-ui, -apple-system, sans-serif;
	letter-spacing: 0.01em;
}

/* CTA — invisible full rect (button graphic is in the image) */
.cm-hbh__cta {
	position: absolute;
	display: block;
	box-sizing: border-box;
	background: transparent;
	border: 0;
	text-decoration: none;
	padding: 0;
	outline: none;
	z-index: 3;
}

.cm-hbh--debug .cm-hbh__cta {
	background: rgba(0, 140, 80, 0.18);
	outline: 1.5px dashed #008c50;
	outline-offset: -1px;
}

.cm-hbh--debug .cm-hbh__cta .cm-hbh__hotspot-label {
	background: rgba(0, 70, 40, 0.88);
}
