/* Engrene WhatsApp — front-end */

.ewa-icon {
	display: block;
	width: 1em;
	height: 1em;
	flex: none;
}

/* Botão flutuante redondo */
.ewa-float {
	position: fixed;
	z-index: 99990;
	bottom: var(--ewa-bottom, 20px);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: inherit;
	pointer-events: none;
}

.ewa-float--right {
	right: var(--ewa-side, 20px);
}

.ewa-float--left {
	left: var(--ewa-side, 20px);
	align-items: flex-start;
}

.ewa-float > * {
	pointer-events: auto;
}

a.ewa-fab,
a.ewa-fab:hover,
a.ewa-fab:focus {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #25d366;
	color: #fff !important;
	font-size: 34px;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.ewa-fab:hover {
	transform: scale(1.07);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

a.ewa-fab:focus-visible {
	outline: 3px solid #128c7e;
	outline-offset: 3px;
}

/* Anel pulsando em volta do botão */
a.ewa-fab::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #25d366;
	z-index: -1;
	animation: ewa-pulse 2.4s ease-out infinite;
}

@keyframes ewa-pulse {
	0% {
		transform: scale(1);
		opacity: 0.55;
	}
	80%,
	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}

/* Bolinha de "mensagem nova" enquanto o balão está aberto */
.ewa-fab__dot {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #ff3b30;
	opacity: 0;
	transform: scale(0);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ewa-float--open .ewa-fab__dot {
	opacity: 1;
	transform: scale(1);
}

/* Balão de chamada */
.ewa-bubble {
	position: relative;
	max-width: 260px;
	padding: 12px 34px 12px 14px;
	border-radius: 12px;
	background: #fff;
	color: #1f2933;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	animation: ewa-pop 0.3s ease;
}

.ewa-bubble[hidden] {
	display: none;
}

.ewa-bubble::after {
	content: "";
	position: absolute;
	bottom: -7px;
	right: 24px;
	width: 14px;
	height: 14px;
	background: #fff;
	transform: rotate(45deg);
	box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.06);
}

.ewa-float--left .ewa-bubble::after {
	right: auto;
	left: 24px;
}

.ewa-bubble__title {
	display: block;
	margin-bottom: 2px;
	color: #128c7e;
	font-size: 14px;
	font-weight: 700;
}

.ewa-bubble__text {
	display: block;
}

.ewa-float .ewa-bubble__close {
	position: absolute !important;
	top: 4px !important;
	right: 6px !important;
	display: block !important;
	width: 22px !important;
	height: 22px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #8a949e !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	line-height: 22px !important;
	text-align: center !important;
	box-shadow: none !important;
	cursor: pointer;
	user-select: none;
}

.ewa-float .ewa-bubble__close:hover,
.ewa-float .ewa-bubble__close:focus-visible {
	background: #f0f2f4 !important;
	color: #1f2933 !important;
	outline: none;
}

@keyframes ewa-pop {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Botão "Pedir pelo WhatsApp" (produto e carrinho) */
.ewa-wrap {
	margin: 12px 0;
}

a.ewa-button,
a.ewa-button:hover,
a.ewa-button:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 22px;
	border: 0;
	border-radius: 6px;
	background: #25d366;
	color: #fff !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

a.ewa-button:hover {
	background: #1ebe5b;
}

a.ewa-button .ewa-icon {
	font-size: 22px;
}

@media (max-width: 600px) {
	a.ewa-fab {
		width: 56px;
		height: 56px;
		font-size: 30px;
	}

	.ewa-bubble {
		max-width: calc(100vw - 40px);
	}

	.ewa-wrap--product a.ewa-button,
	.ewa-wrap--cart a.ewa-button {
		display: flex;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	a.ewa-fab::before,
	.ewa-bubble {
		animation: none;
	}
}
