/**
 * Sticky Bottom CTA - Mobile Only
 * Matches pre-footer CTA pattern (red bg, white button)
 */

.sticky-cta {
	display: none;
}

@media (max-width: 781px) {
	/* Only show on pages with has-sticky-cta body class */
	body.has-sticky-cta .sticky-cta {
		display: block;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 999;
		background: var(--wp--preset--color--primary);
		padding: 12px 16px;
		padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
	}

	.sticky-cta .wp-block-button {
		width: 100%;
		margin: 0;
	}

	.sticky-cta .wp-block-button__link {
		display: block;
		width: 100%;
		box-sizing: border-box;
		background: #ffffff !important;
		color: var(--wp--preset--color--primary) !important;
		font-weight: 700;
		font-size: 1rem;
		padding: 14px 24px !important;
		text-align: center;
		border-radius: 9999px;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
		transition: transform 0.15s ease, box-shadow 0.15s ease;
	}

	.sticky-cta .wp-block-button__link:hover,
	.sticky-cta .wp-block-button__link:focus {
		transform: scale(1.02);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	}

	.sticky-cta .wp-block-button__link:active {
		transform: scale(0.98);
	}

	/* Page content padding to prevent overlap */
	body.has-sticky-cta .page-content {
		padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
	}

	/* Hide when modals are open */
	body.quote-modal-open .sticky-cta {
		display: none;
	}

	/* Push third-party widgets above sticky CTA */
	body.has-sticky-cta #proChatIframeContainer {
		bottom: 80px !important;
	}

}

@media (prefers-reduced-motion: reduce) {
	.sticky-cta .wp-block-button__link {
		transition: none;
	}
}
