#hts-tooltip {
	position: absolute;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 12px)) scale(0.82);
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

#hts-tooltip.is-visible {
	pointer-events: auto;
	opacity: 1;
	transform: translate(-50%, calc(-100% - 12px)) scale(1);
}

#hts-pill {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 5px 7px;
	border-radius: 30px;
	background: #3D6698;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

#hts-arrow {
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid #3D6698;
	margin-top: 2px;
}

.hts-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: #fff !important;
	text-decoration: none !important;
	cursor: pointer;
	padding: 0;
	background: rgba(255, 255, 255, 0.12);
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}

.hts-btn:hover,
.hts-btn:focus {
	color: #fff !important;
	text-decoration: none !important;
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.6);
	filter: brightness(1.2);
	transform: scale(1.08);
	outline: none;
}

.hts-btn.is-copied {
	background: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.7);
}

/* Mobile: tooltip sits below selection; arrow points up toward text */
#hts-tooltip.is-below {
	transform: translate(-50%, 10px) scale(0.82);
}

#hts-tooltip.is-below.is-visible {
	transform: translate(-50%, 10px) scale(1);
}

#hts-tooltip.is-below #hts-arrow {
	border-top: 6px solid #3D6698;
	border-bottom: none;
	margin-top: 0;
	margin-bottom: 3px;
}

body.dark #hts-tooltip.is-below #hts-arrow {
	border-top-color: #1e3a5a;
	border-bottom-color: transparent;
}

/* Dark mode — matches body.dark .icon-button from dark-mode-toggle plugin */
body.dark #hts-pill {
	background: #1e3a5a;
	border: 1px solid rgba(135, 192, 255, 0.3);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

body.dark #hts-arrow {
	border-top-color: #1e3a5a;
}

body.dark .hts-btn:hover,
body.dark .hts-btn:focus {
	box-shadow: 0 0 8px rgba(30, 115, 190, 0.25);
	filter: brightness(1.3);
}
