/* SDO Interactive Annotator — Frontend Styles */

.sdo-annotator {
	width: 100%;
}

.sdo-annotator__frame {
	position: relative;
	overflow: hidden;
	width: 100%;
	line-height: 0;
}

.sdo-annotator__image {
	display: block;
	width: 100%;
	height: auto;
}

/* ===== Hotspot base ===== */
.sdo-hotspot {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 5;
}

.sdo-hotspot__trigger {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	outline: none;
}

.sdo-hotspot__badge {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: #0A1F44;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 4px 14px rgba(10, 31, 68, 0.35);
	transition: background-color 0.25s ease, transform 0.25s ease;
	z-index: 2;
}

.sdo-hotspot__trigger:hover .sdo-hotspot__badge,
.sdo-hotspot.is-active .sdo-hotspot__badge {
	transform: scale(1.12);
}

/* ===== Pulse animation ===== */
.sdo-hotspot__pulse {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: #C89A5B;
	transform: translate(-50%, -50%);
	animation: sdo-pulse 2.2s ease-out infinite;
	z-index: 1;
	pointer-events: none;
}

@keyframes sdo-pulse {
	0% {
		opacity: 0.55;
		transform: translate(-50%, -50%) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(2.6);
	}
}

/* ===== Tooltip ===== */
.sdo-hotspot__tooltip {
	position: absolute;
	width: 230px;
	background-color: #0A1F44;
	color: #f2f2f2;
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 20;
	text-align: start;
	pointer-events: none;
}

.sdo-hotspot.is-active .sdo-hotspot__tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.sdo-hotspot__tooltip-title {
	font-weight: 700;
	font-size: 14px;
	color: #C89A5B;
	margin-bottom: 4px;
}

.sdo-hotspot__tooltip-desc {
	font-size: 13px;
	line-height: 1.6;
	margin: 0;
}

/* small arrow */
.sdo-hotspot__tooltip::after {
	content: '';
	position: absolute;
	width: 12px;
	height: 12px;
	background-color: inherit;
	transform: rotate(45deg);
}

/* ---- Default placement: above the badge, centered ---- */
.sdo-hotspot__tooltip {
	bottom: calc(100% + 16px);
	left: 50%;
	transform: translate(-50%, 6px);
}
.sdo-hotspot.is-active .sdo-hotspot__tooltip {
	transform: translate(-50%, 0);
}
.sdo-hotspot__tooltip::after {
	bottom: -5px;
	left: 50%;
	margin-left: -6px;
}

/* ---- side: bottom ---- */
.sdo-hotspot[data-side="bottom"] .sdo-hotspot__tooltip {
	bottom: auto;
	top: calc(100% + 16px);
}
.sdo-hotspot[data-side="bottom"] .sdo-hotspot__tooltip::after {
	bottom: auto;
	top: -5px;
}

/* ---- side: right ---- */
.sdo-hotspot[data-side="right"] .sdo-hotspot__tooltip {
	bottom: auto;
	top: 50%;
	left: calc(100% + 16px);
	transform: translate(-6px, -50%);
}
.sdo-hotspot[data-side="right"].is-active .sdo-hotspot__tooltip {
	transform: translate(0, -50%);
}
.sdo-hotspot[data-side="right"] .sdo-hotspot__tooltip::after {
	bottom: auto;
	left: -5px;
	top: 50%;
	margin-top: -6px;
	margin-left: 0;
}

/* ---- side: left ---- */
.sdo-hotspot[data-side="left"] .sdo-hotspot__tooltip {
	bottom: auto;
	top: 50%;
	left: auto;
	right: calc(100% + 16px);
	transform: translate(6px, -50%);
}
.sdo-hotspot[data-side="left"].is-active .sdo-hotspot__tooltip {
	transform: translate(0, -50%);
}
.sdo-hotspot[data-side="left"] .sdo-hotspot__tooltip::after {
	bottom: auto;
	right: -5px;
	left: auto;
	top: 50%;
	margin-top: -6px;
	margin-left: 0;
}

/* ---- edge safety on small screens: force tooltip to not overflow horizontally ---- */
@media (max-width: 480px) {
	.sdo-hotspot__tooltip {
		width: 190px;
	}
}
