/*
 * Reusable components: Button block styles. Loaded on the front end and in
 * the editor.
 *
 * Buttons are never filled. Every core/button looks like the "Text link"
 * style (theme.json styles.elements.button), so the default style is safe.
 *
 *   is-style-text-link   Source Sans 16px, rust, hairline underline, arrow
 *                        ("Ask about a consultation", "Development & Emotional Health")
 *   is-style-cta         Newsreader 24px, charcoal, accent underline, arrow
 *                        ("Getting started" closing link)
 *
 * The arrow is a masked ::after, so it takes the text colour and needs no
 * markup. It moves 5px right on hover, except with reduced motion.
 */

.wp-block-buttons {
	gap: 12px 28px;
}

.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-align: left;
	text-decoration: none;
	transition: color 0.35s ease, border-color 0.35s ease;
}

.wp-block-button .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 16px;
	height: 10px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none' stroke='%23000' stroke-width='1.3'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none' stroke='%23000' stroke-width='1.3'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.35s ease;
}

.wp-block-button .wp-block-button__link:hover::after {
	transform: translateX(5px);
}

/* Call to action: larger, serif, charcoal with an accent rule */
.wp-block-button.is-style-cta .wp-block-button__link {
	gap: 12px;
	padding: 12px 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 24px;
	letter-spacing: 0;
	line-height: normal;
	color: var(--wp--preset--color--contrast);
	border-bottom-color: var(--wp--custom--color--accent);
}

.wp-block-button.is-style-cta .wp-block-button__link:hover {
	color: var(--wp--preset--color--accent-text);
	border-bottom-color: var(--wp--custom--color--accent);
}

.wp-block-button.is-style-cta .wp-block-button__link::after {
	width: 18px;
	height: 12px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12' fill='none' stroke='%23000' stroke-width='1.3'%3E%3Cpath d='M0 6h16M11 1l5 5-5 5'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12' fill='none' stroke='%23000' stroke-width='1.3'%3E%3Cpath d='M0 6h16M11 1l5 5-5 5'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.wp-block-button .wp-block-button__link,
	.wp-block-button .wp-block-button__link::after {
		transition: none;
	}

	.wp-block-button .wp-block-button__link:hover::after {
		transform: none;
	}
}
