.moulfood-checkout-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 28px;
}

.moulfood-checkout-popup.is-open {
	display: flex;
}

.moulfood-checkout-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.58);
	backdrop-filter: blur(2px);
}

.moulfood-checkout-dialog {
	position: relative;
	width: min(920px, 100%);
	max-height: min(840px, calc(100vh - 48px));
	overflow: auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
	padding: 28px;
	color: #111827;
}

.moulfood-checkout-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: #f3f4f6;
	color: #111827;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.moulfood-checkout-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding-right: 54px;
	margin-bottom: 22px;
}

.moulfood-checkout-kicker {
	margin: 0 0 5px;
	color: var(--moulfood-checkout-primary, #f97316);
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
}

.moulfood-checkout-head h2 {
	margin: 0;
	font-size: clamp(26px, 3vw, 36px);
	line-height: 1.08;
	letter-spacing: 0;
}

.moulfood-checkout-payment-pill {
	flex: 0 0 auto;
	margin-top: 6px;
	padding: 9px 13px;
	border-radius: 999px;
	background: #fff7ed;
	color: #9a3412;
	font-weight: 800;
	font-size: 13px;
}

.moulfood-checkout-closed,
.moulfood-checkout-alert {
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #9a3412;
}

.moulfood-checkout-alert.is-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.moulfood-checkout-closed p,
.moulfood-checkout-alert p {
	margin: 5px 0 0;
}

.moulfood-checkout-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding: 6px;
	border-radius: 999px;
	background: #f3f4f6;
	margin-bottom: 22px;
}

.moulfood-checkout-steps button {
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #64748b;
	font-weight: 800;
	padding: 10px 12px;
	cursor: default;
}

.moulfood-checkout-steps button.is-active {
	background: var(--moulfood-checkout-primary, #f97316);
	color: #fff;
	box-shadow: 0 8px 18px rgba(249, 115, 22, 0.25);
}

.moulfood-checkout-step {
	display: none;
}

.moulfood-checkout-step.is-active {
	display: block;
}

.moulfood-checkout-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.moulfood-checkout-section-title h3 {
	margin: 0;
	font-size: 22px;
	line-height: 1.2;
}

.moulfood-checkout-count {
	min-width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #fff7ed;
	color: #c2410c;
	font-weight: 900;
}

.moulfood-checkout-review {
	display: grid;
	gap: 10px;
	max-height: 310px;
	overflow: auto;
	padding-right: 4px;
}

.moulfood-checkout-item {
	display: grid;
	grid-template-columns: 66px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid #e5e7eb;
}

.moulfood-checkout-item-image img {
	width: 66px;
	height: 66px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.moulfood-checkout-item-body {
	min-width: 0;
	display: grid;
	gap: 4px;
}

.moulfood-checkout-item-body strong {
	font-size: 15px;
	color: #111827;
}

.moulfood-checkout-item-body span,
.moulfood-checkout-item-meta {
	font-size: 13px;
	color: #64748b;
}

.moulfood-checkout-item-price {
	font-weight: 900;
	white-space: nowrap;
	color: #111827;
}

.moulfood-checkout-item-controls {
	grid-column: 3;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.moulfood-checkout-qty-control {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 8px;
	border-radius: 999px;
	background: #f3f4f6;
}

.moulfood-checkout-qty-btn,
.moulfood-checkout-remove {
	border: 0;
	cursor: pointer;
	font: inherit;
}

.moulfood-checkout-qty-btn {
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: transparent;
	color: #111827;
	font-size: 18px;
	line-height: 1;
}

.moulfood-checkout-qty-btn:hover {
	background: #fff;
}

.moulfood-checkout-qty-btn.is-disabled,
.moulfood-checkout-qty-btn:disabled {
	cursor: not-allowed;
	color: #94a3b8;
}

.moulfood-checkout-review-qty-val {
	min-width: 16px;
	text-align: center;
	font-size: 14px;
	font-weight: 900;
	color: #111827;
}

.moulfood-checkout-remove {
	min-height: 34px;
	padding: 0 12px;
	border-radius: 999px;
	background: #fff7ed;
	color: #ea580c;
	font-size: 13px;
	font-weight: 900;
}

.moulfood-checkout-remove:hover {
	background: #ffedd5;
}

.moulfood-checkout-popup.is-updating .moulfood-checkout-review {
	opacity: 0.62;
	pointer-events: none;
}

.moulfood-checkout-empty {
	padding: 24px;
	text-align: center;
	border-radius: 12px;
	background: #f8fafc;
	color: #64748b;
}

.moulfood-checkout-totals {
	margin-top: 18px;
	border-top: 1px solid #e5e7eb;
	padding-top: 14px;
	display: grid;
	gap: 10px;
}

.moulfood-checkout-totals > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	color: #475569;
}

.moulfood-checkout-totals strong {
	color: #111827;
}

.moulfood-checkout-total-row {
	font-size: 18px;
	font-weight: 900;
}

.moulfood-checkout-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.moulfood-checkout-fields label,
.moulfood-checkout-choice-group {
	display: grid;
	gap: 7px;
}

.moulfood-checkout-wide {
	grid-column: 1 / -1;
}

.moulfood-checkout-fields span,
.moulfood-checkout-choice-group > span {
	font-size: 13px;
	font-weight: 800;
	color: #334155;
}

.moulfood-checkout-fields input,
.moulfood-checkout-fields textarea {
	width: 100%;
	border: 1px solid #dbe3ee;
	border-radius: 12px;
	background: #fff;
	color: #111827;
	padding: 12px 13px;
	font-size: 15px;
	outline: none;
	box-shadow: none;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.moulfood-checkout-fields input:focus,
.moulfood-checkout-fields textarea:focus {
	border-color: var(--moulfood-checkout-primary, #f97316);
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.moulfood-checkout-fields input.has-error,
.moulfood-checkout-fields textarea.has-error {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.moulfood-checkout-fields small {
	min-height: 16px;
	color: #dc2626;
	font-size: 12px;
}

.moulfood-checkout-choice-group {
	margin-top: 16px;
	grid-template-columns: 1fr;
}

.moulfood-checkout-choice-group label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	background: #fff;
}

.moulfood-checkout-choice-group input {
	accent-color: var(--moulfood-checkout-primary, #f97316);
}

.moulfood-checkout-confirm {
	display: grid;
	gap: 12px;
	padding: 16px;
	border-radius: 14px;
	background: #f8fafc;
	color: #111827;
}

.moulfood-checkout-confirm-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e5e7eb;
}

.moulfood-checkout-confirm-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.moulfood-checkout-confirm-row span {
	color: #64748b;
}

.moulfood-checkout-confirm-row strong {
	text-align: right;
}

.moulfood-checkout-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
}

.moulfood-checkout-primary,
.moulfood-checkout-secondary {
	min-height: 46px;
	border-radius: 999px;
	border: 0;
	padding: 0 22px;
	font-weight: 900;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.moulfood-checkout-primary {
	background: var(--moulfood-checkout-primary, #f97316);
	color: #fff;
	box-shadow: 0 10px 20px rgba(249, 115, 22, 0.22);
}

.moulfood-checkout-primary[disabled],
.moulfood-checkout-primary.is-loading {
	opacity: 0.65;
	cursor: not-allowed;
}

.moulfood-checkout-secondary {
	background: #f3f4f6;
	color: #111827;
}

.moulfood-checkout-ticket-download {
	border: 1px solid #fed7aa;
	background: #fff7ed;
	color: #c2410c;
}

.moulfood-checkout-success {
	text-align: center;
	padding: 18px 0 6px;
}

.moulfood-checkout-success-icon {
	width: 66px;
	height: 66px;
	margin: 0 auto 14px;
	border-radius: 999px;
	background: #dcfce7;
	color: #15803d;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	font-weight: 900;
}

.moulfood-checkout-success h3 {
	margin: 0 0 8px;
	font-size: 28px;
}

.moulfood-checkout-success p {
	margin: 0 auto 16px;
	max-width: 520px;
	color: #475569;
}

.moulfood-checkout-success .moulfood-checkout-actions {
	flex-wrap: wrap;
}

.moulfood-checkout-order-number {
	width: min(360px, 100%);
	margin: 8px auto;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #f8fafc;
}

body.moulfood-checkout-open {
	overflow: hidden;
}

.moulfood-checkout-location-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 20px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border-top: 1px solid #fed7aa;
	border-bottom: 1px solid #fed7aa;
	background: #fff7ed;
}

.moulfood-checkout-location-summary[hidden] {
	display: none;
}

.moulfood-checkout-location-summary div {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.moulfood-checkout-location-summary span,
.moulfood-checkout-location-summary small {
	color: #64748b;
	font-size: 12px;
}

.moulfood-checkout-location-summary strong {
	overflow-wrap: anywhere;
	color: #0f172a;
	font-size: 14px;
}

.moulfood-checkout-location-summary p,
.moulfood-checkout-location-summary small {
	grid-column: 1 / -1;
	margin: 0;
}

.moulfood-checkout-location-summary p {
	color: #9a3412;
	font-size: 13px;
}

@media (max-width: 767px) {
	.moulfood-checkout-popup {
		align-items: flex-end;
		padding: 0;
	}

	.moulfood-checkout-dialog {
		width: 100%;
		max-height: calc(100vh - 18px);
		border-radius: 20px 20px 0 0;
		padding: 22px 16px 18px;
	}

	.moulfood-checkout-head {
		padding-right: 44px;
		margin-bottom: 16px;
	}

	.moulfood-checkout-payment-pill {
		display: none;
	}

	.moulfood-checkout-steps {
		position: sticky;
		top: -22px;
		z-index: 2;
		border-radius: 0;
		margin-left: -16px;
		margin-right: -16px;
		padding: 8px 16px;
	}

	.moulfood-checkout-steps button {
		padding: 9px 8px;
		font-size: 13px;
	}

	.moulfood-checkout-fields {
		grid-template-columns: 1fr;
	}

	.moulfood-checkout-location-summary {
		grid-template-columns: 1fr;
		padding: 12px;
	}

	.moulfood-checkout-item {
		grid-template-columns: 58px minmax(0, 1fr);
		gap: 11px;
	}

	.moulfood-checkout-item-image img {
		width: 58px;
		height: 58px;
	}

	.moulfood-checkout-item-price {
		grid-column: 2;
		justify-self: start;
	}

	.moulfood-checkout-item-controls {
		grid-column: 2;
		justify-self: start;
		flex-wrap: wrap;
		margin-top: 2px;
	}

	.moulfood-checkout-qty-control {
		gap: 6px;
		padding: 4px 7px;
	}

	.moulfood-checkout-remove {
		min-height: 32px;
		padding: 0 11px;
	}

	.moulfood-checkout-actions {
		position: sticky;
		bottom: 0;
		z-index: 3;
		background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 24%);
		padding-top: 20px;
	}

	.moulfood-checkout-primary,
	.moulfood-checkout-secondary {
		flex: 1 1 auto;
	}

	.moulfood-checkout-success .moulfood-checkout-ticket-download {
		flex-basis: 100%;
	}
}
