/**
 * PDM Power-Up front-end styles.
 *
 * Only the call-to-action box generated by the plugin needs styling: everything
 * else in a generated article is a core block. Colours fall back to the theme
 * palette where it exists, so the box belongs to the site rather than fighting
 * it.
 */

.pdm-cta-box {
	margin: 2.5rem 0;
	padding: 1.75rem 2rem;
	border: 2px solid var(--wp--preset--color--primary, var(--wp--preset--color--vivid-cyan-blue, #2271b1));
	border-radius: 8px;
	background: var(--wp--preset--color--base-2, rgba(0, 0, 0, 0.035));
	text-align: center;
}

.pdm-cta-box__heading {
	margin: 0 0 0.5rem;
	font-size: 1.35em;
	line-height: 1.25;
}

.pdm-cta-box__text {
	max-width: 48ch;
	margin: 0 auto 1.25rem;
}

.pdm-cta-box__text:last-child {
	margin-bottom: 0;
}

.pdm-cta-box__action {
	margin: 0;
}

.pdm-cta-box a.pdm-cta-button {
	display: inline-block;
	padding: 0.75em 1.5em;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--color--primary, var(--wp--preset--color--vivid-cyan-blue, #2271b1));
	color: var(--wp--preset--color--base, #ffffff);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pdm-cta-box a.pdm-cta-button:hover,
.pdm-cta-box a.pdm-cta-button:focus {
	color: var(--wp--preset--color--base, #ffffff);
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
	text-decoration: none;
}

.pdm-cta-box a.pdm-cta-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {

	.pdm-cta-box {
		background: rgba(255, 255, 255, 0.05);
	}
}

@media (prefers-reduced-motion: reduce) {

	.pdm-cta-box a.pdm-cta-button {
		transition: none;
	}

	.pdm-cta-box a.pdm-cta-button:hover {
		transform: none;
	}
}
