/*
 * CSS Modernizer
 *   Input:          3 rules
 *   Passes:         2 (converged)
 *   Max nest depth: 2
 */

/* ==========================================================================
   ebg elements - square buttons (class on core/button, no block style needed):
   .ebg-btn-sq          base: square corners, 1px border, fill swap on hover
   .ebg-btn-sq--light   light fill, for photos and dark bands
   .ebg-btn-sq--dark    ink fill, for light bands
   .is-style-ebg-square the same dark button for [ebg_contact_form button="ebg-square"]
   First used by the JMK entries (jmk_modern_corporate_ui mockup: "Explore Projects").
   ========================================================================== */

@layer components {
	:is(.ebg-btn-sq, .is-style-ebg-square) {
		> .wp-block-button__link {
			--ebg-btn-sq-bg: var(--ebg-surface-0);
			--ebg-btn-sq-ink: var(--ebg-ink);
			display: inline-flex;
			align-items: center;
			justify-content: center;
			min-block-size: 46px;
			padding: 0 var(--space-m);
			border: 1px solid var(--ebg-btn-sq-bg);
			border-radius: 0;
			background-color: var(--ebg-btn-sq-bg);
			box-shadow: none;
			color: var(--ebg-btn-sq-ink);
			font-family: var(--font-sans);
			font-size: var(--fs-17);
			font-weight: 500;
			line-height: 1.2;
			text-decoration: none;
			transition: var(--dur-fast) ease;
			transition-property: background-color, color;

			&:is(:hover, :focus-visible) {
				background-color: transparent;
				color: var(--ebg-btn-sq-bg);
			}
		}
	}
	:is(.ebg-btn-sq--dark, .is-style-ebg-square) > .wp-block-button__link {
		--ebg-btn-sq-bg: var(--ebg-surface-anchor);
		--ebg-btn-sq-ink: var(--ebg-on-dark);
	}
}

