/**
 * Woo CC Field style overrides.
 */

/* Payment section colors and outer container. */
.woocommerce #payment {
	--payment-accent: #781719;
	background: #f7f7f8;
	border: 1px solid #e3e3e7;
	border-radius: 12px;
	overflow: hidden;
}

/* Stack payment options with consistent spacing. */
.woocommerce #payment ul.payment_methods {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 20px;
	border-bottom: 1px solid #e3e3e7;
	list-style: none;
}

.woocommerce #payment ul.payment_methods::before,
.woocommerce #payment ul.payment_methods::after {
	display: none;
}

/* Keep each radio and its label on the same row. */
.woocommerce #payment ul.payment_methods > li.wc_payment_method {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	align-items: center;
	gap: 0 12px;
	margin: 0;
	padding: 16px;
	background: #fff;
	border: 1px solid #dedee3;
	border-radius: 8px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

/* Highlight the currently selected payment method. */
.woocommerce #payment ul.payment_methods > li:has(> input:checked) {
	border-color: var(--payment-accent);
	box-shadow: 0 0 0 1px var(--payment-accent);
}

.woocommerce #payment ul.payment_methods li > input.input-radio {
	float: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--payment-accent);
	cursor: pointer;
}

.woocommerce #payment ul.payment_methods li > label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-width: 0;
	margin: 0;
	padding: 0;
	color: #25252b;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	cursor: pointer;
}

/* Keep the PayPal logo compact and proportionate. */
.woocommerce #payment ul.payment_methods li > label img {
	float: none;
	width: auto;
	max-width: 100px;
	height: auto;
	max-height: 28px;
	margin: 0;
}

/* Preserve WooCommerce's existing show/hide behavior. */
.woocommerce #payment div.payment_box {
	grid-column: 1 / -1;
	box-sizing: border-box;
	width: 100%;
	margin: 14px 0 0;
	padding: 16px 0 0;
	background: transparent;
	border-top: 1px solid #ededf0;
	border-radius: 0;
	color: #606069;
	font-size: 14px;
	line-height: 1.6;
}

/* Remove the default payment-box triangle. */
.woocommerce #payment div.payment_box::before {
	display: none;
}

.woocommerce #payment div.payment_box p {
	margin: 0 0 14px;
}

.woocommerce #payment div.payment_box p:last-child {
	margin-bottom: 0;
}

/* Remove the browser's default fieldset border around Square. */
.woocommerce #payment #wc-square-credit-card-credit-card-form {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.woocommerce #payment #wc-square-credit-card-container {
	width: 100%;
	min-width: 0;
}

/* Match the order button to the selected payment option. */
.woocommerce #payment .place-order {
	margin: 0;
	padding: 20px;
}

.woocommerce #payment #place_order {
	padding: 14px 24px;
	background: var(--payment-accent);
	border: 0;
	border-radius: 6px;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	transition: background-color 0.2s;
}

.woocommerce #payment #place_order:hover {
	background: #5c1012;
}

/* Maintain visible keyboard focus. */
.woocommerce #payment input.input-radio:focus-visible,
.woocommerce #payment #place_order:focus-visible {
	outline: 3px solid var(--payment-accent);
	outline-offset: 4px;
}

/* Reduce padding and expand the order button on mobile. */
@media (max-width: 600px) {
	.woocommerce #payment ul.payment_methods,
	.woocommerce #payment .place-order {
		padding: 14px;
	}

	.woocommerce #payment ul.payment_methods > li.wc_payment_method {
		padding: 14px;
	}

	.woocommerce #payment #place_order {
		float: none;
		width: 100%;
	}
}

.woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before {display:none;}

.woocommerce #payment ul.payment_methods li > label {white-space:nowrap;}