/* legal-buttons.css — Legal Corporate button hover states (design: .btn-gold, .btn-navy, .btn-line). Loaded with core/button. */

/*
 * Preset colour classes (.has-*-color, .has-*-background-color, .has-*-border-color)
 * are output as `var(--wp--preset--color--*) !important`, so hover rules redefine
 * the preset variable on the hovered link instead of overriding the property.
 */

/* Prototype radius is 4px; the parent's `sm` preset is 10px, which the header CTA and the global button style both use */
.wp-block-button__link {
	--wp--preset--border-radius--sm: 4px;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Prototype .btn sizing: .7rem / 1.25rem padding, 1.2 line height */
.wp-block-button .wp-block-button__link {
	padding: 0.7rem 1.25rem;
	line-height: 1.2;
}

/* Gold fill: darker gold (accent is the deep gold in both legal variations) */
.wp-block-button__link.has-primary-alt-accent-background-color:hover {
	--wp--preset--color--primary-alt-accent: var(--wp--preset--color--accent, #7f6424);
}

/* Gold fill with dark text (Tailored Services card): darker gold, white text */
.wp-block-button__link.has-primary-accent-background-color:hover {
	--wp--preset--color--primary-accent: var(--wp--preset--color--accent, #7f6424);
	--wp--preset--color--primary-alt: var(--wp--preset--color--base);
}

/* Navy fill: deeper navy */
.wp-block-button__link.has-primary-background-color:hover {
	--wp--preset--color--primary: var(--wp--preset--color--primary-alt);
}

/* Dark fill (gold CTA strip): navy */
.wp-block-button__link.has-primary-alt-background-color:hover {
	--wp--preset--color--primary-alt: var(--wp--preset--color--primary);
}

/*
 * Outline buttons: the fill colour is captured on the wrapper before the link
 * redefines the variable. Text and border share one preset variable, so the
 * border changes with the text.
 */

/* Outline on light backgrounds: fill navy, white text */
.wp-block-button.is-style-outline:hover {
	--legal-button-fill: var(--wp--preset--color--primary);
}

.is-style-outline > .wp-block-button__link.has-primary-color:hover {
	--wp--preset--color--primary: var(--wp--preset--color--base);
	background-color: var(--legal-button-fill);
}

/* Outline on the gold CTA strip: fill dark, white text */
.wp-block-button.is-style-outline:has(> .has-primary-alt-color):hover {
	--legal-button-fill: var(--wp--preset--color--primary-alt);
}

.is-style-outline > .wp-block-button__link.has-primary-alt-color:hover {
	--wp--preset--color--primary-alt: var(--wp--preset--color--base);
	background-color: var(--legal-button-fill);
}

/* Outline on the navy hero: white fill, navy text */
.is-style-legal-corporate-hero .wp-block-button.is-style-outline:hover {
	--legal-button-fill: var(--wp--preset--color--base);
}

.is-style-legal-corporate-hero .is-style-outline > .wp-block-button__link.has-base-color:hover {
	--wp--preset--color--base: var(--wp--preset--color--primary);
	background-color: var(--legal-button-fill);
	border-color: var(--legal-button-fill);
}

/* CTA strip button: white fill with an arrow (assets/images/icons/arrow-right.svg), navy on hover */
.legal-cta-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.legal-cta-button .wp-block-button__link::after {
	content: "";
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask: url("../../images/icons/arrow-right.svg") center / contain no-repeat;
	mask: url("../../images/icons/arrow-right.svg") center / contain no-repeat;
}

/* Swap fill and text: the wrapper captures both before the link redefines them */
.legal-cta-button:hover {
	--legal-button-fill: var(--wp--preset--color--primary);
	--legal-button-text: var(--wp--preset--color--base);
}

.legal-cta-button .wp-block-button__link.has-base-background-color:hover {
	--wp--preset--color--base: var(--legal-button-fill);
	--wp--preset--color--primary: var(--legal-button-text);
}
