/**
 * Frontend tooltip styles.
 *
 * @package SJ_Tooltip
 */

/* Tooltip term (highlighted text) */
.sj-tooltip-term {
	cursor: help;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-decoration-color: #666;
	position: relative;
	pointer-events: auto;
}

/* Ensure tooltip works even when inside wrapper with play button */
.sj-speak-auto-wrapper {
	position: relative;
}

.sj-speak-auto-wrapper .sj-tooltip-term {
	pointer-events: auto;
	position: relative;
	z-index: 1;
}

/* Ensure play button doesn't block tooltip hover */
.sj-speak-auto-wrapper .sj-speak-play-btn {
	pointer-events: auto;
	z-index: 2;
}

.sj-tooltip-term:hover {
	text-decoration-color: #0073aa;
}

/* Tooltip icon */
.sj-tooltip-icon {
	display: inline-block;
	cursor: help;
	position: relative;
	margin: 0 2px;
	vertical-align: middle;
}

.sj-tooltip-icon-symbol {
	display: inline-block;
	width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	background-color: #0073aa;
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	font-weight: bold;
	font-style: normal;
}

.sj-tooltip-icon:hover .sj-tooltip-icon-symbol {
	background-color: #005177;
}

/* Tooltip popup */
.sj-tooltip-popup {
	position: absolute;
	background-color: #333;
	color: #fff;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	max-width: 300px;
	z-index: 999999;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	/* Add small gap to prevent mouse from leaving element area */
	margin-top: 2px;
}

.sj-tooltip-popup.sj-tooltip-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Tooltip arrow */
.sj-tooltip-popup::before {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border: 6px solid transparent;
	border-bottom-color: #333;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
}

/* Tooltip content styling */
.sj-tooltip-popup p {
	margin: 0 0 8px 0;
}

.sj-tooltip-popup p:last-child {
	margin-bottom: 0;
}

.sj-tooltip-popup a {
	color: #fff;
	text-decoration: underline;
}

.sj-tooltip-popup a:hover {
	color: #ccc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.sj-tooltip-popup {
		max-width: 250px;
		font-size: 13px;
		padding: 10px 14px;
	}
}







