/* ==========================================================================
   ebg elements - agency credit. Markup from ebg_credit_html() / [ebg_credit]
   (_core/php/credit.php): a.ebg-credit > "crafted by" + img.ebg-credit__logo.
   Discreet and subordinate to the client's copyright: same size, softer ink,
   badge at 70% that rises to full on hover. --on-dark for dark footers.
   ========================================================================== */

@layer components {

	.ebg-credit {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		color: color-mix(in oklab, var(--ebg-ink) 65%, transparent);
		font-size: 0.875rem;
		line-height: 1.4;
		text-decoration: none;
		vertical-align: middle;

		&:hover,
		&:focus-visible {
			color: color-mix(in oklab, var(--ebg-ink) 65%, transparent);
			text-decoration: none;
		}
	}

	.ebg-credit--on-dark,
	.ebg-credit--on-dark:is(:hover, :focus-visible) {
		color: color-mix(in oklab, var(--ebg-on-dark) 70%, transparent);
	}

	.ebg-credit__logo {
		display: inline-block;
		inline-size: auto;
		block-size: 15px;
		margin-block-start: 2px; /* optical baseline with lowercase text */
		vertical-align: middle;
		opacity: 0.7;
	}

	.ebg-credit:is(:hover, :focus-visible) .ebg-credit__logo { opacity: 1; }

	@media (prefers-reduced-motion: no-preference) {
		.ebg-credit__logo { transition: opacity 0.55s cubic-bezier(0.7, 0, 0.3, 1); }
	}
}
