/**
 * IO Widget - Hotspot Styles v1.0.2
 * Straight connector lines – frontend-safe, RTL ready
 */

.io-hotspot-container {
	display: flex;
	width: 100%;
	direction: rtl;
	box-sizing: border-box;
}

.io-hotspot-wrapper {
	position: relative;
	display: inline-block;
	max-width: 100%;
	width: 100%;
	line-height: 0;
	box-sizing: border-box;
}

.io-hotspot-image {
	display: block;
	width: 100%;
	line-height: 0;
}

.io-hotspot-image img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* ---- Item ---- */
.io-hotspot-item {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 5;
	line-height: normal;
	cursor: default;
	box-sizing: border-box;
}

.io-hotspot-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* ---- Dot ---- */
.io-hotspot-dot {
	display: block !important;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: #3B82F6;
	border: 2px solid #FFFFFF;
	box-sizing: border-box;
	position: relative;
	z-index: 4;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
	transition: transform 0.2s ease;
	visibility: visible !important;
	opacity: 1 !important;
}

.io-hotspot-item:hover .io-hotspot-dot {
	transform: scale(1.2);
}

/* Animations */
.io-hotspot-item.io-anim-pulse .io-hotspot-dot::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 2px solid #3B82F6;
	transform: translate(-50%, -50%);
	animation: io-pulse var(--anim-speed, 1.5s) ease-out infinite;
	pointer-events: none;
}

@keyframes io-pulse {
	0%   { width: 100%; height: 100%; opacity: 0.7; }
	100% { width: 280%; height: 280%; opacity: 0; }
}

.io-hotspot-item.io-anim-ripple .io-hotspot-dot::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(59, 130, 246, 0.35);
	transform: translate(-50%, -50%);
	animation: io-ripple var(--anim-speed, 1.5s) ease-out infinite;
	pointer-events: none;
}

@keyframes io-ripple {
	0%   { width: 100%; height: 100%; opacity: 0.5; }
	100% { width: 350%; height: 350%; opacity: 0; }
}

.io-hotspot-item.io-anim-bounce .io-hotspot-dot {
	animation: io-bounce var(--anim-speed, 1.5s) ease-in-out infinite;
}

@keyframes io-bounce {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-5px); }
}

/* =========================================================
   STRAIGHT CONNECTOR LINES
   ========================================================= */
.io-hotspot-line {
	position: absolute;
	pointer-events: none;
	z-index: 2;
	box-sizing: border-box;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Horizontal line (right / left) */
.io-hotspot-line.io-line-h {
	top: 50%;
	height: 0;
	width: var(--line-len, 60px);
	border-top-style: solid;
	border-top-width: 1.5px;
	border-top-color: #3B82F6;
	transform: translateY(-50%);
}

.io-hotspot-item.io-line-dashed .io-hotspot-line.io-line-h {
	border-top-style: dashed;
}
.io-hotspot-item.io-line-dotted .io-hotspot-line.io-line-h {
	border-top-style: dotted;
}

.io-hotspot-item.io-side-right .io-hotspot-line.io-line-h {
	left: 50%;
}
.io-hotspot-item.io-side-left .io-hotspot-line.io-line-h {
	right: 50%;
}

/* Vertical line (top / bottom) */
.io-hotspot-line.io-line-v {
	left: 50%;
	width: 0;
	height: var(--line-len, 60px);
	border-left-style: solid;
	border-left-width: 1.5px;
	border-left-color: #3B82F6;
	transform: translateX(-50%);
}

.io-hotspot-item.io-line-dashed .io-hotspot-line.io-line-v {
	border-left-style: dashed;
}
.io-hotspot-item.io-line-dotted .io-hotspot-line.io-line-v {
	border-left-style: dotted;
}

.io-hotspot-item.io-side-top .io-hotspot-line.io-line-v {
	bottom: 50%;
	top: auto;
}
.io-hotspot-item.io-side-bottom .io-hotspot-line.io-line-v {
	top: 50%;
}

/* =========================================================
   TOOLTIP / LABEL
   ========================================================= */
.io-hotspot-tooltip {
	position: absolute;
	background-color: #FFFFFF;
	padding: 8px 14px;
	border-radius: 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	width: 220px;
	max-width: 220px;
	z-index: 10;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	pointer-events: none;
	text-align: center;
	direction: rtl;
	white-space: normal;
	line-height: 1.45;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
}

/* Always show */
.io-hotspot-wrapper[data-trigger="always"] .io-hotspot-tooltip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Hover */
.io-hotspot-wrapper[data-trigger="hover"] .io-hotspot-item:hover .io-hotspot-tooltip,
.io-hotspot-wrapper[data-trigger="hover"] .io-hotspot-item:focus-within .io-hotspot-tooltip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Click */
.io-hotspot-wrapper[data-trigger="click"] .io-hotspot-item.is-active .io-hotspot-tooltip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Tooltip placement */
.io-hotspot-item.io-side-right .io-hotspot-tooltip {
	left: calc(50% + var(--line-len, 60px) + 8px);
	top: 50%;
	transform: translateY(-50%);
}

.io-hotspot-item.io-side-left .io-hotspot-tooltip {
	right: calc(50% + var(--line-len, 60px) + 8px);
	top: 50%;
	transform: translateY(-50%);
}

.io-hotspot-item.io-side-top .io-hotspot-tooltip {
	bottom: calc(50% + var(--line-len, 60px) + 8px);
	left: 50%;
	transform: translateX(-50%);
}

.io-hotspot-item.io-side-bottom .io-hotspot-tooltip {
	top: calc(50% + var(--line-len, 60px) + 8px);
	left: 50%;
	transform: translateX(-50%);
}

/* Title & Description */
.io-hotspot-title {
	font-size: 12px;
	font-weight: 600;
	color: #1A1A2E;
	margin: 0;
	line-height: 1.4;
}

.io-hotspot-item.io-title-nowrap .io-hotspot-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.io-hotspot-desc {
	font-size: 11px;
	font-weight: 400;
	color: #555;
	margin: 2px 0 0;
	line-height: 1.4;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 767px) {
	.io-hotspot-tooltip {
		width: 160px !important;
		max-width: 160px !important;
		padding: 6px 10px;
	}
	.io-hotspot-item.io-title-nowrap .io-hotspot-title {
		white-space: normal;
	}
	.io-hotspot-title { font-size: 11px; }
	.io-hotspot-desc  { font-size: 10px; }
}

@media (max-width: 480px) {
	.io-hotspot-tooltip {
		width: 140px !important;
		max-width: 140px !important;
		padding: 5px 8px;
	}
}

/* Accessibility */
.io-hotspot-item:focus-within .io-hotspot-dot {
	outline: 2px solid #3B82F6;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.io-hotspot-item.io-anim-pulse .io-hotspot-dot::before,
	.io-hotspot-item.io-anim-ripple .io-hotspot-dot::after,
	.io-hotspot-item.io-anim-bounce .io-hotspot-dot {
		animation: none !important;
	}
	.io-hotspot-tooltip { transition: none; }
}
