/* isaHub Core · botão flutuante de WhatsApp */
.ih-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;
}
.ih-wa--esq { right: auto; left: var(--wa-dist); align-items: flex-start; }
.ih-wa *, .ih-wa *::before, .ih-wa *::after { box-sizing: border-box; }
.ih-wa > * { pointer-events: auto; }
.ih-wa [hidden] { display: none !important; }
.ih-wa svg { display: block; }

/* Botão */
.ih-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;
}
.ih-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); }
.ih-wa-botao:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--wa-cor); }
.ih-wa-botao-ico { position: relative; display: grid; place-items: center; flex: 0 0 var(--wa-tam); width: var(--wa-tam); height: var(--wa-tam); }
.ih-wa-botao-ico svg { position: absolute; width: 56%; height: 56%; transition: transform .25s ease, opacity .2s ease; }
.ih-wa-botao-ico .ih-wa-x { width: 40%; height: 40%; opacity: 0; transform: rotate(-90deg) scale(.6); }
.ih-wa.is-aberto .ih-wa-botao-ico svg:first-child { opacity: 0; transform: rotate(90deg) scale(.6); }
.ih-wa.is-aberto .ih-wa-botao-ico .ih-wa-x { opacity: 1; transform: none; }
.ih-wa--rotulo .ih-wa-botao { padding-right: 22px; }
.ih-wa--esq.ih-wa--rotulo .ih-wa-botao { padding-right: 22px; }
.ih-wa--rotulo .ih-wa-botao-ico { margin-right: -8px; }
.ih-wa-botao-txt { white-space: nowrap; font-size: 15px; letter-spacing: .01em; }
.ih-wa.is-aberto.ih-wa--rotulo .ih-wa-botao-txt { display: none; }
.ih-wa.is-aberto.ih-wa--rotulo .ih-wa-botao { padding-right: 0; }
.ih-wa.is-aberto.ih-wa--rotulo .ih-wa-botao-ico { margin-right: 0; }

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

.ih-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;
}
.ih-wa--esq .ih-wa-badge { right: auto; left: calc(var(--wa-tam) - 22px); }

/* Balão de saudação */
.ih-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: ih-wa-entra .35s cubic-bezier(.2, .9, .3, 1.2);
	transform-origin: bottom right;
}
.ih-wa--esq .ih-wa-balao { border-radius: 16px 16px 16px 4px; transform-origin: bottom left; }
.ih-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;
}
.ih-wa-balao-x:hover { background: #f0f2f5; color: #111b21; }
@keyframes ih-wa-entra { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }

/* Janela */
.ih-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: ih-wa-abre .28s cubic-bezier(.2, .9, .3, 1.1);
}
.ih-wa--esq .ih-wa-janela { transform-origin: bottom left; }
@keyframes ih-wa-abre { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

.ih-wa-topo { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; background: var(--wa-topo); color: #fff; }
.ih-wa-topo-foto, .ih-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;
}
.ih-wa-topo-foto img, .ih-wa-pessoa-foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.ih-wa-topo-foto i, .ih-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; }
.ih-wa-pessoa-foto i { border-color: #fff; }
.ih-wa-topo-foto i.is-on, .ih-wa-pessoa-foto i.is-on { background: #25d366; }
.ih-wa-topo-txt { flex: 1; min-width: 0; }
.ih-wa-topo-txt strong { display: block; font-size: 16.5px; line-height: 1.25; font-weight: 700; color: #fff; }
.ih-wa-topo-txt small { display: block; font-size: 13px; color: rgba(255, 255, 255, .8); }
.ih-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; }
.ih-wa-fechar svg { width: 20px; height: 20px; }
.ih-wa-fechar:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.ih-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;
}
.ih-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: ih-wa-entra .4s ease .1s both;
}
.ih-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; }
.ih-wa-msg time { position: absolute; right: 9px; bottom: 4px; font-size: 11px; color: #667781; }

.ih-wa-form { margin: 0 0 6px; padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.ih-wa-form-tit { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: #3b4a54; }
.ih-wa-form label { display: block; margin: 0 0 8px; }
.ih-wa-form label span { display: block; margin: 0 0 3px; font-size: 12px; font-weight: 600; color: #54656f; }
.ih-wa-form input[type=text], .ih-wa-form input[type=tel], .ih-wa-form input[type=email] {
	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;
}
.ih-wa-form input:focus { border-color: var(--wa-cor); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wa-cor) 22%, transparent); }
.ih-wa-form input.is-erro { border-color: #e53935; }
.ih-wa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ih-wa-erro { margin: 2px 0 0; font-size: 13px; color: #c62828; }

.ih-wa-escolha { margin: 4px 2px 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: #54656f; }
.ih-wa-equipe { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ih-wa-equipe li { margin: 0; padding: 0; }
.ih-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;
}
.ih-wa-pessoa:hover { border-color: var(--wa-cor); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(11, 20, 26, .1); }
.ih-wa-pessoa:focus-visible { outline: 2px solid var(--wa-cor); outline-offset: 2px; }
.ih-wa-pessoa-foto { background: #dfe5e7; color: #54656f; }
.ih-wa-pessoa-txt { flex: 1; min-width: 0; }
.ih-wa-pessoa-txt strong { display: block; font-size: 15px; font-weight: 600; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ih-wa-pessoa-txt small { display: block; font-size: 12.5px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ih-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; }
.ih-wa-pessoa-ico svg { width: 20px; height: 20px; }
.ih-wa-pessoa.is-carregando { opacity: .6; pointer-events: none; }

.ih-wa-rodape { padding: 12px 16px 4px; background: #fff; }
.ih-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;
}
.ih-wa-iniciar svg { width: 21px; height: 21px; }
.ih-wa-iniciar:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ih-wa-iniciar:disabled { opacity: .65; cursor: wait; transform: none; }
.ih-wa-marca { margin: 0; padding: 8px 16px 11px; background: #fff; font-size: 11.5px; text-align: center; color: #8696a0; }

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

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

/* Captura de leads (1.7.0) */
.ih-wa--sem-botao .ih-wa-botao, .ih-wa--sem-botao .ih-wa-balao { display: none !important; }
.ih-wa-janela.tem-equipe .ih-wa-rodape { display: none; }
.ih-wa.is-link .ih-wa-escolha, .ih-wa.is-link .ih-wa-equipe,
.ih-wa.is-direto .ih-wa-escolha, .ih-wa.is-direto .ih-wa-equipe { display: none; }
.ih-wa.is-link .ih-wa-janela .ih-wa-rodape, .ih-wa.is-direto .ih-wa-janela .ih-wa-rodape { display: block; }
.ih-wa.is-conhecido .ih-wa-form { display: none; }
.ih-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); }
.ih-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; }
.ih-wa-destino { margin: 0 0 12px; font-size: 13px; color: #54656f; }

/* Painel › WhatsApp: configuração, prévia e equipe ------------------------- */
.ih-wa-config { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.ih-wa-previa-box { position: sticky; top: 20px; }
.ih-wa-previa { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 560px; padding: 70px 14px 14px; overflow: hidden; border-radius: var(--ih-raio, 14px); border: 1px solid var(--ih-borda, #e4e7ec); background: linear-gradient(180deg, #f7f8fa, #eceff3); }
.ih-wa-previa-tela { position: absolute; inset: 0; padding: 18px; display: grid; gap: 10px; align-content: start; opacity: .7; }
.ih-wa-previa-tela span { display: block; height: 70px; border-radius: 10px; background: #fff; }
.ih-wa-previa-tela span:first-child { height: 26px; width: 55%; }
.ih-wa-previa .ih-wa { font-size: 14px; }
.ih-wa-previa .ih-wa-janela { width: calc(100% - 28px); max-width: 320px; }
.ih-wa-ats { display: grid; gap: 10px; margin-bottom: 10px; }
.ih-wa-at { display: grid; grid-template-columns: 92px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) 36px; gap: 10px; align-items: end; padding: 10px; border: 1px solid var(--ih-borda, #e4e7ec); border-radius: 12px; background: #fff; }
.ih-wa-at label { display: block; margin: 0; }
.ih-wa-at input[type=text], .ih-wa-at input[type=tel] { width: 100%; }
.ih-wa-at-foto { padding: 6px; }
.ih-wa-at-foto .ih-image-preview { min-height: 0; height: 60px; width: 60px; margin: 0 auto 6px; border-radius: 50%; }
.ih-wa-at-foto .ih-image-preview img { width: 60px; height: 60px; object-fit: cover; border-radius: 50%; }
.ih-wa-at-foto .ih-image-preview .dashicons { font-size: 28px; width: 28px; height: 28px; }
.ih-wa-at-foto .ih-image-actions { justify-content: center; flex-wrap: wrap; gap: 4px; }
.ih-wa-at-foto .button { padding: 2px 8px; font-size: 12px; }
@media (max-width: 1100px) {
	.ih-wa-config { grid-template-columns: 1fr; }
	.ih-wa-previa-box { position: static; max-width: 380px; }
}
@media (max-width: 700px) {
	.ih-wa-at { grid-template-columns: 1fr 36px; }
	.ih-wa-at-foto { grid-column: 1 / -1; }
}
