/* Znaczek: gwiazdka + „AI” bez tła. Kształt jest maską, a kolor bierze się ze zdjęcia pod spodem:
   backdrop-filter sprowadza tło do szarości, odwraca je i progowuje, więc na jasnym zdjęciu
   znaczek jest ciemnoszary, na ciemnym jasnoszary — zawsze neutralny, bez przebarwień. */
.mitowell-aib {
	--aib-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 13'%3E%3Cg transform='translate(0 2) scale(.5625)'%3E%3Cpath d='M8 0c.4 3.9 2.1 5.6 6 6-3.9.4-5.6 2.1-6 6-.4-3.9-2.1-5.6-6-6 3.9-.4 5.6-2.1 6-6Z'/%3E%3Cpath d='M13.5 10c.2 1.6.9 2.3 2.5 2.5-1.6.2-2.3.9-2.5 2.5-.2-1.6-.9-2.3-2.5-2.5 1.6-.2 2.3-.9 2.5-2.5Z'/%3E%3C/g%3E%3Ctext x='11' y='10.6' font-family='-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif' font-size='10' font-weight='600' letter-spacing='.3'%3EAI%3C/text%3E%3C/svg%3E");
	position: absolute;
	left: 0;
	top: 0;
	z-index: 5;
	box-sizing: content-box;
	display: block;
	width: 24px;
	height: 13px;
	margin: 0;
	padding: 1px 4px;
	/* Zapas dla przeglądarek bez backdrop-filter: stała szarość jak wcześniej. */
	background: #8a8a8a;
	-webkit-mask: var(--aib-shape) center / 24px 13px no-repeat content-box;
	mask: var(--aib-shape) center / 24px 13px no-repeat content-box;
	cursor: help;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

@supports ((backdrop-filter: invert(1)) or (-webkit-backdrop-filter: invert(1))) {
	.mitowell-aib {
		background: none;
		/* blur wyrównuje fakturę zdjęcia; contrast(100) to ostry próg jasne/ciemne,
		   a brightness(1.2) przesuwa go poniżej średniej szarości (ok. #6b6b6b), bo ciemny znaczek
		   na średnich tonach czyta się lepiej niż jasny;
		   contrast(.7) ściąga czerń i biel do szarości (#262626 / #d9d9d9). */
		-webkit-backdrop-filter: blur(2px) grayscale(1) brightness(1.2) invert(1) contrast(100) contrast(0.7);
		backdrop-filter: blur(2px) grayscale(1) brightness(1.2) invert(1) contrast(100) contrast(0.7);
	}

	.mitowell-aib:hover,
	.mitowell-aib:focus-visible {
		-webkit-backdrop-filter: blur(2px) grayscale(1) brightness(1.2) invert(1) contrast(100);
		backdrop-filter: blur(2px) grayscale(1) brightness(1.2) invert(1) contrast(100);
	}
}

/* Treść (svg + napis) zostaje w DOM, ale rysuje ją maska. */
.mitowell-aib > * {
	display: none;
}

/* Bez podpowiedzi: znaczek nie reaguje na mysz i nie zasłania kliknięcia w zdjęcie. */
.mitowell-aib--static {
	cursor: default;
	pointer-events: none;
}

.mitowell-aib[hidden] {
	display: none;
}

.mitowell-aib:hover,
.mitowell-aib:focus-visible {
	outline: none;
}

.mitowell-aib-tip {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 100000;
	max-width: min(300px, calc(100vw - 16px));
	padding: 8px 12px;
	border-radius: 4px;
	background: #1d1d1f;
	color: #fff;
	font: 400 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease, visibility 0s linear 0.12s;
}

.mitowell-aib-tip.is-on {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.12s ease;
}

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