/* Botão flutuante WhatsApp — z-index abaixo do modal de busca (10050) e do banner de cookies */

.lubmix-wa-float {
	position: fixed;
	z-index: 10040;
	right: max(1rem, env(safe-area-inset-right, 0px));
	bottom: max(1rem, env(safe-area-inset-bottom, 0px));
	pointer-events: none;
	font-family: inherit;
}

.lubmix-wa-float__link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 9999px;
	background: #25d366;
	color: #fff;
	box-shadow:
		0 4px 14px rgba(15, 118, 110, 0.35),
		0 2px 6px rgba(0, 0, 0, 0.12);
	text-decoration: none;
	pointer-events: auto;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
	isolation: isolate;
}

.lubmix-wa-float__link:hover {
	background: #20bd5a;
	box-shadow:
		0 6px 20px rgba(15, 118, 110, 0.4),
		0 3px 8px rgba(0, 0, 0, 0.14);
	transform: translateY(-2px);
}

.lubmix-wa-float__link:focus {
	outline: none;
}

.lubmix-wa-float__link:focus-visible {
	outline: 3px solid var(--lubmix-secondary, #006bb4);
	outline-offset: 3px;
}

.lubmix-wa-float__pulse {
	position: absolute;
	inset: -3px;
	border-radius: inherit;
	pointer-events: none;
	z-index: -1;
	animation: lubmix-wa-pulse 2.5s ease-out infinite;
}

@keyframes lubmix-wa-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
	}

	70% {
		box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
	}
}

.lubmix-wa-float__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.lubmix-wa-float__img {
	display: block;
	width: 62%;
	height: auto;
	max-height: 62%;
	object-fit: contain;
}

.lubmix-wa-float__svg {
	display: block;
	flex-shrink: 0;
}

.lubmix-wa-float__tooltip {
	position: absolute;
	right: calc(100% + 0.75rem);
	top: 50%;
	transform: translateY(-50%) translateX(6px);
	padding: 0.45rem 0.75rem;
	border-radius: 9999px;
	background: #fff;
	color: var(--lubmix-text, #2f2f2f);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease,
		transform 0.2s ease;
}

.lubmix-wa-float__tooltip::after {
	content: '';
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	border: 6px solid transparent;
	border-left-color: #fff;
}

@media (min-width: 1024px) {
	.lubmix-wa-float__link {
		width: 4.25rem;
		height: 4.25rem;
		box-shadow:
			0 6px 22px rgba(15, 118, 110, 0.38),
			0 3px 10px rgba(0, 0, 0, 0.1);
	}

	.lubmix-wa-float__img {
		width: 58%;
		max-height: 58%;
	}

	.lubmix-wa-float__svg {
		width: 34px;
		height: 34px;
	}
}

@media (min-width: 1024px) and (hover: hover) {
	.lubmix-wa-float__link:hover .lubmix-wa-float__tooltip,
	.lubmix-wa-float__link:focus-visible .lubmix-wa-float__tooltip {
		opacity: 1;
		visibility: visible;
		transform: translateY(-50%) translateX(0);
	}
}

@media (max-width: 1023px) {
	.lubmix-wa-float {
		right: max(0.75rem, env(safe-area-inset-right, 0px));
		bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
	}

	.lubmix-wa-float__link {
		width: 2.875rem;
		height: 2.875rem;
		box-shadow:
			0 3px 10px rgba(15, 118, 110, 0.28),
			0 1px 4px rgba(0, 0, 0, 0.08);
	}

	.lubmix-wa-float__pulse {
		animation-duration: 3s;
	}

	@keyframes lubmix-wa-pulse {
		0% {
			box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.35);
		}

		70% {
			box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
		}

		100% {
			box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
		}
	}
}

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

/* ── Reset: botão herda visual do link ── */
.lubmix-wa-float__link {
	background: #25d366;
	border: none;
	cursor: pointer;
	font: inherit;
	padding: 0;
}

/* ── Modal WhatsApp Lead ── */
.lubmix-wa-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10060;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.lubmix-wa-modal--open {
	display: flex;
}

.lubmix-wa-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.lubmix-wa-modal__box {
	position: relative;
	background: #fff;
	border-radius: 1rem;
	width: 100%;
	max-width: 440px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 2rem 1.75rem 1.75rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.lubmix-wa-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem;
	color: #6b7280;
	line-height: 1;
	border-radius: 0.375rem;
	transition: color 0.15s ease, background 0.15s ease;
}

.lubmix-wa-modal__close:hover {
	color: #111;
	background: #f3f4f6;
}

.lubmix-wa-modal__header {
	text-align: center;
	margin-bottom: 1.5rem;
}

.lubmix-wa-modal__icon svg {
	width: 2.5rem;
	height: 2.5rem;
	fill: #25d366;
	margin-bottom: 0.75rem;
}

.lubmix-wa-modal__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 0.375rem;
}

.lubmix-wa-modal__subtitle {
	font-size: 0.9rem;
	color: #6b7280;
	margin: 0;
}

.lubmix-wa-modal__field {
	margin-bottom: 1rem;
}

.lubmix-wa-modal__field label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 0.375rem;
}

.lubmix-wa-modal__field label span {
	color: #ef4444;
}

.lubmix-wa-modal__field input {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1.5px solid #d1d5db;
	border-radius: 0.5rem;
	font-size: 0.9375rem;
	color: #111827;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

.lubmix-wa-modal__field input:focus {
	outline: none;
	border-color: #25d366;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.lubmix-wa-modal__submit {
	width: 100%;
	padding: 0.75rem;
	background: #25d366;
	color: #fff;
	border: none;
	border-radius: 0.5rem;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	margin-top: 0.5rem;
	transition: background 0.2s ease, transform 0.1s ease;
}

.lubmix-wa-modal__submit:hover {
	background: #20bd5a;
}

.lubmix-wa-modal__submit:active {
	transform: scale(0.98);
}

.lubmix-wa-modal__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.lubmix-wa-modal__error {
	color: #dc2626;
	font-size: 0.875rem;
	text-align: center;
	margin: 0.75rem 0 0;
}

/* Sucesso */
.lubmix-wa-modal__success {
	overflow: hidden;
	margin: -2rem -1.75rem -1.75rem;
}

.lubmix-wa-modal__success-top {
	background: #f0faf4;
	border-bottom: 1px solid #c6e8d3;
	padding: 1.75rem 1.5rem;
	text-align: center;
}

.lubmix-wa-modal__success-top svg {
	display: block;
	margin: 0 auto 0.875rem;
}

.lubmix-wa-modal__success-title {
	font-size: 1.0625rem;
	font-weight: 700;
	color: #1a5c33;
	margin: 0 0 0.4rem;
}

.lubmix-wa-modal__success-msg {
	font-size: 0.875rem;
	color: #3b7a4e;
	margin: 0;
	line-height: 1.5;
}

.lubmix-wa-modal__success-bottom {
	padding: 1.25rem 1.5rem;
	text-align: center;
	background: #fff;
}

.lubmix-wa-modal__wa-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6875rem 1.375rem;
	background: #25d366;
	color: #fff;
	border-radius: 9999px;
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1;
	text-decoration: none;
	transition: background 0.2s ease;
}

.lubmix-wa-modal__wa-btn svg {
	display: block;
	flex-shrink: 0;
	position: relative;
	top: 0;
}

.lubmix-wa-modal__wa-btn:hover {
	background: #20bd5a;
	color: #fff;
}
