/**
 * UP Footnotes Tooltips – Frontend CSS
 */

/* ── Trigger link ──────────────────────────────────────────── */
sup.fn{
	vertical-align: bottom !important;
	padding:  .25rem;
	display: inline-block;

}
sup.fn svg{
	stroke: var(--wp--preset--color--contrast-3,#1e1e2f);
}
sup.fn:hover svg{
	stroke: var(--wp--preset--color--accent-2, lightgrey);
}
.up-ft-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4em;
	height: 1.4em;

	text-decoration: none !important;
	color: inherit;
	opacity: 0.7;
	transition: opacity 0.2s ease;
	line-height: 1;
}

.up-ft-link:hover,
.up-ft-link:focus {
	opacity: 1;
}

.up-ft-link svg {
	width: 100%;
	height: 100%;
}

/* ── Tooltip ──────────────────────────────────────────────── */
.up-ft-tooltip {
	position: absolute;
	z-index: 9999;
	max-width: 340px;
	min-width: 180px;
	padding: 12px 16px;
	background: var(--wp--preset--color--contrast-3,#1e1e2f);
	color: #f0f0f5;
	border-radius: 8px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	font-size: 0.875rem;
	line-height: 1.5;
	pointer-events: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.up-ft-tooltip--visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Arrow */
.up-ft-tooltip::after {
	content: '';
	position: absolute;
	bottom: -6px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid var(--wp--preset--color--contrast-3,#1e1e2f);
}

/* When tooltip is below the trigger, flip the arrow */
.up-ft-tooltip--below::after {
	bottom: auto;
	top: -6px;
	border-top: none;
	border-bottom: 6px solid var(--wp--preset--color--contrast-3,#1e1e2f);
}

/* Links inside tooltip */
.up-ft-tooltip a {
	color: #8cb4ff;
	text-decoration: underline;
}

.up-ft-tooltip a:hover {
	color: #b0cfff;
}

/* Sup container reset */
sup.fn {
	font-size: 1em;
	vertical-align: super;
	line-height: 0;
}

/* Hover bridge: invisible area between trigger and tooltip to prevent flicker */
.up-ft-tooltip::before {
	content: '';
	position: absolute;
	left: -8px;
	right: -8px;
	height: 12px;
}

/* Bridge above tooltip (tooltip shown below trigger) */
.up-ft-tooltip--below::before {
	top: -12px;
	bottom: auto;
}

/* Bridge below tooltip (tooltip shown above trigger) */
.up-ft-tooltip:not(.up-ft-tooltip--below)::before {
	bottom: -12px;
	top: auto;
}
