/*
 * Shared homepage and loan-product hero CTA component.
 * The existing Elementor structures differ, so geometry is normalized from
 * the group through the button wrapper instead of sizing from label length.
 */

:root {
	--twl-cta-ink: #0a1220;
	--twl-cta-accent: #63c1fe;
	--twl-cta-accent-active: #8bd2ff;
	--twl-cta-radius: 8px;
	--twl-cta-gap: 16px;
}

/* Homepage pair: preserve the approved 2-column composition. */
body.home.page-id-842 .elementor-element-7e6d44c.wright-cta-group,
body.home.page-id-842 .elementor-element-7e6d44c.wright-cta-group.e-con.e-flex {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	align-items: stretch !important;
	gap: 14px var(--twl-cta-gap) !important;
	width: min(100%, 640px) !important;
	max-width: 640px !important;
}

/*
 * Loan pages use two different Elementor container types for the two actions.
 * Select their smallest shared two-child container and give it the same grid
 * behavior as the homepage pair.
 */
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) .e-con.e-child:has(> .e-con.e-child:first-child .wright-product-cta-primary):has(> .e-con.e-child:nth-child(2):last-child .wright-product-cta-secondary) {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	align-items: stretch !important;
	gap: var(--twl-cta-gap) !important;
	width: min(100%, 640px) !important;
	max-width: 640px !important;
	margin-inline: auto !important;
}

:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) .e-con.e-child:has(> .e-con.e-child:first-child .wright-product-cta-primary):has(> .e-con.e-child:nth-child(2):last-child .wright-product-cta-secondary) > .e-con.e-child,
body.home.page-id-842 .wright-cta-group > .e-con.e-child {
	width: auto !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Remove Elementor's label-dependent inner sizing on both surfaces. */
body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary),
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) {
	align-self: stretch !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) :is(.elementor-widget-container, .elementor-button-wrapper),
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) :is(.elementor-widget-container, .elementor-button-wrapper) {
	width: 100% !important;
	min-width: 0 !important;
	height: 100% !important;
}

body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) .elementor-button,
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) .elementor-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-width: 0 !important;
	min-height: 56px !important;
	height: 100% !important;
	box-sizing: border-box !important;
	padding: 14px 20px !important;
	border-radius: var(--twl-cta-radius) !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	text-align: center !important;
	white-space: nowrap !important;
	background-image: none !important;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
}

body.home.page-id-842 .wright-cta-primary .elementor-button,
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) .wright-product-cta-primary .elementor-button {
	background: #000000 !important;
	border: 2px solid #000000 !important;
	box-shadow: none !important;
	color: #ffffff !important;
}

body.home.page-id-842 .wright-cta-secondary .elementor-button,
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) .wright-product-cta-secondary .elementor-button {
	background: var(--twl-cta-ink) !important;
	border: 2px solid var(--twl-cta-accent) !important;
	box-shadow: none !important;
	color: #ffffff !important;
}

body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) .elementor-button:hover,
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) .elementor-button:hover {
	background: var(--twl-cta-accent) !important;
	border-color: var(--twl-cta-accent) !important;
	box-shadow: none !important;
	color: var(--twl-cta-ink) !important;
	transform: none !important;
}

body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) .elementor-button:active,
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) .elementor-button:active {
	background: var(--twl-cta-accent-active) !important;
	border-color: var(--twl-cta-accent-active) !important;
	color: var(--twl-cta-ink) !important;
}

body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) .elementor-button:focus-visible,
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) .elementor-button:focus-visible {
	outline: 3px solid #ffffff !important;
	outline-offset: 3px !important;
}

body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) :is(.elementor-button-content-wrapper, .elementor-button-text),
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) :is(.elementor-button-content-wrapper, .elementor-button-text) {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-width: 0 !important;
	text-align: center !important;
}

body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) .elementor-button-icon,
:is(
	body.page-id-1018,
	body.page-id-1055,
	body.page-id-1093,
	body.page-id-1113,
	body.page-id-1143,
	body.page-id-1159,
	body.page-id-1180,
	body.page-id-1205,
	body.page-id-1206,
	body.page-id-1236,
	body.page-id-1251,
	body.page-id-1259,
	body.page-id-1275,
	body.page-id-1291,
	body.page-id-1306,
	body.page-id-1323,
	body.page-id-1339,
	body.page-id-2647,
	body.page-id-2663
) :is(.wright-product-cta-primary, .wright-product-cta-secondary) .elementor-button-icon {
	display: none !important;
}

@media (max-width: 767px) {
	body.home.page-id-842 .elementor-element-7e6d44c.wright-cta-group,
	body.home.page-id-842 .elementor-element-7e6d44c.wright-cta-group.e-con.e-flex,
	:is(
		body.page-id-1018,
		body.page-id-1055,
		body.page-id-1093,
		body.page-id-1113,
		body.page-id-1143,
		body.page-id-1159,
		body.page-id-1180,
		body.page-id-1205,
		body.page-id-1206,
		body.page-id-1236,
		body.page-id-1251,
		body.page-id-1259,
		body.page-id-1275,
		body.page-id-1291,
		body.page-id-1306,
		body.page-id-1323,
		body.page-id-1339,
		body.page-id-2647,
		body.page-id-2663
	) .e-con.e-child:has(> .e-con.e-child:first-child .wright-product-cta-primary):has(> .e-con.e-child:nth-child(2):last-child .wright-product-cta-secondary) {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 12px !important;
		width: min(100%, 360px) !important;
		margin-inline: auto !important;
	}

	body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) .elementor-button,
	:is(
		body.page-id-1018,
		body.page-id-1055,
		body.page-id-1093,
		body.page-id-1113,
		body.page-id-1143,
		body.page-id-1159,
		body.page-id-1180,
		body.page-id-1205,
		body.page-id-1206,
		body.page-id-1236,
		body.page-id-1251,
		body.page-id-1259,
		body.page-id-1275,
		body.page-id-1291,
		body.page-id-1306,
		body.page-id-1323,
		body.page-id-1339,
		body.page-id-2647,
		body.page-id-2663
	) :is(.wright-product-cta-primary, .wright-product-cta-secondary) .elementor-button {
		min-height: 54px !important;
		font-size: 16px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home.page-id-842 :is(.wright-cta-primary, .wright-cta-secondary) .elementor-button,
	:is(
		body.page-id-1018,
		body.page-id-1055,
		body.page-id-1093,
		body.page-id-1113,
		body.page-id-1143,
		body.page-id-1159,
		body.page-id-1180,
		body.page-id-1205,
		body.page-id-1206,
		body.page-id-1236,
		body.page-id-1251,
		body.page-id-1259,
		body.page-id-1275,
		body.page-id-1291,
		body.page-id-1306,
		body.page-id-1323,
		body.page-id-1339,
		body.page-id-2647,
		body.page-id-2663
	) :is(.wright-product-cta-primary, .wright-product-cta-secondary) .elementor-button {
		transition: none !important;
	}
}
