/* Lento AI-Act image marker: small top-right badge + disclosure tooltip. */

.aiact-host {
	position: relative;
}

/* Fallback wrapper created only when no suitable positioned container exists.
   inline-block keeps it hugging the image. */
span.aiact-wrap {
	display: inline-block;
	position: relative;
	max-width: 100%;
	line-height: 0;
}

.aiact-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	/* Subtle scaling: ~4% of the host width, clamped to a small range. */
	width: clamp(18px, 4%, 28px);
	height: clamp(18px, 4%, 28px);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: help;
	z-index: 10;
	line-height: 0;
	-webkit-appearance: none;
	appearance: none;
}

.aiact-badge:focus-visible {
	outline: 2px solid #1a56b4;
	outline-offset: 2px;
}

.aiact-badge-icon {
	width: 72%;
	height: 72%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

.aiact-tip {
	position: absolute;
	top: calc(6px + clamp(18px, 4%, 28px) + 6px);
	right: 6px;
	max-width: min(260px, 80%);
	background: #111827;
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 400;
	text-align: left;
	padding: 6px 8px;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	z-index: 11;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-2px);
	transition: opacity 0.12s ease, transform 0.12s ease;
	pointer-events: none;
	white-space: normal;
}

.aiact-tip.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.aiact-tip {
		transition: none;
		transform: none;
	}
}
