#nmcw-widget {
	--nmcw-color: #25D366;
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#nmcw-toggle-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--nmcw-color);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
	overflow: hidden;
	animation: nmcw-pulse 2.2s infinite;
}

#nmcw-toggle-btn:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#nmcw-toggle-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#nmcw-toggle-btn svg {
	width: 28px;
	height: 28px;
	color: #fff;
}

@keyframes nmcw-pulse {
	0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.25); }
	70% { box-shadow: 0 0 0 12px rgba(0, 0, 0, 0), 0 4px 16px rgba(0, 0, 0, 0.25); }
	100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0), 0 4px 16px rgba(0, 0, 0, 0.25); }
}

.nmcw-tooltip {
	position: absolute;
	bottom: 68px;
	right: 0;
	background: #fff;
	color: #222;
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 13px;
	white-space: nowrap;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
	animation: nmcw-fade-in 0.4s ease 1s both;
}

.nmcw-tooltip::after {
	content: "";
	position: absolute;
	bottom: -6px;
	right: 22px;
	width: 12px;
	height: 12px;
	background: #fff;
	transform: rotate(45deg);
}

@keyframes nmcw-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}


/* ==================================================================
 * Panel: compact, always fits in the viewport, theme-proof.
 * Selectors are prefixed with #nmcw-widget / .nmcw-inline so that
 * theme rules for button / input / textarea do not inflate the form.
 * ================================================================*/
#nmcw-panel {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 340px;
	max-width: calc(100vw - 40px);
	/* never taller than the space above the round button */
	max-height: calc(100vh - 110px);
	max-height: calc(100dvh - 110px);
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #222;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	transform-origin: bottom right;
	transition: transform 0.2s ease, opacity 0.2s ease;
	font-size: 13px;
	line-height: 1.35;
}

#nmcw-panel.nmcw-hidden {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
	visibility: hidden;
}

#nmcw-widget .nmcw-panel-header {
	flex: 0 0 auto;
	background: var(--nmcw-color);
	color: #fff;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
}

#nmcw-widget .nmcw-panel-header span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#nmcw-widget #nmcw-close-btn {
	background: none;
	border: none;
	box-shadow: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	min-height: 0;
	margin: 0;
	padding: 0 2px;
	cursor: pointer;
	opacity: 0.85;
	text-transform: none;
}

#nmcw-widget #nmcw-close-btn:hover {
	opacity: 1;
}

/* the body scrolls if the screen is really small (short laptop, phone landscape) */
#nmcw-widget .nmcw-panel-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 12px 14px 14px;
}

/* ---------- buttons (call / WhatsApp / Viber / send) ---------- */
#nmcw-widget .nmcw-call-btn,
.nmcw-inline .nmcw-call-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	background: var(--nmcw-color);
	color: #fff;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	padding: 9px 10px;
	border: none;
	border-radius: 8px;
	box-shadow: none;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	box-sizing: border-box;
	cursor: pointer;
	white-space: nowrap;
}

#nmcw-widget .nmcw-call-btn:hover,
.nmcw-inline .nmcw-call-btn:hover {
	filter: brightness(0.95);
	color: #fff;
}

.nmcw-call-btn svg {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

#nmcw-widget .nmcw-whatsapp-btn,
.nmcw-inline .nmcw-whatsapp-btn {
	background: #25D366;
}

#nmcw-widget .nmcw-viber-btn,
.nmcw-inline .nmcw-viber-btn {
	background: #7360F2;
}

/* quick contact row: call on its own line, WhatsApp + Viber side by side */
.nmcw-quick,
.nmcw-via {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.nmcw-quick .nmcw-call-btn:first-child:not(.nmcw-whatsapp-btn):not(.nmcw-viber-btn) {
	flex: 1 1 100%;
}

.nmcw-quick .nmcw-whatsapp-btn,
.nmcw-quick .nmcw-viber-btn,
.nmcw-via .nmcw-call-btn {
	flex: 1 1 110px;
	width: auto;
}

/* ---------- divider ---------- */
.nmcw-divider {
	display: flex;
	align-items: center;
	text-align: center;
	color: #888;
	font-size: 11.5px;
	line-height: 1.2;
	margin: 10px 0 8px;
}

.nmcw-divider::before,
.nmcw-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e6e6e6;
}

.nmcw-divider span {
	padding: 0 8px;
}

/* ---------- form ---------- */
.nmcw-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
}

.nmcw-row {
	display: flex;
	gap: 6px;
}

.nmcw-row input {
	flex: 1 1 0;
	min-width: 0;
}

#nmcw-widget .nmcw-form input,
#nmcw-widget .nmcw-form textarea,
.nmcw-inline .nmcw-form input,
.nmcw-inline .nmcw-form textarea {
	display: block;
	width: 100%;
	height: auto;
	min-height: 0;
	max-width: 100%;
	margin: 0;
	box-sizing: border-box;
	padding: 8px 10px;
	background: #fff;
	color: #222;
	border: 1px solid #d5d5d5;
	border-radius: 7px;
	box-shadow: none;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

#nmcw-widget .nmcw-form textarea,
.nmcw-inline .nmcw-form textarea {
	height: 64px;
	min-height: 64px;
	resize: vertical;
}

#nmcw-widget .nmcw-form input:focus,
#nmcw-widget .nmcw-form textarea:focus,
.nmcw-inline .nmcw-form input:focus,
.nmcw-inline .nmcw-form textarea:focus {
	outline: none;
	border-color: var(--nmcw-color);
	box-shadow: none;
}

#nmcw-widget .nmcw-submit-btn,
.nmcw-inline .nmcw-submit-btn {
	display: block;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	background: var(--nmcw-color);
	color: #fff;
	border: none;
	border-radius: 8px;
	box-shadow: none;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}

#nmcw-widget .nmcw-submit-btn:hover,
.nmcw-inline .nmcw-submit-btn:hover {
	filter: brightness(0.95);
	color: #fff;
}

.nmcw-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.nmcw-form-status {
	font-size: 12px;
	line-height: 1.3;
	min-height: 0;
}

.nmcw-form-status:empty {
	display: none;
}

.nmcw-form-status.nmcw-success { color: #1a7f37; }
.nmcw-form-status.nmcw-error { color: #c0392b; }

@media (max-width: 480px) {
	#nmcw-widget {
		bottom: 14px;
		right: 14px;
	}
	#nmcw-panel {
		width: calc(100vw - 28px);
		right: -6px;
		bottom: 70px;
		max-height: calc(100vh - 96px);
		max-height: calc(100dvh - 96px);
	}
	.nmcw-tooltip {
		display: none;
	}
}

/* ------------------------------------------------------------------
 * Inline form: [contactneo_form] shortcode & "below every post" mode
 * ----------------------------------------------------------------*/
.nmcw-inline {
	--nmcw-color: #25D366;
	box-sizing: border-box;
	max-width: 560px;
	width: 100%;
	margin: 40px auto 0;
	padding: 24px;
	background: #fff;
	color: #222;
	border: 1px solid #e5e5e5;
	border-top: 4px solid var(--nmcw-color);
	border-radius: 12px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.nmcw-inline .nmcw-inline-title {
	margin: 0 0 16px;
	font-size: 20px;
	line-height: 1.3;
	color: #222;
}

.nmcw-inline .nmcw-form {
	gap: 10px;
}

.nmcw-inline .nmcw-row {
	gap: 10px;
}

.nmcw-inline .nmcw-form input,
.nmcw-inline .nmcw-form textarea {
	font-size: 15px;
	padding: 11px 13px;
}

.nmcw-inline .nmcw-form textarea {
	height: 110px;
	min-height: 110px;
}

.nmcw-inline .nmcw-submit-btn,
.nmcw-inline .nmcw-call-btn {
	padding: 12px 16px;
	font-size: 15px;
}

@media (max-width: 480px) {
	.nmcw-inline {
		padding: 18px;
		margin-top: 28px;
	}
	.nmcw-inline .nmcw-row {
		flex-direction: column;
	}
}

/* honeypot field: invisible to people, tempting to bots */
#nmcw-widget .nmcw-form input.nmcw-hp,
.nmcw-inline .nmcw-form input.nmcw-hp,
.nmcw-form input.nmcw-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
}
