/**
 * Checkout gateway selector, restyled as side-by-side tiles.
 *
 * Targets only the markup EDD renders for its gateway chooser
 * (#edd_payment_mode_select). The Stripe Payment Element and the PayPal button
 * that open below the chooser are untouched.
 */

/* The card-brand strip that used to sit above the selector is now redundant:
   the Card tile carries its own logos, and PayPal no longer masquerades as a
   card network in that row. Scoped to the checkout purchase form — the strip is
   a direct child of #edd_purchase_form, not the selector wrapper — so any other
   .edd-payment-icons EDD may render elsewhere is left alone. */
#edd_checkout_form_wrap .edd-payment-icons { display: none !important; }

#edd_payment_mode_select {
	--pm-accent: #2f6bed;
	--pm-line: #d6dce7;
	--pm-line-hover: #b9c3d6;
	--pm-ink: #161d2b;
	--pm-muted: #616b7d;
	border: 0;
	padding: 0;
	margin: 0 0 4px;
}

#edd_payment_mode_select legend {
	float: none;
	width: auto;
	border: 0;
	padding: 0;
	margin: 0 0 14px;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--pm-ink);
}

#edd-payment-mode-wrap {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

@media (max-width: 560px) {
	#edd-payment-mode-wrap { flex-direction: column; }
}

#edd-payment-mode-wrap label.edd-gateway-option {
	flex: 1 1 0;
	min-width: 240px;
	box-sizing: border-box;
	display: flex !important;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 15px 16px;
	float: none;
	border: 1.5px solid var(--pm-line);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: border-color .12s ease, box-shadow .12s ease;
	font-weight: 600;
	color: var(--pm-ink);
	line-height: 1.25;
	text-align: left;
}

#edd-payment-mode-wrap label.edd-gateway-option:hover {
	border-color: var(--pm-line-hover);
}

#edd-payment-mode-wrap label.edd-gateway-option.edd-gateway-option-selected {
	border-color: var(--pm-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pm-accent) 16%, transparent);
}

/* The custom radio drops the native focus ring, so give the tile a visible one
   when its radio is focused by keyboard. */
#edd-payment-mode-wrap label.edd-gateway-option:focus-within {
	border-color: var(--pm-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pm-accent) 35%, transparent);
}

#edd-payment-mode-wrap .edd-gateway:focus-visible {
	outline: 2px solid var(--pm-accent);
	outline-offset: 2px;
}

#edd-payment-mode-wrap .edd-gateway {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	border-radius: 50%;
	border: 2px solid var(--pm-line);
	background: #fff;
	position: relative;
	cursor: pointer;
}

#edd-payment-mode-wrap .edd-gateway-option-selected .edd-gateway {
	border-color: var(--pm-accent);
}

#edd-payment-mode-wrap .edd-gateway-option-selected .edd-gateway::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--pm-accent);
}

/* Text label + optional subline injected by the script. */
.wpstg-pm-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.wpstg-pm-sub {
	font-weight: 450;
	font-size: .78rem;
	color: var(--pm-muted);
	margin-top: 2px;
}

.wpstg-pm-logos {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 9px;
}

.wpstg-pm-logos svg {
	display: block;
	height: 20px;
	width: auto;
	border-radius: 3px;
}

/* "Secure payments by Stripe" trust badge above the card fields. */
.wpstg-stripe-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 16px 0 2px;
	font-size: .82rem;
	color: #616b7d;
}

.wpstg-stripe-badge svg { flex: none; }

.wpstg-stripe-badge b {
	color: #161d2b;
	font-weight: 800;
	letter-spacing: -.01em;
}
