/*
 * Exact Progress Map listing logo fix.
 *
 * HTML target:
 * .cspml_thumb_container > img.thumb.img-responsive
 *
 * The link overlay and pinpoint overlay are siblings and remain untouched.
 */
.tfg-business-directory-active
.cspml_thumb_container > img.thumb.img-responsive {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	padding: clamp(18px, 2.2vw, 34px) !important;
	box-sizing: border-box !important;
	object-fit: contain !important;
	object-position: center center !important;
	background-color: #fff !important;
	transform: none !important;
	transition: none !important;
}

/* Prevent the listing plugin's image zoom from re-cropping the logo. */
.tfg-business-directory-active
.cspml_thumb_container:hover > img.thumb.img-responsive {
	transform: none !important;
}

@media (max-width: 767px) {
	.tfg-business-directory-active
	.cspml_thumb_container > img.thumb.img-responsive {
		padding: 16px !important;
	}
}


/* =========================================================
   Progress Map overlay stability
   ========================================================= */

/*
 * The large Visit overlay and the gold pinpoint occupy the same corner.
 * Keep the pinpoint in a higher stacking layer so moving onto it does not
 * repeatedly trigger and untrigger the full-image link overlay.
 */
.tfg-business-directory-active .cspml_thumb_container {
	position: relative;
}

.tfg-business-directory-active
.cspml_thumb_container .cspml_item_link_overlay {
	z-index: 5 !important;
}

.tfg-business-directory-active
.cspml_thumb_container .cspml_item_pinpoint_overlay {
	z-index: 20 !important;
	pointer-events: auto !important;
}

/*
 * While the pinpoint itself is hovered, suppress only the competing Visit
 * overlay. The logo image and gold corner remain unchanged.
 */
.tfg-business-directory-active
.cspml_thumb_container:has(.cspml_item_pinpoint_overlay:hover)
.cspml_item_link_overlay {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	animation: none !important;
}
