/* ==========================================================================
   Reptiliano Mobile 1.3.0 - balão do WhatsApp com o mascote do suporte
   Site inteiro, menos finalização da compra (inc/whatsapp.php).
   ========================================================================== */

.rpt-wa {
	--wa-green: #25d366;
	--wa-size: 68px;
	position: fixed;
	right: 20px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 9980;
	font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	animation: rpt-wa-in .55s cubic-bezier(.2, 1.4, .4, 1) 1s both;
}

.rpt-wa__btn,
.rpt-wa__btn:visited {
	position: relative;
	display: block;
	width: var(--wa-size);
	height: var(--wa-size);
	border: 3px solid var(--wa-green);
	border-radius: 50%;
	background: #fff4e6;
	box-shadow: 0 10px 26px rgba(15, 20, 18, .28);
	color: #fff;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
	transition: transform .2s ease, box-shadow .2s ease;
}

.rpt-wa__btn:hover {
	transform: translateY(-3px) scale(1.04);
	box-shadow: 0 14px 32px rgba(15, 20, 18, .32);
}

.rpt-wa__btn:focus-visible {
	outline: 3px solid #15191c;
	outline-offset: 3px;
}

.rpt-wa__gecko {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
}

/* Anel pulsando em volta */
.rpt-wa__ring {
	position: absolute;
	inset: -3px;
	border: 2px solid var(--wa-green);
	border-radius: 50%;
	pointer-events: none;
	animation: rpt-wa-ring 2.6s ease-out 2s infinite;
}

/* Selo do WhatsApp no canto */
.rpt-wa__badge {
	position: absolute;
	right: -6px;
	bottom: -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--wa-green);
	box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
}

.rpt-wa__logo {
	width: 16px;
	height: 16px;
}

/* "Atendimento" ao passar o mouse (desktop) */
.rpt-wa__label {
	position: absolute;
	top: 50%;
	right: calc(100% + 12px);
	padding: 8px 14px;
	border-radius: 999px;
	background: #15191c;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translate(8px, -50%);
	transition: opacity .18s ease, transform .18s ease;
}

@media (hover: hover) {
	.rpt-wa__btn:hover .rpt-wa__label,
	.rpt-wa__btn:focus-visible .rpt-wa__label {
		opacity: 1;
		transform: translate(0, -50%);
	}
}

/* Mascote: respira, pisca, mostra a língua */
.rpt-wa__head,
.rpt-wa__eyes,
.rpt-wa__tongue,
.rpt-wa__mic {
	transform-box: fill-box;
}

.rpt-wa__head {
	transform-origin: 50% 100%;
	animation: rpt-wa-bob 3.4s ease-in-out infinite;
}

.rpt-wa__eyes {
	transform-origin: 50% 50%;
	animation: rpt-wa-blink 5s infinite;
}

.rpt-wa__tongue {
	transform-origin: 50% 0;
	transform: scaleY(0);
	animation: rpt-wa-tongue 6s 1.6s infinite;
}

.rpt-wa__mic {
	animation: rpt-wa-mic 1.8s ease-in-out infinite;
}

.rpt-wa.is-chamando .rpt-wa__btn {
	animation: rpt-wa-wiggle .9s ease-in-out 2;
}

/* Balão de mensagem */
.rpt-wa__bubble {
	position: absolute;
	right: 0;
	bottom: calc(var(--wa-size) + 16px);
	width: 240px;
	padding: 14px 34px 14px 16px;
	border-radius: 16px 16px 4px 16px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(15, 20, 18, .22);
	color: #3b4349;
	font-size: 14px;
	line-height: 1.45;
	opacity: 0;
	transform: translateY(8px) scale(.96);
	transform-origin: 100% 100%;
	transition: opacity .25s ease, transform .25s ease;
}

.rpt-wa__bubble[hidden] {
	display: none;
}

.rpt-wa__bubble.is-on {
	opacity: 1;
	transform: none;
}

.rpt-wa__bubble strong {
	display: block;
	margin-bottom: 2px;
	color: #15191c;
	font-size: 14px;
}

.rpt-wa__bubble span {
	display: block;
}

.rpt-wa__x {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6a7279;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.rpt-wa__x:hover,
.rpt-wa__x:focus-visible {
	background: #f1efeb;
	color: #15191c;
}

/* "Voltar ao topo" do Zakra fica acima do balão */
body.rpt-has-wa #tg-scroll-to-top {
	right: 29px;
	bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

/* Celular */
@media (max-width: 768px) {
	.rpt-wa {
		--wa-size: 60px;
		right: 14px;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	}

	.rpt-wa__bubble {
		width: min(240px, calc(100vw - 40px));
	}

	body.rpt-has-wa #tg-scroll-to-top {
		right: 19px;
		bottom: calc(90px + env(safe-area-inset-bottom, 0px));
	}

	/* Carrinho: acima da barra fixa do total */
	body.rpt-has-wa.rpt-has-sticky .rpt-wa {
		bottom: calc(var(--rpt-sticky-h, 72px) + 12px + env(safe-area-inset-bottom, 0px));
	}

	body.rpt-has-wa.rpt-has-sticky #tg-scroll-to-top {
		bottom: calc(var(--rpt-sticky-h, 72px) + 88px + env(safe-area-inset-bottom, 0px));
	}
}

@media print {
	.rpt-wa {
		display: none !important;
	}
}

@keyframes rpt-wa-in {
	from {
		opacity: 0;
		transform: translateY(24px) scale(.6);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes rpt-wa-ring {
	0% {
		opacity: .7;
		transform: scale(1);
	}
	70%,
	100% {
		opacity: 0;
		transform: scale(1.45);
	}
}

@keyframes rpt-wa-bob {
	0%,
	100% {
		transform: translateY(0) rotate(0);
	}
	30% {
		transform: translateY(-1.6px) rotate(-2deg);
	}
	60% {
		transform: translateY(.4px) rotate(1.5deg);
	}
}

@keyframes rpt-wa-blink {
	0%,
	44%,
	50%,
	100% {
		transform: scaleY(1);
	}
	47% {
		transform: scaleY(.08);
	}
}

@keyframes rpt-wa-tongue {
	0%,
	70%,
	86%,
	100% {
		transform: scaleY(0);
	}
	74%,
	82% {
		transform: scaleY(1);
	}
	78% {
		transform: scaleY(.55);
	}
}

@keyframes rpt-wa-mic {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: .45;
	}
}

@keyframes rpt-wa-wiggle {
	0%,
	100% {
		transform: rotate(0);
	}
	20% {
		transform: rotate(-10deg);
	}
	40% {
		transform: rotate(8deg);
	}
	60% {
		transform: rotate(-6deg);
	}
	80% {
		transform: rotate(3deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rpt-wa,
	.rpt-wa__ring,
	.rpt-wa__head,
	.rpt-wa__eyes,
	.rpt-wa__tongue,
	.rpt-wa__mic,
	.rpt-wa.is-chamando .rpt-wa__btn {
		animation: none;
	}

	.rpt-wa__ring {
		display: none;
	}
}
