/**
 * Google Preferred Sources call to action.
 *
 * Colours read the host theme tokens with neutral fallbacks, so the block
 * adapts to light and dark mode without any extra configuration.
 */

.gpref-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 32px 0;
	padding: 18px 20px;
	border: 1px solid var(--line, #e5e5e5);
	border-radius: 10px;
}

.gpref-cta--inline {
	margin: 20px 0;
	padding: 12px 16px;
}

.gpref-cta--bare {
	justify-content: flex-start;
	margin: 24px 0;
	padding: 0;
	border: 0;
}

.gpref-cta__text {
	flex: 1 1 280px;
	min-width: 240px;
}

.gpref-cta__heading {
	margin: 0 0 4px;
	font-weight: 600;
	color: var(--fg, #111);
}

.gpref-cta--inline .gpref-cta__heading {
	flex: 1 1 auto;
	margin: 0;
	font-size: 0.95em;
	font-weight: 500;
}

.gpref-cta__body {
	margin: 0;
	font-size: 0.94em;
	color: var(--muted, #555);
}

.gpref-cta__action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

/* Own button, used by the deferred mode. */
.gpref-button {
	display: inline-block;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid var(--fg, #111);
	border-radius: 999px;
	background: var(--fg, #111);
	color: var(--bg, #fff);
	font: inherit;
	font-size: 0.9em;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: opacity 0.12s ease;
}

.gpref-button:hover {
	opacity: 0.85;
}

.gpref-button:focus-visible {
	outline: 2px solid var(--fg, #111);
	outline-offset: 2px;
}

.gpref-button[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* Explicit brand colour wins over the theme inversion. */
.gpref-cta--accent .gpref-button {
	border-color: var(--gpref-accent);
	background: var(--gpref-accent);
	color: #fff;
}

.gpref-cta--accent .gpref-button:focus-visible {
	outline-color: var(--gpref-accent);
}

.gpref-link {
	display: inline-block;
	padding: 9px 16px;
	border: 1px solid var(--line, #e5e5e5);
	border-radius: 999px;
	color: var(--fg, #111);
	font-size: 0.9em;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.gpref-link:hover,
.gpref-link:focus {
	border-color: var(--fg, #111);
}

.gpref-link--fallback {
	padding: 0;
	border: 0;
	border-radius: 0;
	font-size: 0.88em;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: var(--muted, #555);
}

.gpref-link--fallback:hover,
.gpref-link--fallback:focus {
	border: 0;
	color: var(--fg, #111);
}

.gpref-badge-link {
	display: inline-block;
	line-height: 0;
}

.gpref-badge {
	display: block;
	width: auto;
	height: 52px;
}

@media (max-width: 640px) {
	.gpref-cta {
		padding: 16px;
	}

	.gpref-cta--inline,
	.gpref-cta--bare {
		padding: 0;
	}

	.gpref-cta__action {
		width: 100%;
	}

	.gpref-badge {
		height: 46px;
	}
}
