/**
 * Shared button styles.
 *
 * Standard call-to-action button reused across the plugin's elements. Based on
 * the slider's primary button (`.kbeu-sliders__btn--primary`).
 *
 * Usage: put `.kbeu-btn` for the shared shape and add a fill modifier —
 * `.kbeu-btn--primary` for the blue call-to-action, `.kbeu-btn--white` for a white
 * fill (dark text) meant to sit over imagery/dark overlays, or
 * `.kbeu-btn--transparent` for a transparent, white-outlined button that fills white
 * on hover (also for over imagery/dark overlays; mirrors
 * `.kbeu-sliders__btn--secondary`), or `.kbeu-btn--outline` for a transparent,
 * ink-outlined button on a light background that fills ink on hover (the news
 * grid's "More news"). Elements may still add their own class for
 * context-specific spacing (margin, font-family, …).
 */

:root {
	--kbeu-btn-primary-bg: var( --kbeu-color-teal );
	--kbeu-btn-primary-bg-hover: var( --kbeu-color-teal-dark );
}

/* Shared shape: size, radius, typography, transition. */
.kbeu-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 72px;
	border: 2px solid transparent;
	border-radius: 15px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Blue call-to-action fill. */
.kbeu-btn--primary {
	background-color: var( --kbeu-btn-primary-bg );
	border-color: var( --kbeu-btn-primary-bg );
	color: #fff;
}

.kbeu-btn--primary:hover,
.kbeu-btn--primary:focus,
.kbeu-btn--primary:focus-visible {
	background-color: var( --kbeu-btn-primary-bg-hover );
	border-color: var( --kbeu-btn-primary-bg-hover );
	color: #fff;
}

/* White fill (dark text) — for buttons placed over imagery or dark overlays.
   Hover switches to the blue call-to-action fill. */
.kbeu-btn--white {
	background-color: #fff;
	border-color: #fff;
	color: #000;
}

.kbeu-btn--white:hover,
.kbeu-btn--white:focus,
.kbeu-btn--white:focus-visible {
	background-color: var( --kbeu-btn-primary-bg );
	border-color: var( --kbeu-btn-primary-bg );
	color: #fff;
}

/* Transparent fill with a white outline and white text — for buttons placed over
   imagery or dark overlays. Hover fills solid white with dark text. Mirrors
   `.kbeu-sliders__btn--secondary`. */
.kbeu-btn--transparent {
	background-color: transparent;
	border-color: rgba( 255, 255, 255, 0.8 );
	color: #fff;
}

.kbeu-btn--transparent:hover,
.kbeu-btn--transparent:focus,
.kbeu-btn--transparent:focus-visible {
	background-color: #fff;
	border-color: #fff;
	color: var( --kbeu-color-near-black );
}

/* Transparent fill with a thin ink outline and ink text — for buttons on a light
   background (Figma 3727-7134, "More news"). Hover fills solid ink with white text. */
.kbeu-btn--outline {
	background-color: transparent;
	border-color: var( --kbeu-color-ink-alt );
	color: var( --kbeu-color-ink-alt );
}

.kbeu-btn--outline:hover,
.kbeu-btn--outline:focus,
.kbeu-btn--outline:focus-visible {
	background-color: var( --kbeu-color-ink-alt );
	border-color: var( --kbeu-color-ink-alt );
	color: #fff;
}

/* Impreza's `.no-touch a:hover` (0-2-1) out-ranks the hover labels above and paints
   them with its link hover variable, so each button sets that variable to its own
   label. No specificity is raised: an element's stronger hover rule still wins. */
.kbeu-btn--primary,
.kbeu-btn--white,
.kbeu-btn--outline {
	--color-content-link-hover: #fff;
}

.kbeu-btn--transparent {
	--color-content-link-hover: var( --kbeu-color-near-black );
}

@media ( prefers-reduced-motion: reduce ) {
	.kbeu-btn {
		transition: none;
	}
}
