/**
 * Site WhatsApp Button
 *
 * Component styles are deliberately namespaced to avoid
 * inheritance and collisions with active themes/plugins.
 */

.swb-whatsapp-button,
.swb-whatsapp-button *,
.swb-whatsapp-button *::before,
.swb-whatsapp-button *::after {
	box-sizing: border-box;
}

.swb-whatsapp-button {
	align-items: center !important;
	background: transparent !important;
	border: 0 !important;
	bottom: max(24px, env(safe-area-inset-bottom)) !important;
	color: #fff !important;
	display: flex !important;
	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		Helvetica,
		Arial,
		sans-serif !important;
	font-size: 14px !important;
	height: 60px !important;
	justify-content: center !important;
	line-height: 1 !important;
	margin: 0 !important;
	max-height: 60px !important;
	max-width: 60px !important;
	min-height: 60px !important;
	min-width: 60px !important;
	padding: 0 !important;
	position: fixed !important;
	right: max(24px, env(safe-area-inset-right)) !important;
	text-decoration: none !important;
	width: 60px !important;
	z-index: 99999 !important;

	-webkit-tap-highlight-color: transparent;
	isolation: isolate;
	touch-action: manipulation;
}

/*
 * Main WhatsApp circle.
 */
.swb-whatsapp-button__circle {
	align-items: center;
	background-color: #25d366 !important;
	border: 0;
	border-radius: 50%;
	color: #fff !important;
	display: flex;
	height: 60px;
	justify-content: center;
	position: relative;
	transition:
		background-color 180ms ease,
		transform 180ms ease;
	width: 60px;
	z-index: 2;
}

/*
 * WhatsApp icon.
 */
.swb-whatsapp-button__icon {
	color: #fff !important;
	display: block !important;
	fill: currentcolor !important;
	flex: 0 0 auto;
	height: 34px !important;
	margin: 0 !important;
	max-height: 34px !important;
	max-width: 34px !important;
	padding: 0 !important;
	width: 34px !important;
}

/*
 * Animated attention ring.
 */
.swb-whatsapp-button__ping {
	background-color: #25d366;
	border-radius: 50%;
	height: 60px;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	width: 60px;
	z-index: 1;

	animation: swb-whatsapp-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes swb-whatsapp-ping {
	0% {
		opacity: 0.42;
		transform: scale(1);
	}

	75%,
	100% {
		opacity: 0;
		transform: scale(1.65);
	}
}

/*
 * Tooltip.
 */
.swb-whatsapp-button__tooltip {
	background-color: #111b21 !important;
	border-radius: 8px;
	color: #fff !important;
	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		Helvetica,
		Arial,
		sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	line-height: 1.35 !important;
	margin: 0 !important;
	opacity: 0;
	padding: 10px 14px !important;
	pointer-events: none;
	position: absolute;
	right: calc(100% + 14px);
	text-align: center;
	text-decoration: none !important;
	text-transform: none !important;
	top: 50%;
	transform: translate(8px, -50%);
	transition:
		opacity 180ms ease,
		transform 180ms ease,
		visibility 180ms ease;
	visibility: hidden;
	white-space: nowrap;
	z-index: 3;
}

.swb-whatsapp-button__tooltip::after {
	border-bottom: 6px solid transparent;
	border-left: 7px solid #111b21;
	border-top: 6px solid transparent;
	content: "";
	left: 100%;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

/*
 * Hover and keyboard focus.
 */
.swb-whatsapp-button:hover,
.swb-whatsapp-button:focus,
.swb-whatsapp-button:focus-visible {
	background: transparent !important;
	color: #fff !important;
	text-decoration: none !important;
}

.swb-whatsapp-button:hover .swb-whatsapp-button__circle,
.swb-whatsapp-button:focus-visible .swb-whatsapp-button__circle {
	background-color: #20bd5a !important;
	transform: translateY(-2px) scale(1.04);
}

.swb-whatsapp-button:hover .swb-whatsapp-button__tooltip,
.swb-whatsapp-button:focus-visible .swb-whatsapp-button__tooltip {
	opacity: 1;
	transform: translate(0, -50%);
	visibility: visible;
}

.swb-whatsapp-button:focus {
	outline: none !important;
}

.swb-whatsapp-button:focus-visible .swb-whatsapp-button__circle {
	outline: 3px solid #111b21;
	outline-offset: 4px;
}

/*
 * Mobile.
 */
@media (max-width: 767px) {
	.swb-whatsapp-button {
		bottom: max(18px, env(safe-area-inset-bottom)) !important;
		height: 54px !important;
		max-height: 54px !important;
		max-width: 54px !important;
		min-height: 54px !important;
		min-width: 54px !important;
		right: max(18px, env(safe-area-inset-right)) !important;
		width: 54px !important;
	}

	.swb-whatsapp-button__circle,
	.swb-whatsapp-button__ping {
		height: 54px;
		width: 54px;
	}

	.swb-whatsapp-button__icon {
		height: 30px !important;
		max-height: 30px !important;
		max-width: 30px !important;
		width: 30px !important;
	}

	.swb-whatsapp-button__tooltip {
		font-size: 13px !important;
		padding: 9px 12px !important;
		right: calc(100% + 12px);
	}
}

/*
 * Very small phones: avoid tooltip overflowing the viewport.
 */
@media (max-width: 420px) {
	.swb-whatsapp-button__tooltip {
		max-width: calc(100vw - 100px);
		white-space: normal;
		width: max-content;
	}
}

/*
 * Respect the user's operating-system motion preference.
 */
@media (prefers-reduced-motion: reduce) {
	.swb-whatsapp-button__ping {
		animation: none;
		display: none;
	}

	.swb-whatsapp-button__circle,
	.swb-whatsapp-button__tooltip {
		transition: none;
	}
}