/* Checkout rows: method name on the left, brand icons on the right. */

.h5payment-method-label {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	gap: 8px;
}

.h5payment-method-icons {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	margin-left: auto;
	flex-shrink: 0;
	line-height: 1;
	white-space: nowrap;
}

.h5payment-method-icons img.h5payment-icon,
#payment .payment_methods .h5payment-method-icons img.h5payment-icon,
#payment .wc_payment_methods .h5payment-method-icons img.h5payment-icon,
.wc-block-components-radio-control__label .h5payment-method-icons img.h5payment-icon {
	display: block;
	box-sizing: border-box;
	height: 22px !important;
	width: auto !important;
	max-width: none !important;
	max-height: 22px !important;
	min-height: 22px;
	margin: 0 !important;
	padding: 0;
	float: none !important;
	border: 0;
	border-radius: 0;
	box-shadow: none !important;
	background: transparent;
	object-fit: contain;
}

.h5payment-method-icons .h5payment-icon--paypal {
	min-width: 91px;
}

.h5payment-method-icons .h5payment-icon--google-pay,
.h5payment-method-icons .h5payment-icon--apple-pay,
.h5payment-method-icons .h5payment-icon--stripe {
	min-width: 70px;
}

.h5payment-method-icons .h5payment-icon--visa,
.h5payment-method-icons .h5payment-icon--mastercard,
.h5payment-method-icons .h5payment-icon--amex {
	min-width: 44px;
}

#payment .payment_methods li[class*="payment_method_h5payment"] > label,
#payment .wc_payment_methods li[class*="payment_method_h5payment"] > label {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: calc(100% - 32px);
	min-height: 32px;
	margin: 0;
	gap: 8px;
	vertical-align: middle;
}

#payment .payment_methods li[class*="payment_method_h5payment"] > input.input-radio,
#payment .wc_payment_methods li[class*="payment_method_h5payment"] > input.input-radio {
	float: none;
	margin: 0 8px 0 0;
	vertical-align: middle;
}

.wc-block-components-radio-control__option:has(.h5payment-method-label) .wc-block-components-radio-control__label {
	flex: 1;
	width: 100%;
}

.h5payment-checkout-description {
	color: inherit;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.h5payment-checkout-description > p:first-child {
	margin-top: 0;
}

.h5payment-checkout-description > p:last-child {
	margin-bottom: 0;
}

.h5payment-paypal-card-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px 12px;
}

.h5payment-paypal-card-grid > div {
	min-width: 0;
}

.h5payment-paypal-card-grid .h5payment-card-name {
	grid-column: 1 / -1;
}

.h5payment-paypal-card-grid .h5payment-card-label {
	display: block;
	margin-bottom: 5px;
	color: #202733;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
}

/*
 * PayPal sizes its iframe to the input plus equal spacing above and below it. The frame
 * follows that height instead of fixing its own, which keeps the text vertically centred.
 */
.h5payment-paypal-card-grid .h5payment-card-frame {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 50px;
	overflow: hidden;
	border: 1px solid #d5dbe3;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 1px 2px rgb(16 24 40 / 5%);
}

.h5payment-paypal-card-grid .h5payment-card-frame > * {
	flex: 1 1 auto;
	min-width: 0;
}

.h5payment-paypal-card-grid .h5payment-card-frame:focus-within {
	border-color: #1762b8;
	box-shadow: 0 0 0 2px rgb(23 98 184 / 18%);
}

.h5payment-paypal-card-grid .h5payment-card-frame iframe {
	border: 0;
}

@media (max-width: 600px) {
	.h5payment-paypal-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.h5payment-paypal-card-grid .h5payment-card-number {
		grid-column: 1 / -1;
	}
}

.h5payment-card-status:empty {
	display: none;
}

.h5payment-wallet-place-order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	font-weight: 600;
}

@media (max-width: 480px) {
	.h5payment-method-icons {
		gap: 2px;
	}

	.h5payment-method-icons .h5payment-icon--visa,
	.h5payment-method-icons .h5payment-icon--mastercard,
	.h5payment-method-icons .h5payment-icon--amex {
		min-width: 38px;
	}
}
