/**
 * Website by Rahul Simi - footer credit.
 *
 * Colours default to `currentColor` and the font to `inherit` so the credit
 * takes on the theme's own typography and palette until a colour is chosen
 * in Settings > Footer Credit.
 */

.wbrs-credit {
	--wbrs-color: currentColor;
	--wbrs-hover-color: var(--wbrs-color);
	--wbrs-heart-color: currentColor;
	--wbrs-opacity: 0.55;
	--wbrs-size: 13px;
	--wbrs-bg: transparent;
	--wbrs-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 1.25em 1em;
	background-color: var(--wbrs-bg);
	clear: both;
	font-family: inherit;
	font-size: var(--wbrs-size);
	font-weight: inherit;
	line-height: 1.6;
	text-align: center;
}

.wbrs-credit--left {
	text-align: left;
}

.wbrs-credit--right {
	text-align: right;
}

/* Scoped with the element selector to out-specify most theme link styles. */
.wbrs-credit a.wbrs-credit__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45em;
	max-width: 100%;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--wbrs-color);
	font-family: inherit;
	font-size: inherit;
	letter-spacing: 0.02em;
	opacity: var(--wbrs-opacity);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: opacity 420ms var(--wbrs-ease), color 420ms var(--wbrs-ease);
}

.wbrs-credit a.wbrs-credit__link:hover,
.wbrs-credit a.wbrs-credit__link:focus {
	color: var(--wbrs-hover-color);
	opacity: 1;
	text-decoration: none;
}

.wbrs-credit a.wbrs-credit__link:focus {
	outline: none;
}

/* Kept in its own block: a browser that does not know :focus-visible would
   otherwise discard the :hover rule above along with it. */
.wbrs-credit a.wbrs-credit__link:focus-visible {
	color: var(--wbrs-hover-color);
	opacity: 1;
	text-decoration: none;
	outline: 1px dotted currentColor;
	outline-offset: 4px;
}

.wbrs-credit__text {
	display: inline-block;
}

.wbrs-credit__heart {
	display: inline-block;
	color: var(--wbrs-heart-color);
	font-size: 0.95em;
	line-height: 1;
	transform: scale(1);
	transform-origin: center;
	/* Softens the return to rest when the animation is removed on mouse-out. */
	transition: transform 340ms var(--wbrs-ease);
	will-change: transform;
}

.wbrs-credit a.wbrs-credit__link:hover .wbrs-credit__heart {
	animation: wbrs-heartbeat 1.7s var(--wbrs-ease) infinite;
}

.wbrs-credit a.wbrs-credit__link:focus-visible .wbrs-credit__heart {
	animation: wbrs-heartbeat 1.7s var(--wbrs-ease) infinite;
}

/* Two soft beats, then rest - a pulse rather than a bounce. */
@keyframes wbrs-heartbeat {
	0% {
		transform: scale(1);
	}

	14% {
		transform: scale(1.16);
	}

	28% {
		transform: scale(1);
	}

	42% {
		transform: scale(1.09);
	}

	58%,
	100% {
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wbrs-credit a.wbrs-credit__link:hover .wbrs-credit__heart {
		animation: none;
	}

	.wbrs-credit a.wbrs-credit__link:focus-visible .wbrs-credit__heart {
		animation: none;
	}

	.wbrs-credit__heart {
		transition: none;
	}
}

@media print {
	.wbrs-credit {
		display: none;
	}
}
