/* ==========================================================================
   মডিউল: Checkout — অর্ডার ফর্ম
   মোবাইল: পুরো স্ক্রিন, নিচে স্টিকি "অর্ডার কনফার্ম" | ডেস্কটপ: মাঝখানে, দুই কলাম (ফর্ম | সামারি)
   ========================================================================== */

.arianerptheme-checkout {
	position: fixed;
	inset: 0;
	z-index: var(--arianerptheme-z-modal);
	display: flex;
	background: var(--arianerptheme-bg);
	transform: translateY(24px);
	opacity: 0;
	visibility: hidden;
	transition: transform .24s ease, opacity .24s ease, visibility .24s;
}

.arianerptheme-checkout.is-open {
	transform: none;
	opacity: 1;
	visibility: visible;
	transition: transform .24s ease, opacity .24s ease, visibility 0s;
}

.arianerptheme-checkout__form {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	margin: 0;
}

/* ── হেড ── */
.arianerptheme-checkout__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px var(--arianerptheme-gutter);
	background: var(--arianerptheme-surface);
	border-bottom: 1px solid var(--arianerptheme-border);
}

.arianerptheme-checkout__brand {
	flex: none;
	max-width: 110px;
	overflow: hidden;
}

.arianerptheme-checkout__brand img,
.arianerptheme-checkout__brand .custom-logo {
	max-height: 36px;
	width: auto;
}

.arianerptheme-checkout__brand .arianerptheme-brand--text {
	font-size: 1rem;
}

/* ছোট মোবাইলে শিরোনামের জায়গা দিতে লোগো লুকানো */
@media (max-width: 479px) {
	.arianerptheme-checkout__brand {
		display: none;
	}
}

.arianerptheme-checkout__heading {
	flex: 1;
	min-width: 0;
}

.arianerptheme-checkout__title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}

.arianerptheme-checkout__note {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 2px 0 0;
	color: var(--arianerptheme-success);
	font-size: .8rem;
	font-weight: 600;
	line-height: 1.3;
}

.arianerptheme-checkout__note .arianerptheme-icon {
	width: 16px;
	height: 16px;
}

.arianerptheme-checkout__head .arianerptheme-checkout__close {
	flex: none;
	width: 40px;
	height: 40px;
}

/* ── বডি ── */
.arianerptheme-checkout__body {
	display: grid;
	flex: 1;
	align-content: start;
	gap: 16px;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px var(--arianerptheme-gutter) 24px;
}

.arianerptheme-checkout__alert {
	padding: 10px 14px;
	border-radius: var(--arianerptheme-radius-sm);
	background: color-mix(in srgb, var(--arianerptheme-danger) 12%, var(--arianerptheme-surface));
	color: var(--arianerptheme-danger);
	font-size: .9rem;
	font-weight: 600;
}

.arianerptheme-checkout__fields,
.arianerptheme-checkout__summary {
	padding: 16px;
	background: var(--arianerptheme-surface);
	border: 1px solid var(--arianerptheme-border);
	border-radius: var(--arianerptheme-radius);
}

.arianerptheme-checkout__section-title {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0 0 12px;
	font-size: 1rem;
}

.arianerptheme-checkout__count {
	color: var(--arianerptheme-muted);
	font-size: .85rem;
	font-weight: 500;
}

/* ── ফর্ম ফিল্ড (যৌথ ক্লাস — পরে অন্য ফর্মেও ব্যবহারযোগ্য) ── */
.arianerptheme-field {
	margin-bottom: 14px;
}

.arianerptheme-field label {
	display: block;
	margin-bottom: 6px;
	font-size: .9rem;
	font-weight: 600;
}

.arianerptheme-field label span {
	color: var(--arianerptheme-danger);
}

.arianerptheme-field input,
.arianerptheme-field textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--arianerptheme-border);
	border-radius: var(--arianerptheme-radius-sm);
	background: var(--arianerptheme-bg);
	color: var(--arianerptheme-text);
	font: inherit;
	font-size: 1rem; /* ১৬px — iOS-এ জুম হবে না */
	transition: border-color .15s ease, box-shadow .15s ease;
}

.arianerptheme-field textarea {
	resize: vertical;
}

.arianerptheme-field input:focus,
.arianerptheme-field textarea:focus {
	border-color: var(--arianerptheme-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--arianerptheme-primary) 20%, transparent);
	outline: none;
}

.arianerptheme-field.is-invalid input,
.arianerptheme-field.is-invalid textarea {
	border-color: var(--arianerptheme-danger);
}

.arianerptheme-field__error {
	margin: 6px 0 0;
	color: var(--arianerptheme-danger);
	font-size: .82rem;
	font-weight: 600;
}

.arianerptheme-checkout__remember {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--arianerptheme-muted);
	font-size: .85rem;
	cursor: pointer;
}

.arianerptheme-checkout__remember input {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--arianerptheme-primary);
}

/* Honeypot — চোখে ও স্ক্রিন-রিডারে লুকানো */
.arianerptheme-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ── জেলা: খোঁজা যায় এমন তালিকা ── */
.arianerptheme-combo {
	position: relative;
}

.arianerptheme-combo__list {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 5;
	max-height: 240px;
	margin: 0;
	padding: 4px;
	overflow-y: auto;
	list-style: none;
	background: var(--arianerptheme-surface);
	border: 1px solid var(--arianerptheme-border);
	border-radius: var(--arianerptheme-radius-sm);
	box-shadow: var(--arianerptheme-shadow);
}

.arianerptheme-combo__option {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 10px;
	border-radius: 8px;
	cursor: pointer;
}

.arianerptheme-combo__option small {
	color: var(--arianerptheme-muted);
}

.arianerptheme-combo__option:hover,
.arianerptheme-combo__option[aria-selected="true"] {
	background: color-mix(in srgb, var(--arianerptheme-primary) 12%, transparent);
}

.arianerptheme-combo__option.is-local span::after {
	content: " ★";
	color: var(--arianerptheme-primary);
}

.arianerptheme-combo__empty {
	padding: 10px;
	color: var(--arianerptheme-muted);
	font-size: .9rem;
}

/* ── সামারির পণ্য ── */
.arianerptheme-checkout__items {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.arianerptheme-co-item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--arianerptheme-border);
}

.arianerptheme-co-item__img {
	width: 56px;
	height: 56px;
	padding: 3px;
	object-fit: contain;
	border: 1px solid var(--arianerptheme-border);
	border-radius: var(--arianerptheme-radius-sm);
	background: var(--arianerptheme-media-bg);
}

.arianerptheme-co-item__info {
	min-width: 0;
}

.arianerptheme-co-item__name {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.arianerptheme-co-item__unit {
	margin: 0;
	color: var(--arianerptheme-muted);
	font-size: .75rem;
}

.arianerptheme-co-item .arianerptheme-qty {
	margin-top: 6px;
}

.arianerptheme-co-item__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
}

.arianerptheme-co-item__remove {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--arianerptheme-muted);
	cursor: pointer;
}

.arianerptheme-co-item__remove:hover {
	background: color-mix(in srgb, var(--arianerptheme-danger) 12%, transparent);
	color: var(--arianerptheme-danger);
}

.arianerptheme-co-item__remove .arianerptheme-icon {
	width: 16px;
	height: 16px;
}

.arianerptheme-co-item__total {
	font-size: .95rem;
	white-space: nowrap;
}

/* ── হিসাব ── */
.arianerptheme-checkout__totals {
	display: grid;
	gap: 8px;
	margin: 0;
}

.arianerptheme-checkout__totals > div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.arianerptheme-checkout__totals dt {
	color: var(--arianerptheme-muted);
	font-size: .92rem;
}

.arianerptheme-checkout__totals dt small {
	font-size: .75rem;
}

.arianerptheme-checkout__totals dd {
	margin: 0;
	font-weight: 600;
	white-space: nowrap;
}

.arianerptheme-checkout__totals .is-total {
	padding-top: 10px;
	border-top: 1px solid var(--arianerptheme-border);
}

.arianerptheme-checkout__totals .is-total dt,
.arianerptheme-checkout__totals .is-total dd {
	color: var(--arianerptheme-text);
	font-size: 1.1rem;
	font-weight: 700;
}

.arianerptheme-checkout__totals .is-total dd {
	color: var(--arianerptheme-primary);
}

/* ── নিচের স্টিকি বার ── */
.arianerptheme-checkout__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px var(--arianerptheme-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
	background: var(--arianerptheme-surface);
	border-top: 1px solid var(--arianerptheme-border);
	box-shadow: 0 -6px 16px rgba(0, 0, 0, .08);
}

.arianerptheme-checkout__foot-total {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.arianerptheme-checkout__foot-total span {
	color: var(--arianerptheme-muted);
	font-size: .75rem;
}

.arianerptheme-checkout__foot-total strong {
	color: var(--arianerptheme-primary);
	font-size: 1.2rem;
	white-space: nowrap;
}

.arianerptheme-checkout__submit {
	flex: 1;
	min-height: 50px;
	font-size: 1.02rem;
}

.arianerptheme-checkout__submit.is-busy {
	cursor: progress;
}

/* ── সফল ── */
.arianerptheme-checkout__success {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 32px var(--arianerptheme-gutter);
	text-align: center;
}

.arianerptheme-checkout__success-title {
	margin: 8px 0 0;
	font-size: 1.4rem;
}

.arianerptheme-checkout__success-title:focus {
	outline: none;
}

.arianerptheme-checkout__success-ref {
	margin: 0;
	color: var(--arianerptheme-muted);
}

.arianerptheme-checkout__success-ref strong {
	color: var(--arianerptheme-text);
	letter-spacing: .04em;
}

.arianerptheme-checkout__success-text {
	max-width: 360px;
	margin: 0 0 8px;
}

.arianerptheme-checkout__success .arianerptheme-btn {
	width: min(100%, 340px);
	min-height: 50px;
}

.arianerptheme-checkout__wa {
	animation: arianerptheme-co-pulse 1.8s ease-in-out infinite;
}

@keyframes arianerptheme-co-pulse {
	0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--arianerptheme-whatsapp) 55%, transparent); }
	50% { box-shadow: 0 0 0 10px transparent; }
}

/* ── ডেস্কটপ: মাঝখানে, দুই কলাম ── */
@media (min-width: 900px) {
	.arianerptheme-checkout {
		inset: auto;
		top: 50%;
		left: 50%;
		width: min(1000px, 94vw);
		height: min(760px, 92vh);
		border-radius: var(--arianerptheme-radius);
		box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
		overflow: hidden;
		transform: translate(-50%, -47%);
	}

	.arianerptheme-checkout.is-open {
		transform: translate(-50%, -50%);
	}

	.arianerptheme-checkout__head {
		padding: 14px 20px;
	}

	.arianerptheme-checkout__title {
		font-size: 1.2rem;
	}

	.arianerptheme-checkout__body {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		align-items: start;
		gap: 20px;
		padding: 20px;
	}

	.arianerptheme-checkout__alert {
		grid-column: 1 / -1;
	}

	.arianerptheme-checkout__summary {
		position: sticky;
		top: 0;
	}

	.arianerptheme-checkout__foot {
		justify-content: flex-end;
		padding: 14px 20px;
	}

	.arianerptheme-checkout__submit {
		flex: 0 1 360px;
	}
}
