/*
 * heySec Shield badge. It takes the theme's font and size; its colours are its own, so they win
 * over the theme's link colours. Looks: yellow (yellow shield, dark text, for light backgrounds),
 * white (white shield, white text, for dark ones). In automatic colour the look is chosen by
 * assets/js/badge.js; until then the text keeps the theme's colour.
 */

.heysec-badge {
	display: inline-block;
	max-width: 100%;
}

/* Inline, so the words sit on the theme's own baseline next to its credits line. */
.heysec-badge .heysec-badge__link {
	display: inline;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: none;
	color: inherit;
	text-decoration: none !important;
	white-space: nowrap;
}

.heysec-badge .heysec-badge__shield {
	display: inline-block;
	width: 1.15em;
	height: 1.15em;
	margin-inline-end: .4em;
	vertical-align: -.22em;
	fill: #f9ce19;
}

.heysec-badge .heysec-badge__text {
	opacity: .85;
}

.heysec-badge .heysec-badge__text strong {
	font-weight: 700;
}

.heysec-badge .heysec-badge__link:hover .heysec-badge__text,
.heysec-badge .heysec-badge__link:focus-visible .heysec-badge__text {
	opacity: 1;
}

.heysec-badge .heysec-badge__link:hover strong {
	text-decoration: underline;
	text-underline-offset: .15em;
}

.heysec-badge .heysec-badge__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}

.heysec-badge[data-look="yellow"] .heysec-badge__link {
	color: #2a3548 !important;
}

.heysec-badge[data-look="white"] .heysec-badge__link {
	color: #fff !important;
}

.heysec-badge[data-look="white"] .heysec-badge__shield {
	fill: #fff;
}

/* Next to the theme's credits line. */
.heysec-badge--inline {
	margin-inline-start: .75em;
}

/* On a line of its own: the automatic badge before it finds the credits line, or where there is none. */
.heysec-badge-row {
	box-sizing: border-box;
	width: 100%;
	padding-block: .5em;
	font-size: .8125rem;
	text-align: center;
}

.heysec-badge-row--flush {
	padding-block: .25em 0;
	font-size: inherit;
}

@media (prefers-reduced-motion: no-preference) {
	.heysec-badge .heysec-badge__shield {
		transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
	}

	.heysec-badge .heysec-badge__link:hover .heysec-badge__shield {
		transform: rotate(-8deg) scale(1.12);
	}

	.heysec-badge .heysec-badge__text {
		transition: opacity .2s ease;
	}

	.heysec-badge--arrived {
		animation: heysec-badge-in .45s ease-out both;
	}

	@keyframes heysec-badge-in {
		from {
			opacity: 0;
			transform: translateY(3px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}
}
