.mx-cw-form,
.mx-cw-form * {
	box-sizing: border-box;
}

.mx-cw-form {
	color: #172033;
	font-size: 16px;
	line-height: 1.55;
	margin: 2rem auto;
	width: 100%;
}

.mx-cw-card {
	background: #fff;
	border: 1px solid #d9e1ea;
	border-radius: 8px;
	box-shadow: 0 18px 45px rgba(23, 32, 51, 0.09);
	padding: clamp(1.25rem, 3vw, 2.25rem);
}

.mx-cw-card-header {
	margin-bottom: 1.35rem;
}

.mx-cw-card-header h2,
.mx-cw-statement-card h2 {
	color: #111827;
	font-size: 1.8rem;
	line-height: 1.2;
	margin: 0;
}

.mx-cw-eyebrow {
	color: #1d4ed8;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0;
	margin: 0 0 0.35rem;
	text-transform: uppercase;
}

.mx-cw-lead {
	color: #4b5563;
	margin: 0.65rem 0 0;
	max-width: 720px;
}

.mx-cw-form label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.4rem;
}

.mx-cw-field {
	margin: 0 0 1rem;
}

.mx-cw-field-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
}

.mx-cw-form input[type="text"],
.mx-cw-form input[type="email"],
.mx-cw-form input[type="tel"],
.mx-cw-form select,
.mx-cw-form textarea {
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 7px;
	box-shadow: none;
	color: #111827;
	display: block;
	font: inherit;
	max-width: 100%;
	padding: 0.72rem 0.85rem;
	width: 100%;
}

.mx-cw-form input[type="text"],
.mx-cw-form input[type="email"],
.mx-cw-form input[type="tel"],
.mx-cw-form select {
	min-height: 46px;
}

.mx-cw-form textarea {
	min-height: 118px;
	resize: vertical;
}

.mx-cw-form input:focus,
.mx-cw-form select:focus,
.mx-cw-form textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
	outline: 0;
}

.mx-cw-helper {
	color: #64748b;
	font-size: 0.9rem;
	margin: 0.65rem 0 0;
}

.mx-cw-notice {
	border: 1px solid transparent;
	border-radius: 7px;
	margin: 1rem 0 1.25rem;
	padding: 0.9rem 1rem;
}

.mx-cw-notice-info {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e3a8a;
}

.mx-cw-notice-warning {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #7c2d12;
}

.mx-cw-summary {
	background: #f8fafc;
	border: 1px solid #dbe3ec;
	border-radius: 8px;
	display: grid;
	gap: 0.85rem;
	grid-template-columns: 1fr;
	margin: 1.25rem 0;
	padding: 1rem;
}

.mx-cw-summary p,
.mx-cw-summary-item {
	margin: 0;
	min-width: 0;
}

.mx-cw-summary-item span {
	color: #64748b;
	display: block;
	font-size: 0.82rem;
	font-weight: 700;
	margin-bottom: 0.15rem;
}

.mx-cw-summary-item strong {
	color: #111827;
	display: block;
	overflow-wrap: anywhere;
}

.mx-cw-next-steps {
	background: #f8fafc;
	border: 1px solid #dbe3ec;
	border-radius: 8px;
	margin: 1.25rem 0;
	padding: 1rem;
}

.mx-cw-next-steps h3 {
	font-size: 1rem;
	margin: 0 0 0.65rem;
}

.mx-cw-next-steps ul {
	margin: 0;
	padding-left: 1.15rem;
}

.mx-cw-next-steps li {
	margin: 0 0 0.45rem;
}

.mx-cw-next-steps li:last-child {
	margin-bottom: 0;
}

.mx-cw-items-fieldset {
	border: 1px solid #dbe3ec;
	border-radius: 8px;
	margin: 1.5rem 0 1.25rem;
	padding: 1rem;
}

.mx-cw-consumer-fieldset {
	border: 1px solid #dbe3ec;
	border-radius: 8px;
	margin: 1.5rem 0;
	padding: 1rem;
}

.mx-cw-consumer-fieldset .mx-cw-field-grid:first-of-type {
	margin-top: 1rem;
}

.mx-cw-field-error {
	color: #b91c1c;
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	margin-top: 0.3rem;
}

.mx-cw-items-fieldset legend {
	color: #111827;
	font-weight: 800;
	padding: 0 0.45rem;
}

.mx-cw-consumer-fieldset legend {
	color: #111827;
	font-weight: 800;
	padding: 0 0.45rem;
}

.mx-cw-form .mx-cw-item {
	align-items: center;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: auto 58px minmax(0, 1fr);
	margin: 0 0 0.75rem;
	padding: 0.85rem;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.mx-cw-form .mx-cw-item:hover {
	border-color: #94a3b8;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.mx-cw-form .mx-cw-item:last-child {
	margin-bottom: 0;
}

.mx-cw-item input[type="checkbox"],
.mx-cw-consent input[type="checkbox"] {
	accent-color: #2563eb;
	height: 18px;
	margin: 0;
	width: 18px;
}

.mx-cw-item-thumb {
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 7px;
	display: flex;
	height: 58px;
	justify-content: center;
	overflow: hidden;
	width: 58px;
}

.mx-cw-item-thumb img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.mx-cw-item-thumb-placeholder {
	background: linear-gradient(135deg, #eef2f7, #fff);
	display: block;
	height: 100%;
	width: 100%;
}

.mx-cw-item-body {
	align-items: center;
	display: grid;
	gap: 0.5rem 1rem;
	grid-template-columns: minmax(0, 1fr);
	min-width: 0;
}

.mx-cw-item-name,
.mx-cw-item-quantity,
.mx-cw-item-note {
	display: block;
}

.mx-cw-item-name {
	color: #111827;
	font-weight: 800;
	overflow-wrap: anywhere;
}

.mx-cw-item-quantity,
.mx-cw-item-note {
	color: #64748b;
	font-weight: 400;
}

.mx-cw-item-total {
	color: #111827;
	font-weight: 800;
	white-space: nowrap;
}

.mx-cw-item-note {
	background: #fff7ed;
	border-radius: 6px;
	color: #9a3412;
	font-size: 0.9rem;
	padding: 0.4rem 0.55rem;
}

.mx-cw-statement-card {
	background: #f8fafc;
	border: 1px solid #dbe3ec;
	border-radius: 8px;
	margin: 1.5rem 0;
	padding: 1rem;
}

.mx-cw-statement-card h2 {
	font-size: 1.25rem;
	margin-bottom: 1rem;
}

.mx-cw-statement-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
}

.mx-cw-statement-section {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 1rem;
}

.mx-cw-statement-section h3 {
	color: #111827;
	font-size: 1rem;
	font-weight: 800;
	margin: 0 0 0.75rem;
}

.mx-cw-statement-section p {
	margin: 0;
}

.mx-cw-statement-section dl {
	display: grid;
	gap: 0.35rem 0.75rem;
	grid-template-columns: max-content minmax(0, 1fr);
	margin: 0;
}

.mx-cw-statement-section dt {
	color: #64748b;
	font-weight: 800;
}

.mx-cw-statement-section dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.mx-cw-statement-section-full {
	margin-top: 1rem;
}

.mx-cw-statement-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mx-cw-statement-items li {
	align-items: center;
	border-bottom: 1px solid #eef2f7;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	padding: 0.45rem 0;
}

.mx-cw-statement-items li:last-child {
	border-bottom: 0;
}

.mx-cw-statement-note {
	border-top: 1px solid #e2e8f0;
	color: #64748b;
	margin: 1rem 0 0;
	padding-top: 1rem;
}

.mx-cw-consent {
	align-items: flex-start;
	background: #f8fafc;
	border: 1px solid #dbe3ec;
	border-radius: 8px;
	display: grid;
	font-weight: 600;
	gap: 0.65rem;
	grid-template-columns: auto minmax(0, 1fr);
	margin: 1rem 0;
	padding: 0.9rem 1rem;
}

.mx-cw-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.2rem 0 0;
}

.mx-cw-button {
	align-items: center;
	appearance: none;
	border: 1px solid transparent;
	border-radius: 7px;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 800;
	justify-content: center;
	line-height: 1.2;
	min-height: 46px;
	padding: 0.78rem 1.1rem;
	text-decoration: none;
	transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.mx-cw-button:hover,
.mx-cw-button:focus {
	text-decoration: none;
}

.mx-cw-button-primary {
	background: #2563eb;
	color: #fff;
}

.mx-cw-button-primary:hover,
.mx-cw-button-primary:focus {
	background: #1d4ed8;
	color: #fff;
}

.mx-cw-button-danger {
	background: #dc2626;
	color: #fff;
}

.mx-cw-button-danger:hover,
.mx-cw-button-danger:focus {
	background: #b91c1c;
	color: #fff;
}

.mx-cw-button-secondary {
	background: #fff;
	border-color: #cbd5e1;
	color: #172033;
}

.mx-cw-button-secondary:hover,
.mx-cw-button-secondary:focus {
	background: #f8fafc;
	border-color: #94a3b8;
	color: #111827;
}

.mx-cw-button:focus {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
	outline: 0;
}

.mx-cw-button-small {
	font-size: 0.92rem;
	min-height: 38px;
	padding: 0.55rem 0.75rem;
}

.mx-cw-success-icon {
	background: #16a34a;
	border-radius: 999px;
	height: 44px;
	margin-bottom: 1rem;
	position: relative;
	width: 44px;
}

.mx-cw-success-icon::after {
	border: solid #fff;
	border-width: 0 3px 3px 0;
	content: "";
	height: 18px;
	left: 17px;
	position: absolute;
	top: 10px;
	transform: rotate(45deg);
	width: 9px;
}

.mx-cw-footer-link {
	margin: 1rem auto;
	text-align: center;
}

.mx-cw-badge {
	background: #ecfdf5;
	border: 1px solid #bbf7d0;
	border-radius: 999px;
	color: #166534;
	display: inline-block;
	font-size: 0.82rem;
	font-weight: 800;
	line-height: 1.4;
	padding: 0.22rem 0.55rem;
}

.mx-cw-badge-muted {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #475569;
}

.mx-cw-empty-state {
	background: #fff;
	border: 1px solid #d9e1ea;
	border-radius: 8px;
	margin: 1rem 0;
	padding: 1.25rem;
}

.mx-cw-empty-state-title {
	color: #111827;
	font-size: 1.25rem;
	margin: 0 0 0.5rem;
}

.mx-cw-empty-state p {
	margin: 0 0 0.85rem;
}

.mx-cw-empty-state-actions {
	margin-bottom: 0;
}

.mx-cw-orders {
	border-collapse: collapse;
	margin-top: 1rem;
	width: 100%;
}

.mx-cw-orders th,
.mx-cw-orders td {
	border-bottom: 1px solid #e2e8f0;
	padding: 0.75rem;
	text-align: left;
	vertical-align: middle;
}

.mx-cw-orders .woocommerce-Price-amount,
.mx-cw-orders .amount {
	white-space: nowrap;
}

.mx-cw-orders th {
	color: #475569;
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
}

@media (min-width: 680px) {
	.mx-cw-field-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mx-cw-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mx-cw-item-body {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.mx-cw-item-total {
		text-align: right;
		white-space: nowrap;
	}

	.mx-cw-item-note {
		grid-column: 1 / -1;
	}

	.mx-cw-statement-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mx-cw-form {
		margin: 1.25rem auto;
	}

	.mx-cw-card {
		border-radius: 7px;
		box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
	}

	.mx-cw-actions,
	.mx-cw-button {
		width: 100%;
	}

	.mx-cw-statement-section dl,
	.mx-cw-statement-items li {
		display: block;
	}

	.mx-cw-statement-section dt {
		margin-top: 0.45rem;
	}

	.mx-cw-orders,
	.mx-cw-orders thead,
	.mx-cw-orders tbody,
	.mx-cw-orders th,
	.mx-cw-orders td,
	.mx-cw-orders tr {
		display: block;
		width: 100%;
	}

	.mx-cw-orders thead {
		display: none;
	}

	.mx-cw-orders tr {
		border: 1px solid #dbe3ec;
		border-radius: 8px;
		margin-bottom: 0.75rem;
		padding: 0.75rem;
	}

	.mx-cw-orders td {
		border: 0;
		padding: 0.35rem 0;
	}

	.mx-cw-orders td::before {
		color: #64748b;
		content: attr(data-title);
		display: block;
		font-size: 0.78rem;
		font-weight: 800;
		margin-bottom: 0.1rem;
		text-transform: uppercase;
	}
}
