.dwopc {
	--dwopc-accent: var(--wp--preset--color--primary, #2f6fed);
	--dwopc-border: #e2e7ee;
	--dwopc-muted: #667085;
	--dwopc-surface: #ffffff;
	box-sizing: border-box;
	margin: 2rem auto;
	max-width: 1120px;
	color: inherit;
}

.dwopc *,
.dwopc *::before,
.dwopc *::after {
	box-sizing: border-box;
}

.dwopc__eyebrow {
	margin: 0 0 0.35rem;
	color: var(--dwopc-muted);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1.3;
	text-transform: uppercase;
}

.dwopc__checkout-heading h2 {
	margin: 0;
	padding: 0;
	font-size: clamp(1.4rem, 3vw, 2rem);
	line-height: 1.2;
}

.dwopc__checkout {
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid var(--dwopc-border);
	border-radius: 14px;
	background: var(--dwopc-surface);
	box-shadow: 0 10px 35px rgba(16, 24, 40, 0.06);
}

.dwopc__checkout-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--dwopc-border);
}

.dwopc .woocommerce-checkout {
	margin-top: 0;
}

/* The coupon form remains functional, but is visible without WooCommerce's toggle prompt. */
.dwopc .woocommerce-form-coupon-toggle {
	display: none !important;
}

.dwopc form.checkout_coupon {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.75rem;
	align-items: end;
	width: 100%;
	margin: 0 0 1.5rem;
	padding: 1rem;
	border: 1px solid var(--dwopc-border);
	border-radius: 9px;
	background: #f8fafc;
}

.dwopc form.checkout_coupon .form-row {
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
}

.dwopc form.checkout_coupon input.input-text,
.dwopc form.checkout_coupon button.button {
	min-height: 46px;
	margin: 0;
	border-radius: 7px;
}

/* Order notes are disabled in PHP; this also removes empty wrappers from themed templates. */
.dwopc .woocommerce-additional-fields {
	display: none !important;
}

/* Give the billing form the full checkout width before arranging its fields. */
.dwopc #customer_details .col-1,
.dwopc #customer_details .col-2 {
	float: none;
	width: 100%;
}

.dwopc--no-shipping #customer_details .col-2 {
	display: none;
}

.dwopc .woocommerce-billing-fields__field-wrapper,
.dwopc .woocommerce-shipping-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1rem;
	align-items: start;
}

.dwopc .woocommerce-billing-fields__field-wrapper > .form-row,
.dwopc .woocommerce-shipping-fields__field-wrapper > .form-row {
	float: none;
	clear: none;
	width: auto;
	margin: 0 0 0.85rem;
}

.dwopc .woocommerce-billing-fields__field-wrapper > #billing_email_field {
	grid-column: 1 / -1;
}

.dwopc .woocommerce-billing-fields__field-wrapper .select2-container,
.dwopc .woocommerce-shipping-fields__field-wrapper .select2-container {
	width: 100% !important;
}

.dwopc .woocommerce-checkout .form-row input.input-text,
.dwopc .woocommerce-checkout .form-row textarea,
.dwopc .woocommerce-checkout .select2-container .select2-selection {
	min-height: 46px;
	border-color: #cfd6df;
	border-radius: 7px;
}

.dwopc .woocommerce-checkout .form-row input.input-text,
.dwopc .woocommerce-checkout .form-row textarea {
	padding: 0.72rem 0.8rem;
}

.dwopc .woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 44px;
}

.dwopc .woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
	height: 44px;
}

.dwopc #place_order {
	min-height: 48px;
	border-radius: 7px;
}

.dwopc form.checkout_coupon button.button,
.dwopc #place_order {
	border-color: #3a2956 !important;
	background: #3a2956 !important;
	box-shadow: none;
	color: #ffffff !important;
	text-shadow: none;
}

.dwopc form.checkout_coupon button.button:hover,
.dwopc form.checkout_coupon button.button:focus,
.dwopc #place_order:hover,
.dwopc #place_order:focus {
	border-color: #2e2045 !important;
	background: #2e2045 !important;
	color: #ffffff !important;
}

.dwopc form.checkout_coupon button.button:focus-visible,
.dwopc #place_order:focus-visible {
	outline: 3px solid rgba(58, 41, 86, 0.3);
	outline-offset: 3px;
}

.dwopc form.checkout_coupon button.button::after,
.dwopc #place_order::after {
	color: #ffffff !important;
}

.dwopc--message {
	margin-top: 1rem;
}

@media (max-width: 720px) {
	.dwopc__checkout {
		padding: 1rem;
	}

	.dwopc form.checkout_coupon,
	.dwopc .woocommerce-billing-fields__field-wrapper,
	.dwopc .woocommerce-shipping-fields__field-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	.dwopc .woocommerce-billing-fields__field-wrapper > #billing_email_field {
		grid-column: auto;
	}

	.dwopc form.checkout_coupon button.button {
		width: 100%;
	}
}
