.jp-whatsapp-chatbot,
.jp-whatsapp-chatbot * {
	box-sizing: border-box;
}

html.jp-whatsapp-chatbot-lock,
body.jp-whatsapp-chatbot-lock {
	overflow: hidden !important;
	overscroll-behavior: none;
	touch-action: none;
}

.jp-whatsapp-chatbot {
	--jp-wa-green: #25d366;
	--jp-wa-dark: #075e54;
	--jp-wa-deep: #064c45;
	--jp-wa-soft: #dcf8c6;
	--jp-wa-ink: #13201d;
	--jp-wa-muted: #667781;
	--jp-wa-line: #e6ebe8;
	font-family: Poppins, Rubik, Arial, sans-serif;
	position: fixed;
	right: max(18px, env(safe-area-inset-right));
	bottom: max(18px, env(safe-area-inset-bottom));
	z-index: 99999;
	color: var(--jp-wa-ink);
}

.jp-whatsapp-float {
	position: relative;
	display: inline-flex;
	width: 64px;
	height: 64px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--jp-wa-green), #11b957);
	color: #fff;
	box-shadow: 0 18px 35px rgba(7, 94, 84, 0.28);
	cursor: pointer;
	transition: transform .22s ease, box-shadow .22s ease;
}

.jp-whatsapp-float:hover,
.jp-whatsapp-float:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 22px 44px rgba(7, 94, 84, 0.36);
}

.jp-whatsapp-float i {
	position: relative;
	z-index: 2;
	font-size: 34px;
	line-height: 1;
}

.jp-whatsapp-float__pulse {
	position: absolute;
	inset: -8px;
	border-radius: inherit;
	background: rgba(37, 211, 102, 0.22);
	animation: jpWhatsappPulse 1.8s ease-out infinite;
}

.jp-whatsapp-panel {
	position: absolute;
	right: 0;
	bottom: 82px;
	display: flex;
	width: min(392px, calc(100vw - 24px));
	max-height: min(720px, calc(100vh - 110px));
	overflow: hidden;
	flex-direction: column;
	border: 1px solid rgba(7, 94, 84, 0.14);
	border-radius: 22px;
	background: #f7faf8;
	box-shadow: 0 24px 70px rgba(9, 30, 28, 0.24);
	transform-origin: right bottom;
	animation: jpWhatsappPanelIn .2s ease-out;
}

.jp-whatsapp-panel[hidden] {
	display: none;
}

.jp-whatsapp-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 18px 16px;
	background: linear-gradient(135deg, var(--jp-wa-dark), #128c7e);
	color: #fff;
}

.jp-whatsapp-panel__header p {
	margin: 0;
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
}

.jp-whatsapp-panel__header span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 4px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
}

.jp-whatsapp-panel__header span i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--jp-wa-green);
	box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.18);
}

.jp-whatsapp-close {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}

.jp-whatsapp-close:hover,
.jp-whatsapp-close:focus-visible {
	background: rgba(255, 255, 255, 0.24);
	transform: rotate(90deg);
}

.jp-whatsapp-messages {
	display: flex;
	min-height: 230px;
	overflow-y: auto;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	background:
		radial-gradient(circle at 18px 18px, rgba(7, 94, 84, 0.05) 0 2px, transparent 3px),
		#eef5f1;
	background-size: 24px 24px;
	scroll-behavior: smooth;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.jp-whatsapp-message {
	display: flex;
	max-width: 86%;
	flex-direction: column;
	gap: 4px;
	animation: jpWhatsappMessageIn .18s ease-out;
}

.jp-whatsapp-message--user {
	align-self: flex-end;
}

.jp-whatsapp-message--bot {
	align-self: flex-start;
}

.jp-whatsapp-message__name {
	padding: 0 4px;
	color: var(--jp-wa-muted);
	font-size: 11px;
	font-weight: 600;
}

.jp-whatsapp-message__bubble {
	position: relative;
	overflow-wrap: anywhere;
	border-radius: 16px;
	padding: 11px 13px;
	background: #fff;
	color: var(--jp-wa-ink);
	box-shadow: 0 8px 18px rgba(9, 30, 28, 0.08);
	font-size: 13px;
	line-height: 1.48;
	white-space: pre-wrap;
	user-select: text;
}

.jp-whatsapp-message__bubble a {
	color: #027eb5;
	font-weight: 600;
	text-decoration: underline;
}

.jp-whatsapp-message--user .jp-whatsapp-message__bubble {
	background: var(--jp-wa-soft);
}

.jp-whatsapp-typing {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 54px;
}

.jp-whatsapp-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #91a39c;
	animation: jpWhatsappTyping 1s ease-in-out infinite;
}

.jp-whatsapp-typing span:nth-child(2) {
	animation-delay: .12s;
}

.jp-whatsapp-typing span:nth-child(3) {
	animation-delay: .24s;
}

.jp-whatsapp-quick {
	border-top: 1px solid var(--jp-wa-line);
	padding: 11px 14px 14px;
	background: #fff;
	overscroll-behavior: contain;
}

.jp-whatsapp-quick__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 9px;
}

.jp-whatsapp-quick__heading p {
	margin: 0;
	color: #40544e;
	font-size: 12px;
	font-weight: 700;
}

.jp-whatsapp-quick__heading button {
	min-height: 0;
	border: 0;
	border-radius: 0;
	padding: 0;
	background: transparent;
	color: var(--jp-wa-dark);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-align: right;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.jp-whatsapp-quick__items {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.jp-whatsapp-quick button {
	min-height: 40px;
	border: 1px solid var(--jp-wa-line);
	border-radius: 12px;
	padding: 8px 10px;
	background: #f9fbfa;
	color: #213a34;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
	transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.jp-whatsapp-quick button:hover,
.jp-whatsapp-quick button:focus-visible {
	border-color: rgba(37, 211, 102, 0.55);
	background: rgba(37, 211, 102, 0.1);
	color: var(--jp-wa-deep);
}

.jp-whatsapp-quick .jp-whatsapp-quick__heading button {
	min-height: 0;
	border: 0;
	border-radius: 0;
	padding: 0;
	background: transparent;
	color: var(--jp-wa-dark);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-align: right;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.jp-whatsapp-quick .jp-whatsapp-quick__heading button:hover,
.jp-whatsapp-quick .jp-whatsapp-quick__heading button:focus-visible {
	background: transparent;
	color: var(--jp-wa-deep);
}

.jp-whatsapp-form {
	display: flex;
	align-items: flex-end;
	gap: 9px;
	border-top: 1px solid var(--jp-wa-line);
	padding: 12px 14px;
	background: #fff;
}

.jp-whatsapp-form textarea {
	width: 100%;
	max-height: 110px;
	min-height: 44px;
	resize: none;
	border: 1px solid var(--jp-wa-line);
	border-radius: 16px;
	padding: 12px 14px;
	background: #f8faf9;
	color: var(--jp-wa-ink);
	font: 500 13px/1.45 Poppins, Rubik, Arial, sans-serif;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.jp-whatsapp-form textarea:focus {
	border-color: rgba(37, 211, 102, 0.72);
	box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.13);
}

.jp-whatsapp-send {
	display: inline-flex;
	width: 46px;
	height: 44px;
	flex: 0 0 46px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 15px;
	background: var(--jp-wa-green);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(37, 211, 102, 0.3);
	transition: transform .2s ease, background .2s ease;
}

.jp-whatsapp-send:hover,
.jp-whatsapp-send:focus-visible {
	background: #18bd5b;
	transform: translateY(-2px);
}

.jp-whatsapp-panel__footer {
	border-top: 1px solid var(--jp-wa-line);
	padding: 12px 14px;
	background: #fff;
}

.jp-whatsapp-continue {
	display: inline-flex;
	width: 100%;
	min-height: 45px;
	align-items: center;
	justify-content: center;
	gap: 9px;
	border-radius: 14px;
	background: var(--jp-wa-dark);
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background .2s ease, transform .2s ease;
}

.jp-whatsapp-continue:hover,
.jp-whatsapp-continue:focus-visible {
	background: var(--jp-wa-deep);
	color: #fff !important;
	transform: translateY(-1px);
}

@keyframes jpWhatsappPulse {
	0% {
		opacity: .8;
		transform: scale(.86);
	}
	100% {
		opacity: 0;
		transform: scale(1.2);
	}
}

@keyframes jpWhatsappPanelIn {
	from {
		opacity: 0;
		transform: translateY(12px) scale(.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes jpWhatsappMessageIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes jpWhatsappTyping {
	0%,
	80%,
	100% {
		opacity: .35;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-4px);
	}
}

@media (max-width: 480px) {
	.jp-whatsapp-chatbot {
		right: 12px;
		bottom: 12px;
		left: 12px;
	}

	.jp-whatsapp-float {
		width: 58px;
		height: 58px;
		margin-left: auto;
	}

	.jp-whatsapp-panel {
		right: 0;
		bottom: 70px;
		width: 100%;
		height: min(640px, calc(100dvh - 116px));
		max-height: 78dvh;
		border-radius: 16px;
	}

	@supports not (height: 100dvh) {
		.jp-whatsapp-panel {
			height: min(640px, calc(100vh - 116px));
			max-height: 78vh;
		}
	}

	.jp-whatsapp-messages {
		min-height: 128px;
		padding: 12px;
		gap: 9px;
	}

	.jp-whatsapp-message {
		max-width: 92%;
	}

	.jp-whatsapp-quick__items {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.jp-whatsapp-panel__header {
		padding: 13px 14px 12px;
	}

	.jp-whatsapp-panel__header p {
		font-size: 15px;
	}

	.jp-whatsapp-panel__header span {
		font-size: 11px;
	}

	.jp-whatsapp-close {
		width: 34px;
		height: 34px;
	}

	.jp-whatsapp-form {
		gap: 7px;
		padding: 9px 10px;
	}

	.jp-whatsapp-form textarea {
		min-height: 39px;
		max-height: 82px;
		border-radius: 13px;
		padding: 10px 12px;
		font-size: 12px;
	}

	.jp-whatsapp-send {
		width: 41px;
		height: 39px;
		flex-basis: 41px;
		border-radius: 13px;
	}

	.jp-whatsapp-panel__footer {
		padding: 9px 10px;
	}

	.jp-whatsapp-continue {
		min-height: 40px;
		border-radius: 12px;
		font-size: 12px;
	}

	.jp-whatsapp-quick {
		max-height: 174px;
		overflow-y: auto;
		padding: 9px 10px 10px;
		-webkit-overflow-scrolling: touch;
	}

	.jp-whatsapp-quick__heading {
		margin-bottom: 7px;
	}

	.jp-whatsapp-quick button {
		min-height: 34px;
		border-radius: 10px;
		padding: 7px 9px;
		font-size: 11px;
	}
}

@media (max-width: 380px), (max-height: 680px) {
	.jp-whatsapp-panel {
		height: min(560px, calc(100dvh - 106px));
		max-height: 74dvh;
	}

	@supports not (height: 100dvh) {
		.jp-whatsapp-panel {
			height: min(560px, calc(100vh - 106px));
			max-height: 74vh;
		}
	}

	.jp-whatsapp-quick {
		max-height: 132px;
	}

	.jp-whatsapp-message__bubble {
		padding: 9px 11px;
		font-size: 12px;
	}
}
