/* Storefront WhatsApp buttons (partials/footer.php, order-success.php). Loaded only when the seller turns them on. */
:root {
	/* WhatsApp green darkened to clear WCAG AA against white (≈5.4:1) */
	--wa-green-dark: #0f7a41;
}

/* Floating chat button */
.wa-chat {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1040;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--wa-green-dark);
	color: #fff;
	font-size: 30px;
	box-shadow: 0 0 15px 0 rgba(50, 50, 50, 0.2);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-chat:hover,
.wa-chat:focus-visible {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(85, 85, 85, 0.2);
}

.wa-chat:focus-visible {
	outline: 3px solid var(--wa-green-dark);
	box-shadow: 0 0 0 3px #fff;
	outline-offset: 3px;
}

/* Keep the theme's scroll-to-top button clear of it */
body:has(.wa-chat) a#scrollUp {
	bottom: 96px;
	right: 29px;
}

/* Inline "Send order on WhatsApp" */
.wa-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--wa-green-dark);
	border-radius: 999px;
	color: var(--wa-green-dark);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wa-action .fa {
	font-size: 18px;
}

.wa-action:hover,
.wa-action:focus-visible {
	background: var(--wa-green-dark);
	color: #fff;
	text-decoration: none;
}

.wa-action:focus-visible {
	outline: 2px solid var(--wa-green-dark);
	outline-offset: 2px;
}

.wa-action--solid {
	background: var(--wa-green-dark);
	color: #fff;
}

.wa-action--solid:hover,
.wa-action--solid:focus-visible {
	filter: brightness(0.9);
}

.wa-action__note {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	opacity: 0.75;
}

@media (max-width: 575px) {
	.wa-chat {
		right: 16px;
		bottom: 16px;
		width: 52px;
		height: 52px;
		font-size: 28px;
	}

	body:has(.wa-chat) a#scrollUp {
		bottom: 80px;
		right: 19px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wa-chat,
	.wa-action {
		transition: none;
	}

	.wa-chat:hover,
	.wa-chat:focus-visible {
		transform: none;
	}
}
