/* ==========================================================================
   LEONA WP — Frontend CSS (Botão WhatsApp + Modal)
   100% scopado com .leona-wp-- para ZERO conflito com temas/plugins
   ========================================================================== */

/* ── Container ── */
.leona-wp--whatsapp-container {
	all: initial;
	position: fixed;
	z-index: 999998;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	direction: ltr;
}

.leona-wp--whatsapp-container *, .leona-wp--whatsapp-container *::before, .leona-wp--whatsapp-container *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.leona-wp--whatsapp-bottom-right {
	bottom: 24px;
	right: 24px;
}

.leona-wp--whatsapp-bottom-left {
	bottom: 24px;
	left: 24px;
}

/* ── Button ── */
.leona-wp--whatsapp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	position: relative;
	overflow: hidden;
}

.leona-wp--whatsapp-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.leona-wp--whatsapp-btn:active {
	transform: scale(0.95);
}

/* Padrão Circular — fundo customizável via --leona-wp-btn-bg */
.leona-wp--whatsapp-btn-default {
	background: var(--leona-wp-btn-bg, #25D366);
}

/* Arredondado com gradiente */
.leona-wp--whatsapp-btn-rounded {
	background: linear-gradient(135deg, var(--leona-wp-btn-bg, #25D366) 0%, #128C7E 100%);
	border-radius: 20px;
	width: auto;
	padding: 0 24px;
	height: 52px;
	gap: 8px;
}

/* Imagem personalizada — sem fundo nem sombra */
.leona-wp--whatsapp-btn-custom {
	background: transparent;
	box-shadow: none;
	width: auto;
	height: auto;
	border-radius: 0;
}

.leona-wp--whatsapp-btn-custom:hover {
	box-shadow: none;
}

/* Ícone SVG — SEMPRE branco */
.leona-wp--whatsapp-icon {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	color: #fff;
	fill: #fff;
}

.leona-wp--whatsapp-icon path {
	fill: #fff !important;
}

.leona-wp--whatsapp-custom-img {
	max-width: 64px;
	max-height: 64px;
	display: block;
}

/* Pulse animation */
.leona-wp--whatsapp-btn-default::after,
.leona-wp--whatsapp-btn-rounded::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	background: var(--leona-wp-btn-bg, #25D366);
	z-index: -1;
	animation: leonaWpPulse 2s ease-out infinite;
}

@keyframes leonaWpPulse {
	0% { transform: scale(1); opacity: 0.4; }
	100% { transform: scale(1.6); opacity: 0; }
}

/* ── Bubble ── */
.leona-wp--whatsapp-bubble {
	display: none;
	align-items: center;
	gap: 8px;
	position: absolute;
	bottom: 72px;
	right: 0;
	background: #fff;
	border-radius: 12px;
	padding: 12px 16px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.12);
	max-width: 260px;
	min-width: 180px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.leona-wp--whatsapp-bottom-left .leona-wp--whatsapp-bubble {
	right: auto;
	left: 0;
}

.leona-wp--whatsapp-bubble-show {
	opacity: 1 !important;
	transform: translateY(0) !important;
}

.leona-wp--whatsapp-bubble::after {
	content: '';
	position: absolute;
	bottom: -6px;
	right: 24px;
	width: 12px;
	height: 12px;
	background: #fff;
	transform: rotate(45deg);
	box-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

.leona-wp--whatsapp-bottom-left .leona-wp--whatsapp-bubble::after {
	right: auto;
	left: 24px;
}

.leona-wp--whatsapp-bubble-text {
	font-size: 13px;
	color: #333;
	line-height: 1.4;
	flex: 1;
}

.leona-wp--whatsapp-bubble-close {
	background: none;
	border: none;
	color: #bbb;
	font-size: 11px;
	cursor: pointer;
	padding: 2px;
	line-height: 1;
	flex-shrink: 0;
	opacity: 0.6;
	transition: opacity 0.2s;
}

.leona-wp--whatsapp-bubble-close:hover {
	opacity: 1;
	color: #666;
}

/* ── Modal Lead Capture ── */
.leona-wp--whatsapp-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.5);
	z-index: 999999;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: leonaWpFadeIn 0.3s ease;
}

.leona-wp--whatsapp-modal-content {
	background: #fff;
	border-radius: 16px;
	max-width: 380px;
	width: 100%;
	padding: 32px 28px;
	position: relative;
	box-shadow: 0 24px 48px rgba(0,0,0,0.2);
	animation: leonaWpSlideUp 0.3s ease;
}

.leona-wp--whatsapp-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: #f0f0f0;
	border: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	transition: background 0.2s;
}

.leona-wp--whatsapp-modal-close:hover {
	background: #e74c3c;
	color: #fff;
}

.leona-wp--whatsapp-modal-header {
	text-align: center;
	margin-bottom: 24px;
}

.leona-wp--whatsapp-modal-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	display: block;
}

.leona-wp--whatsapp-modal-header h3 {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0;
}

.leona-wp--whatsapp-field {
	margin-bottom: 14px;
}

.leona-wp--whatsapp-field input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	font-size: 14px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s;
	color: #333;
	background: #fafafa;
}

.leona-wp--whatsapp-field input:focus {
	border-color: #25D366;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37,211,102,0.1);
}

.leona-wp--whatsapp-submit {
	width: 100%;
	padding: 14px;
	background: #25D366;
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.2s, transform 0.2s;
	font-family: inherit;
	margin-top: 4px;
}

.leona-wp--whatsapp-submit:hover {
	background: #1da851;
	transform: translateY(-1px);
}

.leona-wp--whatsapp-submit:active {
	transform: translateY(0);
}

/* Affiliate Banner */
.leona-wp--affiliate-banner {
	display: inline-block;
	max-width: 100%;
}

.leona-wp--affiliate-link {
	color: #5B3E96;
	text-decoration: underline;
	font-weight: 500;
	transition: color 0.2s;
}

.leona-wp--affiliate-link:hover {
	color: #4A2D85;
}

/* ── Animations ── */
@keyframes leonaWpFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes leonaWpSlideUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
	.leona-wp--whatsapp-bottom-right,
	.leona-wp--whatsapp-bottom-left {
		bottom: 16px;
		right: 16px;
	}
	.leona-wp--whatsapp-bottom-left {
		right: auto;
		left: 16px;
	}
	.leona-wp--whatsapp-btn {
		width: 54px;
		height: 54px;
	}
	.leona-wp--whatsapp-icon {
		width: 28px;
		height: 28px;
	}
	.leona-wp--whatsapp-bubble {
		max-width: 220px;
		bottom: 66px;
	}
	.leona-wp--whatsapp-modal-content {
		padding: 24px 20px;
	}
}
