/* ----- AI disclosure badge (EU AI Act Art. 50) -----
 *
 * The badge that marks AI-generated images and videos. Rendered by
 * emifree_ai_disclosure_badge() in inc/ai-disclosure.php; the markup
 * carries no inline styles so the whole visual lives here.
 *
 * Why a standalone stylesheet and not a block in tailwind.src.css:
 * this file is the compliance surface for Art. 50. Keeping it out of
 * the Tailwind build means (a) it survives a `npm run build` untouched,
 * (b) it can be reviewed as one self-contained artifact, and (c) it
 * ships without requiring a Node toolchain on the deploy machine.
 * assets/css/main.css is still enqueued first, so these rules win on
 * equal specificity.
 *
 * Placement contract with the templates:
 *   - The badge is position: absolute, so its offset parent must be a
 *     positioned element. The blog card image boxes and the hero video
 *     box already are; the Technology step box gets `relative` added
 *     in the template.
 *   - pointer-events: none is load-bearing. The badge sits on top of
 *     media that has its own click handlers (the product galleries,
 *     the YouTube click-to-play swap) and must never intercept them.
 *   - z-index 25 puts the badge above the hero's gradient scrim
 *     (z-20) while staying below the hero foreground content (z-30).
 */

/* --- The pill --- */
.emifree-ai-badge {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 25;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 3px 11px 3px 3px;
	border-radius: 999px;

	/* 80% transparent PILL. The media shows through the capsule, so
	 * the badge never competes with the picture it labels.
	 *
	 * The fade is applied to the BACKGROUND only, never to the whole
	 * element. A uniform opacity on the badge made white-on-dark text
	 * disappear over a light infographic while staying loud over a
	 * dark photo — the same 20% looked like "invisible" on the light
	 * article graphics and "too subtle" on the navy PM10 graphic.
	 * Fading only the capsule and keeping the LABEL near-full opacity
	 * (with a dark halo below) makes the disclosure legible on any
	 * media, light or dark. */
	background: linear-gradient(180deg, rgba(52, 58, 66, 0.12) 0%, rgba(27, 30, 35, 0.12) 100%);
	border: 1px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.09em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;

	/* 30% smaller. Scaling the whole badge (rather than trimming the
	 * padding and font-size) keeps the proportions of the reference
	 * artwork — the disc-to-pill ratio, the gap, the tracking — exactly
	 * as designed, just smaller. transform-origin is set per variant so
	 * the badge shrinks into its corner instead of drifting away from
	 * it: the layout box keeps its original size, the painted badge
	 * shrinks about the corner it is anchored to. */
	transform: scale(0.7);
	transform-origin: left bottom;

	/* Dark halo around the white label. Over a light infographic the
	 * capsule is barely tinted, and without the halo the white text
	 * would have almost no contrast against it. */
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.85),
		0 0 4px rgba(0, 0, 0, 0.55);
}

/* --- The brain disc --- */
.emifree-ai-badge__icon {
	display: block;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	padding: 2px;
	border-radius: 999px;
	background: radial-gradient(circle at 32% 26%, rgba(140, 147, 160, 0.38) 0%, rgba(58, 63, 71, 0.38) 52%, rgba(27, 30, 35, 0.38) 100%);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.28),
		0 1px 2px rgba(0, 0, 0, 0.40);
	color: #fff;
	/* SVG strokes take no text-shadow, so the halo on the glyph is a
	 * drop-shadow filter instead. */
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85));
}

/* --- The word --- */
.emifree-ai-badge__text {
	display: block;
}

/* --- Hero variant ---
 * The hero video is a full-bleed background (100dvh). The badge sits
 * in the bottom-right corner: the foreground copy (headline, chip row,
 * CTA) is centred, and the client-logo strip along the bottom is
 * centred inside a max-w-5xl column, so the corner is free on desktop.
 * Below the lg breakpoint the logo row spans the full width and wraps
 * to two rows, so the badge is lifted clear of it. */
.emifree-ai-badge--hero {
	top: auto;
	bottom: 16px;
	left: auto;
	right: 16px;
	transform-origin: right bottom;
}

@media (max-width: 1023px) {
	.emifree-ai-badge--hero {
		bottom: 14px;
	}
}

/* --- Top-right variant ---
 * The blog cards. The article images are infographics that carry
 * their own headline and diagram labels along the top edge, and the
 * card's wide box crops the source top and bottom (object-cover), so
 * the corner that looks emptiest in the source file is not the corner
 * the visitor sees. Measured against the rendered crop, the top-right
 * is the emptiest of the four across the article images; on the large
 * featured card the top-left is taken by the category chip anyway. */
.emifree-ai-badge--topright {
	top: 10px;
	bottom: auto;
	left: auto;
	right: 10px;
	transform-origin: right top;
}
