/* Codeable Project Hotspots – frontend */

.cph-hotspots {
	width: 100%;
	margin: 0 auto;
}

.cph-image-holder {
	position: relative;
	display: block;
	line-height: 0;
}

.cph-image-holder .cph-main-image {
	display: block;
	width: 100%;
	height: auto;
}

/* Hotspot point – positioned by % so it stays on the same spot at any width */
.cph-hotspot {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 5;
	line-height: normal;
}

.cph-hotspot__button,
.cph-hotspot .e-hotspot__button {
	position: relative;
	width: 24px;
	height: 24px;
	cursor: pointer;
	display: block;
}

.cph-hotspot .e-hotspot__outer-circle,
.cph-hotspot .e-hotspot__inner-circle {
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

.cph-hotspot .e-hotspot__outer-circle {
	width: 24px;
	height: 24px;
	background: rgba(255, 255, 255, 0.45);
	animation: cph-pulse 2s ease-out infinite;
}

.cph-hotspot .e-hotspot__inner-circle {
	width: 12px;
	height: 12px;
	background: #ffffff;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

@keyframes cph-pulse {
	0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.9; }
	70%  { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
	100% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
}

/* Tooltip */
.cph-hotspot .e-hotspot__tooltip {
	position: absolute;
	bottom: calc(100% + 14px);
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	width: 300px;
	max-width: 78vw;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 10;
}

.cph-hotspot.is-open .e-hotspot__tooltip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.cph-hotspot .tooltip-area {
	position: relative;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	padding: 14px;
}

/* Little arrow */
.cph-hotspot .tooltip-area::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 8px solid transparent;
	border-top-color: #ffffff;
}

.cph-hotspot .close-btn {
	position: absolute;
	top: -10px;
	right: -10px;
	width: 26px;
	height: 26px;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.cph-hotspot .close-btn img {
	width: 12px;
	height: 12px;
	top:7px;
	left:7px;
	position: absolute;
}

.cph-hotspot .bx-tool {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.cph-hotspot a {
	text-decoration: none;
	color: inherit;
}

.cph-hotspot .bx-tool > img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 6px;
	flex: 0 0 auto;
}

.cph-hotspot .right-bx-tool {
	min-width: 0;
}

.cph-hotspot .tool-cat {
	margin: 0 0 4px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #8a8a8a;
	font-weight: 600;
}

.cph-hotspot .tool-title {
	margin: 0;
	font-size: 15px;
	line-height: 1.3;
	color: #1a1a1a;
	font-weight: 600;
}

.cph-hotspot .tool-desc {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #555;
}

/* Keep tooltips inside the frame near the edges */
.cph-hotspot[data-edge="left"] .e-hotspot__tooltip {
	left: 0;
	transform: translateX(0) translateY(6px);
}
.cph-hotspot[data-edge="left"].is-open .e-hotspot__tooltip {
	transform: translateX(0) translateY(0);
}
.cph-hotspot[data-edge="left"] .tooltip-area::after { left: 24px; }

.cph-hotspot[data-edge="right"] .e-hotspot__tooltip {
	left: auto;
	right: 0;
	transform: translateX(0) translateY(6px);
}
.cph-hotspot[data-edge="right"].is-open .e-hotspot__tooltip {
	transform: translateX(0) translateY(0);
}
.cph-hotspot[data-edge="right"] .tooltip-area::after { left: auto; right: 24px; transform: none; }

@media (max-width: 600px) {
	.cph-hotspot .e-hotspot__tooltip { width: 240px; }
	.cph-hotspot .bx-tool > img { width: 64px; height: 64px; }
}
.e-hotspot__inner-circle:before{ top:0px !important; left:0px !important }
.e-hotspot__inner-circle:after{ top:5px !important; left:4px !important }