/**
 * OneTouch — mobile sticky Place order CTA.
 *
 * WoodMart's mobile bottom toolbar is 55px high in the supplied parent theme
 * (opt-bottom-toolbar.css). When the toolbar body class is present we sit
 * immediately above it; otherwise the CTA falls back to the bottom edge.
 */

.ot-mobile-checkout-submit {
	display: none;
}

@media (max-width: 768.98px) {
	/* The element remains inside the checkout form, but visually sticks to the viewport. */
	.woocommerce-checkout .ot-mobile-checkout-submit {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 351;
		display: block;
		padding: 8px 12px;
		background: var(--bgcolor-white, #fff);
		box-shadow: 0 -4px 14px rgba(0, 0, 0, .10);
	}

	/* WoodMart's supplied .wd-toolbar has height:55px and z-index:350. */
	body.sticky-toolbar-on.woocommerce-checkout .ot-mobile-checkout-submit,
	body.sticky-toolbar-on .woocommerce-checkout .ot-mobile-checkout-submit {
		bottom: 55px;
	}

	.ot-mobile-checkout-submit__inner {
		width: 100%;
		max-width: 680px;
		margin-inline: auto;
	}

	.woocommerce-checkout .ot-mobile-checkout-submit__button,
	.woocommerce-checkout button.ot-mobile-checkout-submit__button {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 54px;
		margin: 0 !important;
		padding: 12px 20px !important;
		border: 0 !important;
		border-radius: var(--btn-accented-brd-radius, var(--wd-brd-radius, 10px)) !important;
		background-color: var(--wd-primary-color, var(--btn-accented-bgcolor, #111)) !important;
		color: var(--btn-accented-color, #fff) !important;
		box-shadow: var(--btn-accented-box-shadow, none) !important;
		font-family: var(--wd-text-font, inherit) !important;
		font-size: 17px !important;
		font-weight: var(--btn-accented-font-weight, 700) !important;
		line-height: 1.2 !important;
		text-align: center;
		text-transform: none;
		cursor: pointer;
	}

	.woocommerce-checkout .ot-mobile-checkout-submit__button:active {
		transform: scale(.99);
	}

	.woocommerce-checkout .ot-mobile-checkout-submit__button:disabled {
		opacity: .55;
		cursor: not-allowed;
	}

	/* Keep the final checkout content reachable above the fixed CTA + toolbar. */
	body.woocommerce-checkout .wd-content-area,
	body.woocommerce-checkout .site-content {
		padding-bottom: 78px;
	}
}

@media (min-width: 769px) {
	.woocommerce-checkout .ot-mobile-checkout-submit {
		display: none !important;
	}
}
