/*
 * Emidio Pais – WhatsApp Leads
 * Todos os seletores usam #epwl-root para vencer estilos globais do tema/Elementor
 * (ex.: button:hover do Hello Elementor, input[type=text] do kit do Elementor).
 * Identidade do site: azul #193E6F, turquesa #77C4B4, campos e botões em "pílula",
 * fonte de títulos herdada do Elementor (--e-global-typography-primary-font-family).
 */
#epwl-root {
	--epwl-primary: #193e6f;
	--epwl-fab: #25d366;
	--epwl-accent: #77c4b4;
	--epwl-text: #141414;
	--epwl-muted: #4b5563;
	--epwl-danger: #b32d2e;
	--epwl-font-title: var(--e-global-typography-primary-font-family, inherit), system-ui, sans-serif;
	--epwl-font-body: var(--e-global-typography-text-font-family, inherit), system-ui, sans-serif;
	font-family: var(--epwl-font-body);
	font-size: 16px;
	line-height: 1.4;
	color: var(--epwl-text);
}
#epwl-root *,
#epwl-root *::before,
#epwl-root *::after {
	box-sizing: border-box;
}
#epwl-root [hidden] {
	display: none !important;
}

/* ---------------- Botão flutuante ---------------- */
#epwl-root .epwl-fab {
	position: fixed;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--epwl-fab);
	color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, bottom 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}
#epwl-root .epwl-fab.epwl-pos-right { right: calc(20px + env(safe-area-inset-right, 0px)); }
#epwl-root .epwl-fab.epwl-pos-left { left: calc(20px + env(safe-area-inset-left, 0px)); }
#epwl-root .epwl-fab.epwl-stacked { bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
#epwl-root .epwl-fab:hover { background: var(--epwl-fab); color: #fff; transform: scale(1.06); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32); }
#epwl-root .epwl-fab:focus-visible { outline: 3px solid var(--epwl-primary); outline-offset: 3px; }
#epwl-root .epwl-fab svg { display: block; width: 34px; height: 34px; }
#epwl-root .epwl-badge {
	position: absolute;
	top: -10px;
	right: -6px;
	padding: 2px 6px;
	border-radius: 10px;
	background: #f5a623;
	color: #1b1b1b;
	font: 700 10px/1.2 system-ui, sans-serif;
	letter-spacing: 0.04em;
}

/* ---------------- Janela ---------------- */
html.epwl-open { overflow: hidden; }
#epwl-root .epwl-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(10, 22, 40, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}
#epwl-root .epwl-dialog {
	width: 100%;
	max-width: 440px;
	max-height: 100vh;
	max-height: 100dvh;
	overflow: auto;
	background: #fff;
	border-radius: 18px 18px 0 0;
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
	animation: epwl-up 0.22s ease-out;
}
#epwl-root .epwl-head {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 18px 16px 16px 20px;
	background: var(--epwl-primary);
	color: #fff;
}
#epwl-root .epwl-head h2 {
	flex: 1;
	margin: 0;
	padding: 2px 0 0;
	color: #fff;
	font-family: var(--epwl-font-title);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
}
#epwl-root .epwl-close {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: -4px -4px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
#epwl-root .epwl-close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
#epwl-root .epwl-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
#epwl-root .epwl-body { padding: 20px 20px calc(22px + env(safe-area-inset-bottom, 0px)); }

/* ---------------- Formulário ---------------- */
#epwl-root .epwl-form { display: block; margin: 0; padding: 0; }
#epwl-root .epwl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
#epwl-root .epwl-input {
	display: block;
	width: 100%;
	height: 48px;
	margin: 12px 0 0;
	padding: 0 20px;
	border: 1px solid var(--epwl-accent);
	border-radius: 50px;
	background: #fff;
	box-shadow: none;
	color: var(--epwl-text);
	font: inherit;
	font-size: 16px; /* 16px evita o zoom automático no iOS */
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
#epwl-root .epwl-input::placeholder { color: #6b7280; opacity: 1; }
#epwl-root .epwl-input:focus {
	border-color: var(--epwl-primary);
	box-shadow: 0 0 0 3px rgba(25, 62, 111, 0.18);
	outline: none;
}
#epwl-root .epwl-input[aria-invalid="true"] { border-color: var(--epwl-danger); }
#epwl-root .epwl-phone { display: flex; align-items: stretch; margin-top: 12px; }
#epwl-root .epwl-phone .epwl-input { margin: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; flex: 1; min-width: 0; }
#epwl-root .epwl-cc {
	display: flex;
	align-items: center;
	padding: 0 14px 0 18px;
	border: 1px solid var(--epwl-accent);
	border-right: 0;
	border-radius: 50px 0 0 50px;
	background: #f3faf8;
	color: var(--epwl-primary);
	font-size: 15px;
	font-weight: 600;
}
#epwl-root .epwl-err { min-height: 0; margin: 4px 0 0 18px; color: var(--epwl-danger); font-size: 13px; }
#epwl-root .epwl-err:empty { display: none; }

#epwl-root .epwl-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 16px 0 0;
	color: var(--epwl-muted);
	font-size: 13px;
	line-height: 1.45;
	cursor: pointer;
}
#epwl-root .epwl-consent input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--epwl-primary);
}
#epwl-root .epwl-consent a { color: var(--epwl-primary); text-decoration: underline; }

#epwl-root .epwl-general { margin: 12px 0 0; color: var(--epwl-danger); font-size: 14px; }
#epwl-root .epwl-general:empty { display: none; }
#epwl-root .epwl-general a { color: var(--epwl-primary); font-weight: 600; text-decoration: underline; }

#epwl-root .epwl-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin: 18px 0 0;
	padding: 0 24px;
	border: 0;
	border-radius: 50px;
	background: var(--epwl-primary);
	color: #fff;
	font-family: var(--epwl-font-title);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: filter 0.15s;
}
#epwl-root .epwl-submit:hover { background: var(--epwl-primary); color: #fff; filter: brightness(1.12); }
#epwl-root .epwl-submit:focus-visible { outline: 3px solid var(--epwl-accent); outline-offset: 2px; }
#epwl-root .epwl-submit:disabled { opacity: 0.7; cursor: progress; }

/* ---------------- Sucesso ---------------- */
#epwl-root .epwl-success { text-align: center; padding: 4px 0 0; outline: none; }
#epwl-root .epwl-check {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 4px auto 12px;
	border-radius: 50%;
	background: var(--epwl-fab);
	color: #fff;
	font-size: 30px;
	line-height: 1;
}
#epwl-root .epwl-success-title { margin: 0 0 6px; font-family: var(--epwl-font-title); font-size: 18px; font-weight: 600; color: var(--epwl-primary); }
#epwl-root .epwl-success-text { margin: 0; color: var(--epwl-muted); font-size: 14px; }
#epwl-root .epwl-ref { margin: 14px 0 0; color: var(--epwl-muted); font-size: 12px; }
#epwl-root .epwl-ref:empty { display: none; }

/* ---------------- Telas maiores: janela centralizada ---------------- */
@media (min-width: 601px) {
	#epwl-root .epwl-overlay { align-items: center; }
	#epwl-root .epwl-dialog { border-radius: 18px; max-height: calc(100dvh - 48px); }
	#epwl-root .epwl-fab { bottom: 24px; }
	#epwl-root .epwl-fab.epwl-stacked { bottom: 114px; }
}

@keyframes epwl-up {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	#epwl-root .epwl-dialog { animation: none; }
	#epwl-root .epwl-fab { transition: none; }
}
