/* isaHub CRM · botão flutuante de WhatsApp */
.ihc-wa {
	--wa-cor: #25d366;
	--wa-topo: #1b3363;
	--wa-dist: 20px;
	--wa-tam: 60px;
	position: fixed;
	z-index: 99990;
	bottom: calc(var(--wa-dist) + env(safe-area-inset-bottom, 0px));
	right: var(--wa-dist);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #111b21;
	-webkit-font-smoothing: antialiased;
	pointer-events: none;
}
.ihc-wa--esq { right: auto; left: var(--wa-dist); align-items: flex-start; }
.ihc-wa *, .ihc-wa *::before, .ihc-wa *::after { box-sizing: border-box; }
.ihc-wa > * { pointer-events: auto; }
.ihc-wa [hidden] { display: none !important; }
.ihc-wa svg { display: block; }

/* Botão */
.ihc-wa-botao {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: var(--wa-tam);
	min-width: var(--wa-tam);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--wa-cor);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .22), 0 2px 5px rgba(0, 0, 0, .12);
	transition: transform .2s ease, box-shadow .2s ease, filter .2s;
	-webkit-tap-highlight-color: transparent;
}
.ihc-wa-botao:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .26), 0 3px 6px rgba(0, 0, 0, .14); filter: brightness(1.04); }
.ihc-wa-botao:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--wa-cor); }
.ihc-wa-botao-ico { position: relative; display: grid; place-items: center; flex: 0 0 var(--wa-tam); width: var(--wa-tam); height: var(--wa-tam); }
.ihc-wa-botao-ico svg { position: absolute; width: 56%; height: 56%; transition: transform .25s ease, opacity .2s ease; }
.ihc-wa-botao-ico .ihc-wa-x { width: 40%; height: 40%; opacity: 0; transform: rotate(-90deg) scale(.6); }
.ihc-wa.is-aberto .ihc-wa-botao-ico svg:first-child { opacity: 0; transform: rotate(90deg) scale(.6); }
.ihc-wa.is-aberto .ihc-wa-botao-ico .ihc-wa-x { opacity: 1; transform: none; }
.ihc-wa--rotulo .ihc-wa-botao { padding-right: 22px; }
.ihc-wa--esq.ihc-wa--rotulo .ihc-wa-botao { padding-right: 22px; }
.ihc-wa--rotulo .ihc-wa-botao-ico { margin-right: -8px; }
.ihc-wa-botao-txt { white-space: nowrap; font-size: 15px; letter-spacing: .01em; }
.ihc-wa.is-aberto.ihc-wa--rotulo .ihc-wa-botao-txt { display: none; }
.ihc-wa.is-aberto.ihc-wa--rotulo .ihc-wa-botao { padding-right: 0; }
.ihc-wa.is-aberto.ihc-wa--rotulo .ihc-wa-botao-ico { margin-right: 0; }

.ihc-wa--pulsar .ihc-wa-botao::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--wa-cor);
	z-index: -1;
	animation: ihc-wa-pulso 2.6s ease-out infinite;
}
.ihc-wa.is-aberto .ihc-wa-botao::before, .ihc-wa.is-visto .ihc-wa-botao::before { animation: none; opacity: 0; }
@keyframes ihc-wa-pulso { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.45); opacity: 0; } }

.ihc-wa-badge {
	position: absolute;
	top: -3px;
	right: -3px;
	display: grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border: 2px solid #fff;
	border-radius: 11px;
	background: #e53935;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}
.ihc-wa--esq .ihc-wa-badge { right: auto; left: calc(var(--wa-tam) - 22px); }

/* Balão de saudação */
.ihc-wa-balao {
	position: relative;
	max-width: min(290px, calc(100vw - 2 * var(--wa-dist)));
	padding: 14px 34px 14px 16px;
	border-radius: 16px 16px 4px 16px;
	background: #fff;
	color: #111b21;
	font-size: 14.5px;
	line-height: 1.45;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
	cursor: pointer;
	animation: ihc-wa-entra .35s cubic-bezier(.2, .9, .3, 1.2);
	transform-origin: bottom right;
}
.ihc-wa--esq .ihc-wa-balao { border-radius: 16px 16px 16px 4px; transform-origin: bottom left; }
.ihc-wa-balao-x {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #8696a0;
	font: 400 20px/1 Arial, sans-serif;
	cursor: pointer;
}
.ihc-wa-balao-x:hover { background: #f0f2f5; color: #111b21; }
@keyframes ihc-wa-entra { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }

/* Janela */
.ihc-wa-janela {
	display: flex;
	flex-direction: column;
	width: 360px;
	max-width: calc(100vw - 2 * var(--wa-dist));
	max-height: calc(100vh - var(--wa-tam) - var(--wa-dist) - 40px);
	max-height: calc(100dvh - var(--wa-tam) - var(--wa-dist) - 40px);
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .22), 0 3px 10px rgba(0, 0, 0, .1);
	transform-origin: bottom right;
	animation: ihc-wa-abre .28s cubic-bezier(.2, .9, .3, 1.1);
}
.ihc-wa--esq .ihc-wa-janela { transform-origin: bottom left; }
@keyframes ihc-wa-abre { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

.ihc-wa-topo { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; background: var(--wa-topo); color: #fff; }
.ihc-wa-topo-foto, .ihc-wa-pessoa-foto {
	position: relative;
	display: grid;
	place-items: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
}
.ihc-wa-topo-foto img, .ihc-wa-pessoa-foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.ihc-wa-topo-foto i, .ihc-wa-pessoa-foto i { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border: 2px solid var(--wa-topo); border-radius: 50%; background: #9aa5ad; }
.ihc-wa-pessoa-foto i { border-color: #fff; }
.ihc-wa-topo-foto i.is-on, .ihc-wa-pessoa-foto i.is-on { background: #25d366; }
.ihc-wa-topo-txt { flex: 1; min-width: 0; }
.ihc-wa-topo-txt strong { display: block; font-size: 16.5px; line-height: 1.25; font-weight: 700; color: #fff; }
.ihc-wa-topo-txt small { display: block; font-size: 13px; color: rgba(255, 255, 255, .8); }
.ihc-wa-fechar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .85); cursor: pointer; }
.ihc-wa-fechar svg { width: 20px; height: 20px; }
.ihc-wa-fechar:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.ihc-wa-corpo {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 18px 16px 14px;
	background-color: #efeae2;
	background-image: radial-gradient(rgba(0, 0, 0, .045) 1px, transparent 1.2px);
	background-size: 14px 14px;
	overscroll-behavior: contain;
}
.ihc-wa-msg {
	position: relative;
	max-width: 88%;
	margin: 0 0 14px;
	padding: 9px 12px 20px;
	border-radius: 0 10px 10px 10px;
	background: #fff;
	font-size: 14.5px;
	line-height: 1.45;
	box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
	animation: ihc-wa-entra .4s ease .1s both;
}
.ihc-wa-msg::before { content: ""; position: absolute; top: 0; left: -7px; border-top: 0 solid transparent; border-right: 8px solid #fff; border-bottom: 10px solid transparent; }
.ihc-wa-msg time { position: absolute; right: 9px; bottom: 4px; font-size: 11px; color: #667781; }

.ihc-wa-form { margin: 0 0 6px; padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.ihc-wa-form-tit { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: #3b4a54; }
.ihc-wa-form label { display: block; margin: 0 0 8px; }
.ihc-wa-form label span { display: block; margin: 0 0 3px; font-size: 12px; font-weight: 600; color: #54656f; }
.ihc-wa-form input[type=text], .ihc-wa-form input[type=tel] {
	display: block;
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #d1d7db;
	border-radius: 10px;
	background: #fff;
	color: #111b21;
	font: inherit;
	font-size: 15px;
	box-shadow: none;
	outline: none;
}
.ihc-wa-form input:focus { border-color: var(--wa-cor); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wa-cor) 22%, transparent); }
.ihc-wa-form input.is-erro { border-color: #e53935; }
.ihc-wa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ihc-wa-erro { margin: 2px 0 0; font-size: 13px; color: #c62828; }

.ihc-wa-escolha { margin: 4px 2px 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: #54656f; }
.ihc-wa-equipe { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ihc-wa-equipe li { margin: 0; padding: 0; }
.ihc-wa-pessoa {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ihc-wa-pessoa:hover { border-color: var(--wa-cor); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(11, 20, 26, .1); }
.ihc-wa-pessoa:focus-visible { outline: 2px solid var(--wa-cor); outline-offset: 2px; }
.ihc-wa-pessoa-foto { background: #dfe5e7; color: #54656f; }
.ihc-wa-pessoa-txt { flex: 1; min-width: 0; }
.ihc-wa-pessoa-txt strong { display: block; font-size: 15px; font-weight: 600; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ihc-wa-pessoa-txt small { display: block; font-size: 12.5px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ihc-wa-pessoa-ico { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--wa-cor); color: #fff; }
.ihc-wa-pessoa-ico svg { width: 20px; height: 20px; }
.ihc-wa-pessoa.is-carregando { opacity: .6; pointer-events: none; }

.ihc-wa-rodape { padding: 12px 16px 4px; background: #fff; }
.ihc-wa-iniciar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 12px;
	background: var(--wa-cor);
	color: #fff;
	font: inherit;
	font-size: 15.5px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s, transform .15s;
}
.ihc-wa-iniciar svg { width: 21px; height: 21px; }
.ihc-wa-iniciar:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ihc-wa-iniciar:disabled { opacity: .65; cursor: wait; transform: none; }
.ihc-wa-marca { margin: 0; padding: 8px 16px 11px; background: #fff; font-size: 11.5px; text-align: center; color: #8696a0; }

/* Dispositivos */
@media (max-width: 767px) {
	.ihc-wa--sem-celular { display: none !important; }
	.ihc-wa { --wa-dist: 16px; }
	.ihc-wa--rotulo:not(.ihc-wa--previa) .ihc-wa-botao-txt { display: none; }
	.ihc-wa--rotulo:not(.ihc-wa--previa) .ihc-wa-botao { padding-right: 0; }
	.ihc-wa--rotulo:not(.ihc-wa--previa) .ihc-wa-botao-ico { margin-right: 0; }
	.ihc-wa:not(.ihc-wa--previa) .ihc-wa-janela { width: calc(100vw - 24px); max-width: none; }
	.ihc-wa:not(.ihc-wa--previa).is-aberto { left: 12px; right: 12px; }
	.ihc-wa--dir:not(.ihc-wa--previa).is-aberto { align-items: flex-end; }
	.ihc-wa--esq:not(.ihc-wa--previa).is-aberto { align-items: flex-start; }
}
@media (min-width: 768px) {
	.ihc-wa--sem-computador { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	.ihc-wa *, .ihc-wa *::before { animation: none !important; transition: none !important; }
}
@media print { .ihc-wa { display: none !important; } }

/* Prévia no painel do CRM */
.ihc-wa--previa { position: relative !important; inset: auto !important; z-index: 1; }
.ihc-wa--previa .ihc-wa-janela { width: 320px; max-height: none; animation: none; }
.ihc-wa--previa .ihc-wa-janela[hidden] { display: flex !important; }
.ihc-wa--previa .ihc-wa-msg { animation: none; }
.ihc-wa--previa .ihc-wa-botao::before { animation: none; }

/* Captura de leads (1.7.0) */
.ihc-wa--sem-botao .ihc-wa-botao, .ihc-wa--sem-botao .ihc-wa-balao { display: none !important; }
.ihc-wa-janela.tem-equipe .ihc-wa-rodape { display: none; }
.ihc-wa.is-link .ihc-wa-escolha, .ihc-wa.is-link .ihc-wa-equipe,
.ihc-wa.is-direto .ihc-wa-escolha, .ihc-wa.is-direto .ihc-wa-equipe { display: none; }
.ihc-wa.is-link .ihc-wa-janela .ihc-wa-rodape, .ihc-wa.is-direto .ihc-wa-janela .ihc-wa-rodape { display: block; }
.ihc-wa.is-conhecido .ihc-wa-form { display: none; }
.ihc-wa-conhecido { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff; font-size: 14px; color: #3b4a54; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.ihc-wa-conhecido button { margin: 0 0 0 4px; padding: 0; border: 0; background: none; color: #027eb5; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.ihc-wa-destino { margin: 0 0 12px; font-size: 13px; color: #54656f; }
.ihc-wa-form .ihc-tel-ddi { height: 42px; margin: 0; padding: 0 4px 0 8px; border: 1px solid #d1d7db; border-radius: 10px; background: #fff; color: #111b21; font: inherit; font-size: 14px; }
.ihc-wa-form .ihc-tel-ddi:focus { border-color: var(--wa-cor); outline: none; }
