/* North Star — Widget WhatsApp + Kommo */

/* !important nas propriedades de layout: temas costumam resetar <button> */
.nsk-fab {
	position: fixed !important;
	right: 22px;
	/* respeita a barra de gestos do iPhone */
	bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;
	z-index: 99998 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 10px !important;
	background: #25d366;
	color: #fff;
	border: none !important;
	border-radius: 40px !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 14px 20px 14px 16px !important;
	font: 600 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
	text-transform: none !important;
	cursor: pointer !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nsk-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important; }
.nsk-fab svg { width: 26px !important; height: 26px !important; flex: none !important; }
.nsk-fab-label { white-space: nowrap; }

@media (max-width: 520px) {
	.nsk-fab { padding: 14px; right: 16px; }
	.nsk-fab-label { display: none; }
}

/* Overlay: apenas captura o clique fora para fechar (sem escurecer a tela) */
.nsk-overlay {
	position: fixed !important;
	inset: 0 !important;
	z-index: 99999 !important;
	display: none;
	background: transparent;
}
.nsk-overlay.nsk-open { display: block; }

/* Formulário ancorado no canto, como extensão do botão */
.nsk-modal {
	position: fixed !important;
	right: 22px;
	bottom: calc(94px + env(safe-area-inset-bottom, 0px));
	width: 370px;
	max-width: calc(100vw - 44px);
	box-sizing: border-box;
	background: #f3ece5;
	border-radius: 14px !important;
	padding: 24px 22px 20px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	/* dvh evita que a barra de endereço do mobile corte o modal */
	max-height: calc(100vh - 130px);
	max-height: calc(100dvh - 130px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	transform-origin: bottom right;
	animation: nsk-pop 0.16s ease-out;
}
.nsk-modal.nsk-left {
	right: auto;
	left: 22px;
	transform-origin: bottom left;
}
/* Usado só no preview do painel: volta a fluir na página */
.nsk-modal.nsk-preview-static {
	position: static !important;
	max-width: 380px;
	max-height: none;
	animation: none;
	box-shadow: none;
}
@keyframes nsk-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}
.nsk-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #8a8078;
	cursor: pointer;
}
.nsk-close:hover { color: #4a4038; }

@media (max-width: 520px) {
	.nsk-modal {
		right: 10px;
		left: 10px;
		width: auto;
		max-width: none;
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
		max-height: calc(100vh - 100px);
		max-height: calc(100dvh - 100px);
	}
	.nsk-modal.nsk-left { left: 10px; right: 10px; }
	body.nsk-locked { overflow: hidden; }
}
.nsk-modal h3 {
	margin: 0 0 18px;
	font-size: 20px;
	color: #2b2b2b;
}
.nsk-field { margin-bottom: 14px; }
.nsk-field label {
	display: block;
	font-size: 13px;
	color: #4a4a4a;
	margin-bottom: 6px;
}
.nsk-field input,
.nsk-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #d6ccc0;
	border-radius: 6px;
	/* 16px é obrigatório: abaixo disso o iOS dá zoom ao focar */
	font-size: 16px;
	background: #fff;
	color: #222;
	appearance: none;
	-webkit-appearance: none;
}
.nsk-field select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px;
	padding-right: 38px;
}
.nsk-field input:focus,
.nsk-field select:focus {
	outline: none;
	border-color: #25d366;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}
.nsk-hp { position: absolute; left: -9999px; top: -9999px; }

.nsk-submit {
	width: 100%;
	margin-top: 6px;
	padding: 14px;
	background: #25d366;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}
.nsk-submit:hover { background: #1fbb59; }
.nsk-submit:disabled { opacity: 0.6; cursor: default; }

.nsk-error {
	color: #c0392b;
	font-size: 13px;
	margin: 4px 0 10px;
	display: none;
}
.nsk-error.nsk-show { display: block; }
.nsk-field textarea{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #d6ccc0;border-radius:6px;font-size:16px;background:#fff;color:#222;font-family:inherit;resize:vertical;}
.nsk-field textarea:focus{outline:none;border-color:#25d366;box-shadow:0 0 0 3px rgba(37,211,102,.18);}
