/**
 * AI media disclosure label.
 *
 * Deliberately unopinionated: this ships to other people's sites, so it sets no
 * colours of its own beyond inheriting the surrounding text. Sizing is in `em`
 * so the label scales with whatever context it lands in — a caption, a cover
 * block, a post grid.
 */

.aio-ai-label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.8em;
	line-height: 1.35;
	vertical-align: middle;
}

.aio-ai-label__icon {
	width: 1.15em;
	height: 1.15em;
	flex: 0 0 auto;
}

.aio-ai-label__link {
	color: inherit;
}

.aio-ai-label__tool::before {
	content: "\00b7";
	margin: 0 0.35em;
}

/**
 * The badge's own row, used when the image has no caption of its own (a
 * <figcaption> added to the figure) or no figure at all (a <div> beneath the
 * block).
 */
.aio-ai-label-wrap {
	display: block;
	margin-top: 0.5em;
}

/* Sat alongside an existing caption, it needs separating from it. */
figcaption:not(.aio-ai-label-wrap) > .aio-ai-label {
	margin-left: 0.5em;
}

/**
 * The bundled icon is the Commission's black variant. In a dark context the
 * black disc disappears, so swap to the exact colours of the official white
 * variant rather than tinting the artwork into something unofficial.
 */
@media (prefers-color-scheme: dark) {

	.aio-ai-label__icon .aio-ai-i1 {
		fill: #fff;
	}

	.aio-ai-label__icon .aio-ai-i2 {
		fill: #1d1d1b;
	}
}

/* The disclosure has to stay legible on paper too. */
@media print {

	.aio-ai-label {
		font-size: 0.75em;
	}
}
