/* Card Payments: layout only; colours and type come from the theme and the card form's own theme. */
.card-payments-confirming {
	display: grid;
	gap: 1rem;
	max-width: 32rem;
	margin-block: 1rem;
}

/* The card form is one panel. Its border is the theme's text colour at low strength (a plain grey where color-mix() is
 * not supported), so it suits light and dark themes alike. */
.card-payments-card-form {
	display: grid;
	gap: 0.75rem;
	box-sizing: border-box;
	max-width: 32rem;
	margin-block: 1rem;
	padding: 1.25rem;
	border: 1px solid rgba(128, 128, 128, 0.35);
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 6px;
}

.card-payments-card-form > * {
	min-width: 0;
}

.card-payments-card-form__order {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	margin: 0;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(128, 128, 128, 0.35);
	border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.card-payments-card-form__total {
	font-weight: 600;
}

.card-payments-card-form__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.card-payments-card-form__title {
	margin: 0;
	font-size: 1.125em;
}

.card-payments-card-form__error {
	margin: 0;
	font-weight: 600;
}

.card-payments-card-form__pay {
	box-sizing: border-box;
	width: 100%;
	white-space: normal;
	overflow-wrap: anywhere;
}

.card-payments-card-form__pay:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.card-payments-card-form__pay:focus-visible,
.card-payments-card-form__hosted:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Smaller, never faded: a theme's mid-grey text would fall below 4.5:1. */
.card-payments-card-form__secure {
	margin: 0;
	font-size: 0.875em;
	text-align: center;
}

/* With the card fields hidden (the hosted page is offered instead) the security line has nothing to describe. */
.card-payments-card-form__card[hidden] ~ .card-payments-card-form__secure {
	display: none;
}

/* The decorative lock: the plugin's lock.svg as a mask, so it takes the text colour; nothing where masks are not supported. */
.card-payments-card-form__lock {
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-inline-end: 0.35em;
	vertical-align: -0.1em;
}

@supports ((-webkit-mask-image: none) or (mask-image: none)) {
	.card-payments-card-form__lock {
		background-color: currentColor;
		-webkit-mask: url(../img/lock.svg) center / contain no-repeat;
		mask: url(../img/lock.svg) center / contain no-repeat;
	}
}

/* The ticked card brands' logos: beside the method's title at checkout, and on the card form. */
.card-payments-label {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.card-payments-brands {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem;
	vertical-align: middle;
}

.payment_method_card_payments .card-payments-brands {
	margin-inline-start: 0.5rem;
}

/* The id outranks WooCommerce's own rule for gateway icons (.woocommerce-checkout #payment ul.payment_methods li img:
 * margin, float, max-height), which would add to the gap. */
#payment .payment_method_card_payments .card-payments-brands .card-payments-brands__logo,
.card-payments-brands .card-payments-brands__logo {
	display: block;
	width: auto;
	height: 20px;
	max-height: none;
	margin: 0;
	float: none;
}
