/* MJ Blue Verification: shared badge styles (front end + wp-admin) */

.mjbv-badge {
	--mjbv-s: 1.15em;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	inline-size: var(--mjbv-s);
	block-size: var(--mjbv-s);
	min-inline-size: 16px;
	min-block-size: 16px;
	margin-inline: 3px;
	vertical-align: -0.2em;
	line-height: 1;
	isolation: isolate;
	filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .2));
	transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.mjbv-badge svg { display: block; inline-size: 100%; block-size: 100%; overflow: visible; }
.mjbv-badge:hover { transform: scale(1.12) rotate(-4deg); }
.mjbv-badge.mjbv-lg { --mjbv-s: 26px; }
.mjbv-badge.mjbv-xl { --mjbv-s: 52px; margin-inline: 0; }

/* Blue */
.mjbv-badge--blue { filter: drop-shadow(0 1px 1px rgba(29, 155, 240, .4)); }

/* White: needs a visible rim so it never disappears on a white page */
.mjbv-badge--white {
	filter: drop-shadow(0 0 .6px rgba(71, 85, 105, .85)) drop-shadow(0 1px 1.5px rgba(15, 23, 42, .22));
}

/* Gold: glow + rotating halo + sweeping shine */
.mjbv-badge--gold {
	filter: drop-shadow(0 0 3px rgba(246, 196, 67, .75)) drop-shadow(0 1px 1px rgba(143, 95, 0, .45));
}
.mjbv-badge--gold::before {
	content: "";
	position: absolute;
	inset: -30%;
	z-index: -1;
	border-radius: 50%;
	background: conic-gradient(from 0deg,
		rgba(255, 214, 90, 0) 0deg, rgba(255, 214, 90, .6) 70deg, rgba(255, 214, 90, 0) 140deg,
		rgba(255, 236, 160, .55) 230deg, rgba(255, 214, 90, 0) 300deg);
	animation: mjbvSpin 5s linear infinite;
}
.mjbv-badge--gold::after {
	content: "";
	position: absolute;
	inset: 6%;
	border-radius: 50%;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .85) 50%, transparent 62%);
	background-size: 260% 100%;
	background-position: 140% 0;
	mix-blend-mode: soft-light;
	animation: mjbvShine 3.2s ease-in-out infinite;
}

/* Blocked emoji marker */
.mjbv-emoji {
	display: inline-block;
	margin-inline: 3px;
	font-size: 1.05em;
	line-height: 1;
	vertical-align: -0.1em;
	animation: mjbvPulse 2.2s ease-in-out infinite;
}

/* Sparkles (spawned by admin.js on gold badges) */
.mjbv-spark {
	position: absolute;
	inset-inline-start: 50%;
	inset-block-start: 50%;
	inline-size: var(--s, 7px);
	block-size: var(--s, 7px);
	margin: calc(var(--s, 7px) / -2) 0 0 calc(var(--s, 7px) / -2);
	pointer-events: none;
	z-index: 3;
	background: radial-gradient(circle, #fff 0, #ffe27a 45%, rgba(255, 226, 122, 0) 72%);
	clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
	opacity: 0;
	animation: mjbvSpark 1s ease-out forwards;
}

@keyframes mjbvSpin { to { transform: rotate(360deg); } }
@keyframes mjbvShine { 0%, 35% { background-position: 140% 0; } 70%, 100% { background-position: -40% 0; } }
@keyframes mjbvPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes mjbvSpark {
	0% { opacity: 0; transform: translate(0, 0) scale(.2) rotate(0); }
	20% { opacity: 1; }
	100% { opacity: 0; transform: translate(var(--dx, 10px), var(--dy, -14px)) scale(1) rotate(160deg); }
}

/* Admin bar */
#wpadminbar .mjbv-badge { --mjbv-s: 16px; margin-inline: 4px 0; vertical-align: -3px; }

@media (prefers-reduced-motion: reduce) {
	.mjbv-badge, .mjbv-badge::before, .mjbv-badge::after, .mjbv-emoji, .mjbv-spark { animation: none !important; transition: none !important; }
}
