/*
 * Purchase buttons match the selected weight chip:
 * peach fill, black text, a thin frame.
 * On checkout the sticky bar sits above the footer so it can be tapped.
 */

.single_add_to_cart_button,
.product-single-summary button[name="add-to-cart"],
.woocommerce-mini-cart__buttons a.button.checkout,
body .wc-proceed-to-checkout a.checkout-button,
a.checkout-button,
#go-to-second-step:not(.disabled),
button#place_order,
button[name="woocommerce_checkout_place_order"]:not(.disabled),
a#select_delivery_time_digikala,
#snapppay-payment-button {
	background: #eaceb4 !important;
	background-color: #eaceb4 !important;
	color: #000 !important;
	border: 1px solid #c9b48a !important;
}

.single_add_to_cart_button:hover,
.product-single-summary button[name="add-to-cart"]:hover,
.woocommerce-mini-cart__buttons a.button.checkout:hover,
body .wc-proceed-to-checkout a.checkout-button:hover,
#go-to-second-step:not(.disabled):hover,
button#place_order:hover,
a#select_delivery_time_digikala:hover,
#snapppay-payment-button:hover {
	background: #e0c29f !important;
	background-color: #e0c29f !important;
	color: #000 !important;
}

@media (max-width: 768px) {
	body.woocommerce-checkout {
		padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
	}

	/* Keep the pay bar above footer / chat / sticky chrome. */
	body.woocommerce-checkout #place-order {
		position: fixed !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100% !important;
		margin: 0 !important;
		z-index: 2147483000 !important;
		background: #fff !important;
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) !important;
		box-sizing: border-box;
		pointer-events: auto !important;
	}

	/* Step 2 pins the bare button; never let it stay fixed on its own under the footer. */
	body.woocommerce-checkout #place-order #go-to-second-step,
	body.woocommerce-checkout #place-order #place_order,
	body.woocommerce-checkout #place-order button[name="woocommerce_checkout_place_order"],
	body.woocommerce-checkout button#place_order,
	body.woocommerce-checkout button[name="woocommerce_checkout_place_order"] {
		position: relative !important;
		left: auto !important;
		right: auto !important;
		bottom: auto !important;
		top: auto !important;
		width: 100% !important;
		margin: 0 !important;
		z-index: 1 !important;
		pointer-events: auto !important;
	}

	body.woocommerce-checkout footer.site-footer {
		position: relative !important;
		z-index: 0 !important;
		padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
	}

	body.woocommerce-checkout footer.site-footer * {
		z-index: auto !important;
	}
}
