/*
 * Media Minds GPreference badges
 */

:root {
	/* Set via inline style vars from Settings::inline_css_vars() */
	--mm-gpref-footer-ui: #ffffff;
	--mm-gpref-blue: #4285f4;
	--mm-gpref-green: #34a853;
}

.mm-gpref-footer-badge-wrap {
	display: flex;
	justify-content: flex-start;
	padding: 12px 0 4px;
}

.mm-gpref-footer-badge {
	--mm-gpref-outline: 2px;
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 18px;
	border-radius: 14px;
	background: transparent;
	border: var(--mm-gpref-outline) solid var(--mm-gpref-footer-ui);
	color: var(--mm-gpref-footer-ui);
	cursor: pointer;
	text-decoration: none;
	transition: border-color 280ms ease;
}

.mm-gpref-footer-badge:hover,
.mm-gpref-footer-badge:focus-visible {
	color: var(--mm-gpref-footer-ui);
	text-decoration: none;
}

/* Gradient lives only on the rounded outline — interior stays transparent */
.mm-gpref-footer-badge::before {
	content: '';
	position: absolute;
	inset: calc(var(--mm-gpref-outline) * -1);
	border-radius: inherit;
	padding: var(--mm-gpref-outline);
	background: linear-gradient(
		90deg,
		#4285f4,
		#ea4335,
		#fbbc05,
		#34a853,
		#4285f4
	);
	background-size: 300% 100%;
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	pointer-events: none;
	z-index: 0;
	transition: opacity 400ms ease;
}

.mm-gpref-footer-badge:hover {
	border-color: transparent;
}

.mm-gpref-footer-badge:hover::before {
	opacity: 1;
	animation: mm-gpref-gradient-pulse 3.6s ease-in-out infinite;
}

@keyframes mm-gpref-gradient-pulse {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.mm-gpref-footer-badge__icon,
.mm-gpref-footer-badge__text {
	position: relative;
	z-index: 1;
}

.mm-gpref-footer-badge__icon {
	font-size: 34px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
}

.mm-gpref-footer-badge__text {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-align: left;
}

/* Top of navigation badge (in primary menu) */
.mm-gpref-top-nav {
	display: flex;
	align-items: center;
}

.mm-gpref-top-nav__link {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.mm-gpref-top-nav__img {
	height: 26px;
	width: auto;
	display: block;
}

/* Blog content badge (generated UI) */
.mm-gpref-blog-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--mm-gpref-blue);
	color: #fff;
	font-weight: 700;
	line-height: 1.1;
	margin: 14px 0;
	text-decoration: none;
	cursor: pointer;
	transition: background 220ms ease, transform 220ms ease;
}

.mm-gpref-blog-badge:hover,
.mm-gpref-blog-badge:focus-visible {
	color: #fff;
	text-decoration: none;
}

.mm-gpref-blog-badge__icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
}

.mm-gpref-blog-badge__text {
	font-size: 14px;
	letter-spacing: 0.1px;
}

.mm-gpref-blog-badge:hover {
	background: var(--mm-gpref-green);
	transform: translateY(-1px);
}

