/* "Link" Button style: strips the pill look down to a plain text link,
   mirroring the site's normal link hover behaviour (underline at rest, no
   underline + secondary color on hover, per theme.json's "link" element)
   rather than the button's own fill/lift treatment. Loaded via
   register_block_style()'s style_handle, which WordPress enqueues
   automatically in both the editor and the front end for this block style —
   unlike a plain editor-styles.css copy, which wasn't actually reaching the
   editor iframe.
   The class is repeated in each selector (.is-style-link.is-style-link) to
   push specificity past style.css's generic ".wp-block-button:hover" rule.
   That rule LOOKS lower-specificity at a glance (it matches the plain
   ".wp-block-button" branch of a comma list), but CSS Nesting implicitly
   wraps a comma-separated parent selector in :is(...) — and :is()'s
   specificity is defined as its MOST SPECIFIC branch, not whichever branch
   actually matched. Since that same rule's other branch is
   ".wp-block-button.is-style-outline", the effective specificity of the
   whole nested rule (even for elements only matching the plain
   ".wp-block-button" branch) gets boosted to 2 classes + the "a" tag +
   ":hover" — verified via DevTools this was in fact still winning over a
   single, un-repeated .is-style-external-link class. */
.wp-block-button.is-style-link.is-style-link .wp-block-button__link,
.wp-block-button.is-style-external-link.is-style-external-link .wp-block-button__link {
	background: none !important;
	color: var(--wp--custom--color--primary) !important;
	padding: 0;
	border: none;
	border-radius: 0;
	text-decoration: underline;
	font-weight: inherit;
}

.wp-block-button.is-style-link.is-style-link .wp-block-button__link:hover,
.wp-block-button.is-style-external-link.is-style-external-link .wp-block-button__link:hover {
	transform: none !important;
	background: none !important;
	color: var(--wp--custom--color--secondary) !important;
	border-color: transparent !important;
	text-decoration: none;
}

/* "External Link" style: same as "Link", plus a trailing icon rendered as a
   CSS mask (rather than a plain background-image) so it inherits the
   button's own text color — including the hover color swap above — instead
   of being a fixed, uncolorable image. mask-mode: alpha is set explicitly
   because unprefixed mask-image defaults to luminance-based masking (which
   would render this specific icon invisible, since its shape is solid black
   on transparent — zero luminance throughout); the -webkit-mask-image
   fallback is needed for Safari, which only supports the prefixed property.
   display: inline-block on the icon is also what keeps the Link style's
   underline from being drawn across it. */
.wp-block-button.is-style-external-link .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
}

.wp-block-button.is-style-external-link .wp-block-button__link::after {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	background-color: currentColor;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17' fill='none'%3E%3Cpath d='M9.00528 8.57406C9.17842 8.57406 9.34441 8.50505 9.46686 8.38237L15.6154 2.23065V5.41107C15.6154 5.64459 15.74 5.86034 15.942 5.9771C16.1441 6.09386 16.3931 6.09386 16.5952 5.9771C16.7972 5.86034 16.9218 5.64459 16.9218 5.41107V0.653511C16.9218 0.480113 16.853 0.314034 16.7305 0.191348C16.6081 0.0686622 16.4419 0 16.2686 0H11.5135C11.2801 0 11.0644 0.124603 10.9477 0.326755C10.831 0.528908 10.831 0.778114 10.9477 0.980267C11.0644 1.18242 11.2801 1.30702 11.5135 1.30702H14.6923L8.50016 7.45874C8.37788 7.58125 8.30908 7.7475 8.30908 7.92055C8.30908 8.09378 8.37788 8.25986 8.50033 8.38237C8.62261 8.50488 8.7886 8.57372 8.96174 8.57389H9.00528V8.57406Z' fill='black'/%3E%3Cpath d='M16.3381 9.20144C16.1648 9.20144 15.9988 9.27027 15.8762 9.39278C15.7536 9.51529 15.6849 9.68155 15.6849 9.85495V15.2573C15.6849 15.3706 15.64 15.4791 15.5599 15.5591C15.4798 15.6391 15.3712 15.6843 15.2582 15.6843H1.7418C1.62859 15.6843 1.52007 15.6393 1.44012 15.5591C1.36017 15.479 1.31506 15.3704 1.31506 15.2573V1.73398C1.31506 1.62071 1.36 1.51214 1.44012 1.43215C1.52025 1.35216 1.62876 1.30702 1.7418 1.30702H6.854C7.0874 1.30702 7.30303 1.18242 7.41973 0.980267C7.53643 0.778114 7.53643 0.528908 7.41973 0.326755C7.30303 0.124603 7.0874 0 6.854 0H1.7418C1.27988 0 0.836762 0.18368 0.510174 0.510436C0.183586 0.837191 0 1.28053 0 1.7427V15.2573C0 15.7195 0.183586 16.1628 0.510174 16.4896C0.836762 16.8163 1.27988 17 1.7418 17H15.2582C15.7201 17 16.1632 16.8163 16.4898 16.4896C16.8164 16.1628 17 15.7195 17 15.2573V9.85495C17 9.68015 16.93 9.51251 16.8056 9.38965C16.6812 9.26679 16.5128 9.199 16.3381 9.20144Z' fill='black'/%3E%3C/svg%3E");
	mask-repeat: no-repeat;
	mask-size: contain;
	mask-position: center;
	mask-mode: alpha;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17' fill='none'%3E%3Cpath d='M9.00528 8.57406C9.17842 8.57406 9.34441 8.50505 9.46686 8.38237L15.6154 2.23065V5.41107C15.6154 5.64459 15.74 5.86034 15.942 5.9771C16.1441 6.09386 16.3931 6.09386 16.5952 5.9771C16.7972 5.86034 16.9218 5.64459 16.9218 5.41107V0.653511C16.9218 0.480113 16.853 0.314034 16.7305 0.191348C16.6081 0.0686622 16.4419 0 16.2686 0H11.5135C11.2801 0 11.0644 0.124603 10.9477 0.326755C10.831 0.528908 10.831 0.778114 10.9477 0.980267C11.0644 1.18242 11.2801 1.30702 11.5135 1.30702H14.6923L8.50016 7.45874C8.37788 7.58125 8.30908 7.7475 8.30908 7.92055C8.30908 8.09378 8.37788 8.25986 8.50033 8.38237C8.62261 8.50488 8.7886 8.57372 8.96174 8.57389H9.00528V8.57406Z' fill='black'/%3E%3Cpath d='M16.3381 9.20144C16.1648 9.20144 15.9988 9.27027 15.8762 9.39278C15.7536 9.51529 15.6849 9.68155 15.6849 9.85495V15.2573C15.6849 15.3706 15.64 15.4791 15.5599 15.5591C15.4798 15.6391 15.3712 15.6843 15.2582 15.6843H1.7418C1.62859 15.6843 1.52007 15.6393 1.44012 15.5591C1.36017 15.479 1.31506 15.3704 1.31506 15.2573V1.73398C1.31506 1.62071 1.36 1.51214 1.44012 1.43215C1.52025 1.35216 1.62876 1.30702 1.7418 1.30702H6.854C7.0874 1.30702 7.30303 1.18242 7.41973 0.980267C7.53643 0.778114 7.53643 0.528908 7.41973 0.326755C7.30303 0.124603 7.0874 0 6.854 0H1.7418C1.27988 0 0.836762 0.18368 0.510174 0.510436C0.183586 0.837191 0 1.28053 0 1.7427V15.2573C0 15.7195 0.183586 16.1628 0.510174 16.4896C0.836762 16.8163 1.27988 17 1.7418 17H15.2582C15.7201 17 16.1632 16.8163 16.4898 16.4896C16.8164 16.1628 17 15.7195 17 15.2573V9.85495C17 9.68015 16.93 9.51251 16.8056 9.38965C16.6812 9.26679 16.5128 9.199 16.3381 9.20144Z' fill='black'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	-webkit-mask-position: center;
}
