/* WhatsApp Leads FM — Front-end Styles v1.12.2
   Todos os seletores são escopados por ID e usam !important nas propriedades
   que temas/Elementor costumam sobrescrever (button, título, input, svg).
   Cores configuráveis chegam como variáveis CSS (--fwl-*) definidas pelo PHP.
*/

#fwl-floating-btn,
#fwl-floating-btn *,
#fwl-bubble,
#fwl-bubble *,
#fwl-overlay,
#fwl-overlay * {
	box-sizing: border-box !important;
	font-family: var(--fwl-font, inherit) !important; /* fonte do site, ou a do painel */
	letter-spacing: normal !important;
	text-transform: none !important;
}

/* Ícone SVG — impede tema de esconder/redimensionar/recolorir */
.fwl-wa-icon {
	display: block !important;
	flex: 0 0 auto !important;
	max-width: none !important;
	fill: #fff !important;
	visibility: visible !important;
	opacity: 1 !important;
}
.fwl-wa-icon path { fill: #fff !important; }

/* ── Botão flutuante ─────────────────────────────────────── */
#fwl-floating-btn {
	position: fixed !important;
	bottom: 24px !important;
	z-index: 99990 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 60px !important;
	height: 60px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	background-color: #25D366;
	color: #fff !important;
	border: none !important;
	cursor: pointer !important;
	line-height: 1 !important;
	box-shadow: 0 6px 20px rgba(0,0,0,.18) !important;
	transition: transform .2s ease, box-shadow .2s ease !important;
}
#fwl-floating-btn .fwl-wa-icon { width: 32px !important; height: 32px !important; }
#fwl-floating-btn:hover,
#fwl-floating-btn:focus-visible {
	transform: scale(1.08) !important;
	box-shadow: 0 8px 26px rgba(0,0,0,.24) !important;
	outline: none !important;
}
#fwl-floating-btn.fwl-pos-right { right: 24px !important; left: auto !important; }
#fwl-floating-btn.fwl-pos-left  { left: 24px !important;  right: auto !important; }

/* Tooltip */
#fwl-floating-btn::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 72px;
	right: 0;
	background: rgba(0,0,0,.78);
	color: #fff;
	font-size: 12px;
	padding: 5px 10px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s;
}
#fwl-floating-btn.fwl-pos-left::after { right: auto; left: 0; }
#fwl-floating-btn:hover::after { opacity: 1; }
body.fwl-bubble-open #fwl-floating-btn::after { display: none; }

/* Pulse */
#fwl-floating-btn::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: inherit;
	animation: fwl-pulse 2.4s ease-out infinite;
	z-index: -1;
}
@keyframes fwl-pulse {
	0%   { transform: scale(1);    opacity: .6; }
	70%  { transform: scale(1.55); opacity: 0; }
	100% { opacity: 0; }
}

/* Badge de notificação */
#fwl-floating-btn .fwl-badge {
	position: absolute !important;
	top: -2px !important;
	right: -2px !important;
	min-width: 20px !important;
	height: 20px !important;
	padding: 0 5px !important;
	border-radius: 10px !important;
	background: #ff3b30 !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 20px !important;
	text-align: center !important;
	border: 2px solid #fff !important;
	transform: scale(0);
	transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
#fwl-floating-btn.fwl-has-badge .fwl-badge { transform: scale(1); }

/* ── Balão de atendimento ────────────────────────────────── */
#fwl-bubble {
	position: fixed !important;
	bottom: 98px !important;
	z-index: 99991 !important;
	width: 300px !important;
	max-width: calc(100vw - 32px) !important;
	background: #fff !important;
	color: #1a1a1a !important;
	border-radius: 16px !important;
	box-shadow: 0 12px 40px rgba(0,0,0,.18) !important;
	padding: 14px 14px 12px !important;
	margin: 0 !important;
	cursor: pointer;
	opacity: 0;
	transform: translateY(12px) scale(.96);
	transform-origin: bottom right;
	transition: opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
#fwl-bubble.fwl-pos-right { right: 24px !important; left: auto !important; }
#fwl-bubble.fwl-pos-left  { left: 24px !important; right: auto !important; transform-origin: bottom left; }
#fwl-bubble.fwl-bubble--in { opacity: 1; transform: translateY(0) scale(1); }

/* setinha apontando para o botão */
#fwl-bubble::after {
	content: '';
	position: absolute;
	bottom: -7px;
	width: 14px;
	height: 14px;
	background: #fff;
	transform: rotate(45deg);
	box-shadow: 3px 3px 6px rgba(0,0,0,.06);
}
#fwl-bubble.fwl-pos-right::after { right: 22px; }
#fwl-bubble.fwl-pos-left::after  { left: 22px; }

#fwl-bubble .fwl-bubble-close {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	width: 24px !important;
	height: 24px !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: #f1f1f1 !important;
	color: #666 !important;
	font-size: 11px !important;
	line-height: 24px !important;
	text-align: center !important;
	cursor: pointer !important;
	box-shadow: none !important;
}
#fwl-bubble .fwl-bubble-close:hover { background: #e4e4e4 !important; color: #222 !important; }

#fwl-bubble .fwl-bubble-head {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	margin: 0 28px 10px 0 !important;
}
#fwl-bubble .fwl-bubble-avatar-wrap { position: relative !important; flex: 0 0 auto !important; }
#fwl-bubble .fwl-bubble-avatar {
	display: block !important;
	width: 40px !important;
	height: 40px !important;
	max-width: none !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	margin: 0 !important;
}
#fwl-bubble .fwl-bubble-avatar--rounded { border-radius: 10px !important; }
#fwl-bubble .fwl-bubble-avatar--initial {
	background: #25D366 !important; /* sobrescrito inline pela cor do botão */
	color: #fff !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 40px !important;
	text-align: center !important;
}
#fwl-bubble .fwl-bubble-online {
	position: absolute !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 11px !important;
	height: 11px !important;
	border-radius: 50% !important;
	background: #25D366 !important;
	border: 2px solid #fff !important;
}
#fwl-bubble .fwl-bubble-who { display: flex !important; flex-direction: column !important; line-height: 1.25 !important; }
#fwl-bubble .fwl-bubble-who strong { font-size: 14px !important; font-weight: 700 !important; color: #1a1a1a !important; }
#fwl-bubble .fwl-bubble-who small  { font-size: 12px !important; color: #1fa855 !important; }

#fwl-bubble .fwl-bubble-msg {
	background: #f0f2f5 !important;
	border-radius: 4px 14px 14px 14px !important;
	padding: 10px 12px !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
	color: #1a1a1a !important;
	min-height: 40px !important;
	display: flex !important;
	align-items: center !important;
}
#fwl-bubble .fwl-bubble-text[hidden] { display: none !important; }

/* indicador "digitando…" */
#fwl-bubble .fwl-typing { display: inline-flex !important; gap: 4px !important; align-items: center !important; }
#fwl-bubble .fwl-typing i {
	display: block !important;
	width: 7px !important;
	height: 7px !important;
	border-radius: 50% !important;
	background: #9aa0a6 !important;
	animation: fwl-typing 1.1s infinite ease-in-out;
}
#fwl-bubble .fwl-typing i:nth-child(2) { animation-delay: .15s; }
#fwl-bubble .fwl-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes fwl-typing {
	0%, 60%, 100% { transform: translateY(0);    opacity: .5; }
	30%           { transform: translateY(-4px); opacity: 1; }
}

#fwl-bubble .fwl-bubble-cta {
	display: block !important;
	width: 100% !important;
	margin: 10px 0 0 !important;
	padding: 9px 12px !important;
	min-height: 0 !important;
	border: none !important;
	border-radius: 10px !important;
	background: var(--fwl-submit-bg, #25D366) !important;
	color: var(--fwl-submit-text, #fff) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-align: center !important;
	cursor: pointer !important;
	box-shadow: none !important;
}
#fwl-bubble .fwl-bubble-cta:hover { filter: brightness(1.06); }

/* ── Botão inline (shortcode) ────────────────────────────── */
.fwl-inline-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 12px 22px !important;
	border-radius: 30px !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	border: none !important;
	cursor: pointer !important;
	box-shadow: 0 3px 12px rgba(0,0,0,.15) !important;
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
	line-height: 1.2 !important;
}
.fwl-inline-btn:hover,
.fwl-inline-btn:focus-visible {
	transform: translateY(-2px);
	filter: brightness(1.06);
	outline: none;
}
.fwl-inline-btn { color: var(--fwl-inline-text, #fff) !important; }
.fwl-inline-btn .fwl-wa-icon { width: 20px !important; height: 20px !important; }
.fwl-inline-btn .fwl-wa-icon path { fill: var(--fwl-inline-text, #fff) !important; }

/* ── Overlay ─────────────────────────────────────────────── */
#fwl-overlay {
	position: fixed !important;
	inset: 0 !important;
	background: rgba(17,27,33,.6) !important;
	z-index: 2147483002 !important; /* acima da barra do Cookies FM (2147483000) */
	align-items: center !important;
	justify-content: center !important;
	padding: 16px !important;
	margin: 0 !important;
	animation: fwl-fade-in .2s ease;
	backdrop-filter: blur(2px);
}
@keyframes fwl-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Modal ───────────────────────────────────────────────── */
#fwl-overlay .fwl-modal {
	position: relative !important;
	width: 100% !important;
	max-width: 400px !important;
	max-height: calc(100vh - 32px) !important;
	overflow-y: auto !important;
	background: #fff !important;
	color: #1a1a1a !important;
	border-radius: 20px !important;
	padding: 32px 28px 22px !important;
	margin: 0 !important;
	box-shadow: 0 24px 64px rgba(0,0,0,.25) !important;
	animation: fwl-slide-up .28s cubic-bezier(.34,1.56,.64,1);
	text-align: left !important;
}
@keyframes fwl-slide-up {
	from { transform: translateY(24px) scale(.97); opacity: 0; }
	to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* Botão fechar (X) — fundo e cor configuráveis */
#fwl-overlay .fwl-modal-close {
	position: absolute !important;
	top: 14px !important;
	right: 14px !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none !important;
	border-radius: 50% !important;
	background: var(--fwl-close-bg, #f1f1f1) !important;
	color: var(--fwl-close-color, #555) !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	transition: filter .15s, transform .15s !important;
}
#fwl-overlay .fwl-modal-close:hover,
#fwl-overlay .fwl-modal-close:focus-visible {
	filter: brightness(.92) !important;
	transform: rotate(90deg) !important;
	outline: none !important;
}

#fwl-overlay .fwl-modal-icon {
	display: flex !important;
	justify-content: center !important;
	margin: 0 0 12px !important;
}
/* Logo ou foto do atendimento (topo do modal) */
#fwl-overlay .fwl-avatar-wrap {
	position: relative !important;
	display: block !important;
	width: 72px !important;
	height: 72px !important;
	margin: 0 !important;
	padding: 0 !important;
}
#fwl-overlay .fwl-avatar {
	display: block !important;
	width: 72px !important;
	height: 72px !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	background: #fff !important;
	box-shadow: 0 4px 14px rgba(0,0,0,.14) !important;
}
#fwl-overlay .fwl-avatar--rounded { border-radius: 18px !important; }
#fwl-overlay .fwl-avatar--initial {
	background: var(--fwl-brand, #25D366) !important;
	color: #fff !important;
	font-size: 30px !important;
	font-weight: 700 !important;
	line-height: 72px !important;
	text-align: center !important;
	font-family: inherit !important;
}
#fwl-overlay .fwl-avatar-badge {
	position: absolute !important;
	right: -4px !important;
	bottom: -4px !important;
	width: 26px !important;
	height: 26px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #fff !important;
	border-radius: 50% !important;
	box-shadow: 0 1px 4px rgba(0,0,0,.18) !important;
}
#fwl-overlay .fwl-avatar-badge svg {
	display: block !important;
	width: 22px !important;
	height: 22px !important;
	max-width: none !important;
}

#fwl-overlay .fwl-modal-title {
	display: block !important;
	text-align: center !important;
	font-size: 21px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	margin: 0 0 6px !important;
	padding: 0 !important;
	color: #111b21 !important;
	border: none !important;
	letter-spacing: normal !important;
	text-transform: none !important;
}
#fwl-overlay .fwl-modal-subtitle {
	text-align: center !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
	color: #667781 !important;
	margin: 0 0 22px !important;
	padding: 0 !important;
}

/* ── Campos ──────────────────────────────────────────────── */
#fwl-overlay .fwl-field { margin: 0 0 14px !important; padding: 0 !important; }
#fwl-overlay .fwl-field label {
	display: block !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: #3b4a54 !important;
	margin: 0 0 6px !important;
}
#fwl-overlay .fwl-required { color: #e53935 !important; }
#fwl-overlay .fwl-field input {
	display: block !important;
	width: 100% !important;
	height: 48px !important;
	padding: 0 14px !important;
	margin: 0 !important;
	border: 1.5px solid #d6dbdf !important;
	border-radius: 12px !important;
	background: #fff !important;
	color: #111b21 !important;
	font-size: 16px !important; /* 16px evita zoom automático no iPhone */
	line-height: 48px !important;
	box-shadow: none !important;
	transition: border-color .2s, box-shadow .2s !important;
}
#fwl-overlay .fwl-field input::placeholder { color: #a0a8ad !important; opacity: 1 !important; }
#fwl-overlay .fwl-field input:focus {
	border-color: #25D366 !important;
	outline: none !important;
	box-shadow: 0 0 0 4px rgba(37,211,102,.15) !important;
}
#fwl-overlay .fwl-field input.fwl-invalid { border-color: #e53935 !important; }
#fwl-overlay .fwl-error {
	display: block !important;
	font-size: 12px !important;
	line-height: 1.3 !important;
	color: #e53935 !important;
	margin-top: 4px !important;
	min-height: 0 !important;
}
#fwl-overlay .fwl-error:empty { display: none !important; }

/* honeypot anti-spam — invisível para pessoas */
#fwl-overlay .fwl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ── Botão "Ir para o WhatsApp" — fundo e texto configuráveis ── */
#fwl-overlay .fwl-submit-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	width: 100% !important;
	height: 52px !important;
	min-height: 0 !important;
	padding: 0 16px !important;
	margin: 8px 0 0 !important;
	background: var(--fwl-submit-bg, #25D366) !important;
	color: var(--fwl-submit-text, #fff) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	border: none !important;
	border-radius: 12px !important;
	cursor: pointer !important;
	box-shadow: 0 6px 16px rgba(0,0,0,.12) !important;
	transition: filter .2s, transform .15s !important;
}
#fwl-overlay .fwl-submit-btn .fwl-wa-icon { width: 22px !important; height: 22px !important; fill: var(--fwl-submit-text, #fff) !important; }
#fwl-overlay .fwl-submit-btn .fwl-wa-icon path { fill: var(--fwl-submit-text, #fff) !important; }
#fwl-overlay .fwl-submit-btn:hover {
	filter: brightness(1.07) !important;
	transform: translateY(-1px) !important;
}
#fwl-overlay .fwl-submit-btn:disabled {
	opacity: .65 !important;
	cursor: wait !important;
	transform: none !important;
}

/* ── Privacidade ─────────────────────────────────────────── */
#fwl-overlay .fwl-privacy {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 5px !important;
	text-align: center !important;
	font-size: 11.5px !important;
	line-height: 1.4 !important;
	color: #8696a0 !important;
	margin: 12px 0 0 !important;
	padding: 0 !important;
}

/* ── Responsivo ──────────────────────────────────────────── */
@media (max-width: 480px) {
	#fwl-overlay { align-items: flex-end !important; padding: 0 !important; }
	#fwl-overlay .fwl-modal {
		max-width: none !important;
		border-radius: 20px 20px 0 0 !important;
		padding: 28px 20px calc(20px + env(safe-area-inset-bottom)) !important;
		animation-name: fwl-sheet-up;
	}
	#fwl-floating-btn { width: 56px !important; height: 56px !important; bottom: 18px !important; }
	#fwl-floating-btn.fwl-pos-right { right: 16px !important; }
	#fwl-floating-btn.fwl-pos-left  { left: 16px !important; }
	#fwl-bubble { bottom: 88px !important; width: 280px !important; }
	#fwl-bubble.fwl-pos-right { right: 16px !important; }
	#fwl-bubble.fwl-pos-left  { left: 16px !important; }
}
@keyframes fwl-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
	#fwl-floating-btn::before, #fwl-bubble .fwl-typing i { animation: none !important; }
	#fwl-overlay, #fwl-overlay .fwl-modal { animation: none !important; }
}
#fwl-bubble .fwl-bubble-who small:empty { display: none !important; }

/* Texto só para leitor de tela (nome acessível do botão flutuante) */
#fwl-floating-btn .fwl-sr {
	position: absolute !important; width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: -1px !important; overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important;
	white-space: nowrap !important; border: 0 !important;
}

/* Pergunta de qualificação (v1.11.0) */
#fwl-overlay fieldset.fwl-question { border: 0 !important; margin: 0 0 14px !important; padding: 0 !important; min-width: 0 !important; background: none !important; }
#fwl-overlay .fwl-question legend {
	display: block !important; float: none !important; width: 100% !important; padding: 0 !important;
	font-size: 13px !important; font-weight: 600 !important; line-height: 1.3 !important;
	color: #3b4a54 !important; margin: 0 0 8px !important; border: 0 !important;
}
#fwl-overlay .fwl-q-options { display: grid !important; gap: 8px !important; }
#fwl-overlay .fwl-question label.fwl-q-option {
	display: flex !important; align-items: center !important; gap: 10px !important;
	margin: 0 !important; padding: 11px 14px !important; min-height: 48px !important;
	border: 1.5px solid #d6dbdf !important; border-radius: 12px !important; background: #fff !important;
	font-size: 15px !important; font-weight: 500 !important; line-height: 1.3 !important; color: #111b21 !important;
	cursor: pointer !important; transition: border-color .2s, box-shadow .2s !important;
}
#fwl-overlay .fwl-question label.fwl-q-option input[type="radio"] {
	display: inline-block !important; flex: 0 0 auto !important; width: 18px !important; height: 18px !important;
	margin: 0 !important; padding: 0 !important; line-height: normal !important; border: 0 !important;
	box-shadow: none !important; accent-color: var(--fwl-brand, #128C7E) !important; cursor: pointer !important;
}
#fwl-overlay .fwl-question label.fwl-q-option:has(input:checked) {
	border-color: var(--fwl-brand, #128C7E) !important;
	box-shadow: 0 0 0 3px rgba(0,0,0,.06) !important;
}
#fwl-overlay .fwl-question label.fwl-q-option:focus-within { outline: 2px solid var(--fwl-brand, #128C7E) !important; outline-offset: 2px !important; }
#fwl-overlay .fwl-question.fwl-invalid label.fwl-q-option { border-color: #e53935 !important; }
