/*
 * Native WordPress buttons: core/button's rendered markup
 * (.wp-block-button__link / .wp-element-button) plus submit buttons used in
 * forms. Scoped to button[type="submit"] (and the type-less default, which
 * is also "submit") rather than every <button> — bespoke UI controls like
 * the header's icon toggles explicitly set type="button" and keep their own
 * component styling instead of the pill/CTA look. Also excludes
 * [class*="solea-"], matching native-forms.css's convention: bespoke
 * components like the hero's circular search-submit button already carry
 * full styling under their own component class and must not be fought over
 * here (this pill/CTA padding was collapsing that button's circle shape).
 */
body:not(.wp-admin) .wp-block-button__link,
body:not(.wp-admin) .wp-element-button,
body:not(.wp-admin) button:not([type="button"]):not([type="reset"]):not([class*="solea-"]),
body:not(.wp-admin) input[type="submit"]:not([class*="solea-"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0 28px;
	border: none;
	border-radius: 1000px;
	font-family: inherit;
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	background: var(--wp--preset--color--brand-purple);
	color: var(--wp--preset--color--base);
	transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

body:not(.wp-admin) .wp-block-button__link:hover,
body:not(.wp-admin) .wp-element-button:hover,
body:not(.wp-admin) button:not([type="button"]):not([type="reset"]):not([class*="solea-"]):hover,
body:not(.wp-admin) input[type="submit"]:not([class*="solea-"]):hover {
	background: var(--wp--preset--color--brand-purple-dark);
	color: var(--wp--preset--color--base);
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -14px rgba(57, 18, 102, 0.35);
}

/* .is-style-outline is a WP core block style variation, not a custom one. */
body:not(.wp-admin) .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--brand-purple-light);
	border: 1.5px solid var(--wp--preset--color--brand-purple-light);
}

body:not(.wp-admin) .is-style-outline .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--brand-accent-light);
	border-color: var(--wp--preset--color--brand-accent-light);
	box-shadow: none;
}

/*
 * External-link arrow for buttons opening in a new tab. Uses a mask
 * (not a background-image) so the icon is filled with currentColor and
 * automatically follows the button's text color, including on hover and
 * on the outline style variation above.
 */
body:not(.wp-admin) .wp-block-button__link[target="_blank"]::after,
body:not(.wp-admin) .wp-element-button[target="_blank"]::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 17 17 7M17 7H9M17 7v8'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 17 17 7M17 7H9M17 7v8'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/*
 * For a CTA on a dark background, editors can set the block's own
 * background/text color to Base/Brand Violet foncé from the block toolbar
 * (both already in the theme palette) rather than needing a dedicated style
 * variation — the hover lift and shadow above still apply on top of that.
 */
