/* Review Flywheel checkout payment method selector */
.rfw-payment-methods {
	min-width: 0;
	width: 100%;
	margin: 20px 0 0;
	padding: 0;
	border: 0;
	container-type: inline-size;
}

.rfw-payment-methods legend {
	display: block;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
	color: #172033;
}

.rfw-payment-methods__options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	width: 100%;
}

/*
 * Keep these selectors deliberately more specific than the generic checkout
 * label/span rules used by the Guide and Software forms. Those rules centre
 * helper text and were squeezing this control into narrow, centred columns.
 */
.rfw-payment-methods .rfw-payment-method {
	position: relative;
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 12px;
	min-width: 0;
	min-height: 82px;
	margin: 0;
	padding: 15px 16px;
	border: 1.5px solid #d5deeb;
	border-radius: 13px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
	cursor: pointer;
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.rfw-payment-methods .rfw-payment-method:hover {
	border-color: #9eb7e4;
	background: #fbfdff;
}

.rfw-payment-methods .rfw-payment-method:has(input:checked) {
	border-color: #1667ff;
	background: #f5f9ff;
	box-shadow: 0 0 0 3px rgba(22, 103, 255, .10);
}

.rfw-payment-methods .rfw-payment-method input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.rfw-payment-method__mark {
	position: relative;
	display: block;
	width: 20px;
	height: 20px;
	border: 2px solid #98a4b7;
	border-radius: 50%;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .16s ease, background-color .16s ease;
}

.rfw-payment-method__mark::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	transform: translate(-50%, -50%) scale(0);
	transition: transform .16s ease;
}

.rfw-payment-method input:checked + .rfw-payment-method__mark {
	border-color: #1667ff;
	background: #1667ff;
}

.rfw-payment-method input:checked + .rfw-payment-method__mark::after {
	transform: translate(-50%, -50%) scale(1);
}

.rfw-payment-method input:focus-visible + .rfw-payment-method__mark {
	outline: 3px solid rgba(22, 103, 255, .22);
	outline-offset: 3px;
}

.rfw-payment-methods .rfw-payment-method > .rfw-payment-method__copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	text-align: left;
	line-height: 1.25;
}

.rfw-payment-methods .rfw-payment-method__copy strong {
	display: block;
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	text-align: left;
	color: #172033;
}

.rfw-payment-methods .rfw-payment-method__copy small {
	display: block;
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	text-align: left;
	color: #667085;
}

.rfw-payment-methods .rfw-payment-method__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 5px 9px;
	border: 1px solid #d7dfeb;
	border-radius: 7px;
	background: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	color: #445168;
	white-space: nowrap;
}

.rfw-payment-methods .rfw-payment-method__badge--paypal {
	color: #123a78;
}

/* The selector often sits in a narrow checkout column even on desktop. */
@container (max-width: 560px) {
	.rfw-payment-methods__options {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.rfw-payment-methods .rfw-payment-method {
		min-height: 72px;
		padding: 14px 16px;
	}
}

/* Fallback for browsers without container-query support. */
@media (max-width: 680px) {
	.rfw-payment-methods__options {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.rfw-payment-methods .rfw-payment-method {
		min-height: 72px;
		padding: 14px 16px;
	}
}

@media (max-width: 390px) {
	.rfw-payment-methods .rfw-payment-method {
		grid-template-columns: 22px minmax(0, 1fr);
		padding: 14px;
	}

	.rfw-payment-methods .rfw-payment-method__badge {
		display: none;
	}
}
