/**
 * Drawer checkout styles: tablet/desktop only (min-width: 768px).
 * Narrower viewports use the default Checkout link → full page (motahda-side-checkout.js).
 * Keep this breakpoint in sync with filter `motahda_side_checkout_min_width_px` (default 768).
 */

@media (min-width: 768px) {

/* ——— Drawer shell ——— */
.cart-widget-side.motahda-side-checkout-open .widget_shopping_cart_content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.cart-widget-side.motahda-side-checkout-open .motahda-side-checkout-panel {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	direction: rtl;
}

.cart-widget-side .motahda-side-checkout-panel[hidden] {
	display: none !important;
}

.cart-widget-side .motahda-side-checkout-toolbar {
	flex: 0 0 auto;
	position: sticky;
	top: 0;
	z-index: 6;
	padding: 10px 12px;
	margin: 0 -12px 0;
	padding-inline: 12px;
	background: var(--bgcolor-white, #fff);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.cart-widget-side .motahda-side-checkout-toolbar-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
}

.cart-widget-side .motahda-side-checkout-toolbar .motahda-back-to-cart {
	flex: 0 0 auto;
	width: auto;
	min-height: 44px;
	padding: 10px 16px;
	text-align: center;
}

.cart-widget-side .motahda-side-checkout-title {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
}

.cart-widget-side .motahda-side-checkout-loading {
	flex: 0 0 auto;
	padding: 1rem 12px;
	text-align: center;
	opacity: 0.85;
	font-size: 0.9375rem;
}

.cart-widget-side .motahda-side-checkout-html {
	flex: 1 1 auto;
	min-height: min(55vh, 520px);
	max-height: min(90dvh, 900px);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: var(--bgcolor-white, #fff);
	padding: 12px 12px 28px;
	box-sizing: border-box;
	direction: rtl;
	text-align: start;
}

/* Elementor / Woodmart often force .text-left; align copy to the right in RTL drawer */
.cart-widget-side .motahda-side-checkout-html .text-left {
	text-align: right;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout {
	max-width: 100%;
}

.cart-widget-side .motahda-side-checkout-html form.checkout {
	margin-bottom: 0;
}

/* ——— Global tightening inside panel ——— */
.cart-widget-side .motahda-side-checkout-html .wd-content-area,
.cart-widget-side .motahda-side-checkout-html .site-content,
.cart-widget-side .motahda-side-checkout-html .entry-content {
	max-width: 100%;
	padding: 0;
	margin: 0;
}

.cart-widget-side .motahda-side-checkout-html .elementor {
	max-width: 100%;
}

/* Page title / steps: compact for narrow drawer */
.cart-widget-side .motahda-side-checkout-html .wd-page-title {
	margin-bottom: 0.75rem;
}

.cart-widget-side .motahda-side-checkout-html .wd-page-title .container {
	padding-inline: 0;
	max-width: 100%;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-steps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	line-height: 1.35;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-steps li {
	margin: 0;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-steps a,
.cart-widget-side .motahda-side-checkout-html .wd-checkout-steps span {
	display: inline-block;
	padding: 4px 0;
}

/* Coupon + notices */
.cart-widget-side .motahda-side-checkout-html .woocommerce-form-coupon-toggle .woocommerce-info {
	font-size: 0.875rem;
	line-height: 1.45;
	padding: 12px 14px;
	margin-bottom: 0.75rem;
}

.cart-widget-side .motahda-side-checkout-html .checkout_coupon {
	padding: 12px 0;
}

.cart-widget-side .motahda-side-checkout-html .checkout_coupon .input-text {
	min-height: 44px;
}

.cart-widget-side .motahda-side-checkout-html .checkout_coupon .button {
	min-height: 44px;
	padding-inline: 16px;
}

/* ——— Elementor checkout: force one column + logical block order ——— */
.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 > .e-con.e-parent > .e-con-inner {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 1.25rem;
	max-width: 100%;
}

.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 > .e-con.e-parent > .e-con-inner > .e-con.e-child {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 auto !important;
}

/* Summary (Your order + delivery FAQ) first, then billing, then payment */
.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 > .e-con.e-parent > .e-con-inner > .e-con.e-child:has(.elementor-widget-wd_checkout_order_review) {
	order: -1;
}

.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 > .e-con.e-parent > .e-con-inner > .e-con.e-child:has(.elementor-widget-wd_checkout_billing_details_form) {
	order: 1;
}

.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 > .e-con.e-parent > .e-con-inner > .e-con.e-child:has(.elementor-widget-wd_checkout_payment_methods) {
	order: 2;
}

/* Nested columns inside each block: stack vertically */
.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 .e-con.e-child .e-con-inner {
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	max-width: 100% !important;
}

.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 .e-con.e-child .e-con.e-child {
	width: 100% !important;
	max-width: 100% !important;
}

/* Section titles */
.cart-widget-side .motahda-side-checkout-html .woodmart-title-container.title {
	font-size: 1.05rem;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-billing-fields > h3,
.cart-widget-side .motahda-side-checkout-html .woocommerce-additional-fields > h3 {
	font-size: 1rem;
	margin-top: 0;
	margin-bottom: 0.75rem;
}

/* Billing / shipping fields */
.cart-widget-side .motahda-side-checkout-html .woocommerce-billing-fields__field-wrapper,
.cart-widget-side .motahda-side-checkout-html .woocommerce-additional-fields__field-wrapper {
	display: block;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce form .form-row {
	margin-bottom: 12px;
	padding: 0;
	width: 100%;
	float: none;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce form .form-row-first,
.cart-widget-side .motahda-side-checkout-html .woocommerce form .form-row-last {
	width: 100%;
	float: none;
}

/* Exclude .qty: full-width + tall inputs break order-review +/- stepper alignment */
.cart-widget-side .motahda-side-checkout-html .woocommerce form .input-text:not(.qty),
.cart-widget-side .motahda-side-checkout-html .woocommerce form select,
.cart-widget-side .motahda-side-checkout-html .woocommerce form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	font-size: 16px; /* avoids iOS zoom on focus */
}

/* Keep compact rows readable */
.cart-widget-side .motahda-side-checkout-html .woocommerce form #billing_phone_field input.input-text,
.cart-widget-side .motahda-side-checkout-html .woocommerce form .checkout_coupon .input-text {
	min-height: 44px;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce form textarea {
	min-height: 100px;
}

/* Order review: match Woodmart mini cart (ul.woocommerce-mini-cart > li.mini_cart_item) */
.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	font-size: inherit;
	overflow-x: visible;
	-webkit-overflow-scrolling: touch;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table thead {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tbody {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tbody tr.cart_item {
	display: flex;
	align-items: flex-start;
	position: relative;
	margin: 0;
	padding: 15px;
	padding-inline-end: 36px;
	border-bottom: 1px solid var(--brdcolor-gray-300, rgba(0, 0, 0, 0.1));
	box-sizing: border-box;
	transition: background-color 0.3s ease;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tbody tr.cart_item:hover {
	background-color: var(--bgcolor-gray-100, rgba(0, 0, 0, 0.04));
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tbody tr.cart_item:last-child {
	border-bottom: 0;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tbody tr.cart_item td {
	display: block;
	width: 100%;
	border: 0;
	padding: 0;
	box-sizing: border-box;
	text-align: start;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	flex-wrap: nowrap;
	gap: 0;
	width: 100%;
	position: relative;
	padding-top: 0;
	min-width: 0;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-remove-btn-wrapp {
	position: absolute;
	top: 13px;
	inset-inline-end: 10px;
	z-index: 2;
	margin: 0;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-remove-btn-wrapp .remove.wd-checkout-remove-btn {
	position: static;
	width: 20px;
	height: 20px;
	min-width: 20px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0;
	line-height: 1;
	text-decoration: none;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-img {
	flex: 0 0 auto;
	width: 64px;
	max-width: 64px;
	margin-inline-end: 15px;
	overflow: hidden;
	align-self: flex-start;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-img img {
	display: block;
	width: 100%;
	height: auto;
	float: none;
	margin: 0;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-cont {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	padding-inline-end: 8px;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-title {
	width: 100%;
	min-width: 0;
}

.cart-widget-side .motahda-side-checkout-html .cart-product-label {
	display: block;
	font-weight: var(--wd-text-font-weight, 600);
	line-height: 1.35;
	margin: 0 0 2px;
	color: var(--wd-text-color, inherit);
}

/* Match Woodmart mini-cart stepper: one row, equal height, no full-width .qty */
.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table div.quantity {
	--wd-form-height: 36px;
	position: relative;
	z-index: 1;
	display: inline-flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	align-content: stretch;
	vertical-align: middle;
	white-space: nowrap;
	margin: 0 0 8px;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table div.quantity input[type="button"] {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 28px;
	height: var(--wd-form-height);
	min-height: var(--wd-form-height);
	max-height: var(--wd-form-height);
	margin: 0;
	padding: 0 6px;
	box-sizing: border-box;
	line-height: 1;
	vertical-align: top;
	font-size: 1rem;
	font-weight: 600;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table div.quantity input.qty,
.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table div.quantity input.input-text.qty {
	flex: 0 0 auto;
	width: 2.75rem;
	min-width: 2.25rem;
	max-width: 3.5rem;
	height: var(--wd-form-height);
	min-height: var(--wd-form-height);
	max-height: var(--wd-form-height);
	margin: 0;
	padding: 0 4px;
	box-sizing: border-box;
	text-align: center;
	line-height: 1;
	font-size: 14px;
	vertical-align: top;
	border-radius: 0;
	-webkit-appearance: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table div.quantity input.qty::-webkit-outer-spin-button,
.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table div.quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-total {
	display: block;
	margin: 0;
	padding: 0;
	color: rgb(240, 133, 42);
	font-size: 90%;
	font-weight: 400;
	line-height: 1.4;
}

.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-total .woocommerce-Price-amount,
.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-total .woocommerce-Price-currencySymbol,
.cart-widget-side .motahda-side-checkout-html .wd-checkout-prod-total bdi {
	color: rgb(240, 133, 42);
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot {
	display: block;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--brdcolor-gray-300, rgba(0, 0, 0, 0.12));
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot tr {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 6px 12px;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 12px 15px;
	border: 0;
	border-bottom: 1px solid var(--brdcolor-gray-300, rgba(0, 0, 0, 0.06));
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot tr:last-child {
	border-bottom: 0;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal {
	font-size: 0.9375rem;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot tr.order-total {
	margin-top: 0;
	padding-block: 15px;
	font-size: 130%;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot th,
.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot td {
	display: block;
	width: auto;
	border: 0;
	padding: 0;
	text-align: inherit;
	font-weight: inherit;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot tr.order-total th {
	flex: 0 1 auto;
	font-weight: 600;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-checkout-review-order-table tfoot tr.order-total td {
	flex: 0 0 auto;
	text-align: end;
	margin-inline-start: auto;
}

/* Payment */
.cart-widget-side .motahda-side-checkout-html #payment {
	font-size: 0.9375rem;
}

.cart-widget-side .motahda-side-checkout-html #payment ul.payment_methods {
	margin: 0 0 12px;
	padding: 0;
}

.cart-widget-side .motahda-side-checkout-html #payment .wc_payment_method label {
	font-size: 0.9375rem;
	line-height: 1.4;
}

.cart-widget-side .motahda-side-checkout-html .wc-credit-card-form .form-row {
	width: 100%;
	float: none;
}

.cart-widget-side .motahda-side-checkout-html .wc-credit-card-form .form-row-first,
.cart-widget-side .motahda-side-checkout-html .wc-credit-card-form .form-row-last {
	width: 100%;
	float: none;
}

.cart-widget-side .motahda-side-checkout-html #place_order {
	width: 100%;
	min-height: 48px;
	font-size: 1rem;
	font-weight: 600;
	margin-top: 12px;
}

.cart-widget-side .motahda-side-checkout-html .woocommerce-privacy-policy-text {
	font-size: 0.8125rem;
	line-height: 1.45;
	margin-bottom: 10px;
}

/* Accordion (Delivery & Return) */
.cart-widget-side .motahda-side-checkout-html .wd-accordion-title {
	font-size: 0.875rem;
	padding: 12px 0;
}

.cart-widget-side .motahda-side-checkout-html .wd-accordion-content {
	font-size: 0.875rem;
	line-height: 1.5;
}

/* Fallback when :has() is unsupported: still single column (order stays DOM default) */
@supports not selector(:has(*)) {
	.cart-widget-side .motahda-side-checkout-html form.checkout .elementor-1650 > .e-con.e-parent > .e-con-inner > .e-con.e-child {
		order: 0;
	}
}

}
