/*
 * CILI: the badges of an artist's page (cili/points/badges.php; ADR-0086 D8; the owner's approved mockup of 2026-11-21; WEB-2083).
 *
 * A pill with its line icon beside its name. Rising and Radiant are black and white with high contrast, the interface's own ink and
 * the colour on it (so black with white text in the light mode and white with black text in the dark one, whichever the member chose:
 * the tokens follow `data-theme` and the system), no gray and no gradient. Zenith alone is coloured: the gold, peach and rose of the
 * header's call to action (the owner's one exception, no new colour), with dark text, a soft glow and a brief shimmer of that glow that
 * stops after a few passes and does not run at all while the visitor asks for reduced motion (the owner's decision of 2026-11-21,
 * WCAG 2.2.2: no motion lasts more than five seconds, and the glow stays as a still one).
 */

html body .lcr-points-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--lcr-space-8);
	flex: none;
	padding: var(--lcr-space-8) var(--lcr-space-16) var(--lcr-space-8) var(--lcr-space-12);
	border-radius: var(--lcr-radius-pill);
	background-color: var(--lcr-color-ink);
	color: var(--lcr-color-on-ink);
	font-size: var(--lcr-type-body-large-font-size);
	font-weight: var(--lcr-font-weight-semibold);
	letter-spacing: -0.01em;
	line-height: 1;
	white-space: nowrap;
}

html body .lcr-points-badge .lcr-icon {
	flex: none;
	width: calc(var(--lcr-space-18) + var(--lcr-space-4));
	height: calc(var(--lcr-space-18) + var(--lcr-space-4));
	color: inherit;
}

html body .lcr-points-badge-name {
	color: inherit;
}

/* Beside a name (the artist's page): the small pill. */
html body .lcr-points-badge--small {
	gap: var(--lcr-space-6);
	padding: var(--lcr-space-4) var(--lcr-space-10) var(--lcr-space-4) var(--lcr-space-8);
	font-size: var(--lcr-type-small-font-size);
}

html body .lcr-points-badge--small .lcr-icon {
	width: var(--lcr-space-16);
	height: var(--lcr-space-16);
}

/* Zenith, the only colour: the call to action's gradient, dark text, a soft glow. */
html body .lcr-points-badge--zenith {
	--lcr-badge-glow: color-mix(in srgb, var(--lcr-web-signal-cta-gold) 55%, transparent);
	--lcr-badge-glow-strong: color-mix(in srgb, var(--lcr-web-signal-cta-gold) 90%, transparent);
	background-color: var(--lcr-web-signal-cta-gold);
	background-image: linear-gradient(100deg, var(--lcr-web-signal-cta-gold), var(--lcr-web-signal-cta-peach) 50%, var(--lcr-web-signal-cta-rose));
	color: var(--lcr-web-signal-on-cta);
	box-shadow: 0 0 var(--lcr-space-18) var(--lcr-badge-glow), 0 0 calc(2 * var(--lcr-size-hairline)) color-mix(in srgb, var(--lcr-web-signal-cta-rose) 60%, transparent);
	animation: lcr-zenith-shimmer 1500ms ease-in-out 3;
}

/* Three passes of the glow within the first five seconds, then it stays as the static glow above (the base box-shadow). */
@keyframes lcr-zenith-shimmer {
	0%,
	100% {
		box-shadow: 0 0 var(--lcr-space-18) var(--lcr-badge-glow), 0 0 calc(2 * var(--lcr-size-hairline)) color-mix(in srgb, var(--lcr-web-signal-cta-rose) 60%, transparent);
	}

	50% {
		box-shadow: 0 0 calc(var(--lcr-space-18) + var(--lcr-space-12)) var(--lcr-badge-glow-strong), 0 0 calc(2 * var(--lcr-size-hairline)) color-mix(in srgb, var(--lcr-web-signal-cta-rose) 60%, transparent);
	}
}

@media (prefers-reduced-motion: reduce) {
	html body .lcr-points-badge--zenith {
		animation: none;
	}
}

/* The name and its badge share a row on the artist's page (author.php prints the row only for an artist who has one). */
html body.author .ulz-author-cover .lcr-name-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--lcr-space-8) var(--lcr-space-12);
	margin: var(--lcr-space-16) 0 var(--lcr-space-8);
}

html body.author .ulz-author-cover .lcr-name-row .ulz--name {
	margin: 0;
}
