.vn-chat,
.vn-chat * {
	box-sizing: border-box;
}

.vn-chat {
	--vn-blue: #0b3d75;
	--vn-blue-2: #135fa8;
	--vn-sky: #eaf5fb;
	--vn-ink: #1f2f43;
	--vn-muted: #637187;
	--vn-line: #d9e4ee;
	--vn-white: #fff;
	position: fixed;
	z-index: 999999;
	bottom: max(20px, env(safe-area-inset-bottom));
	font-family: inherit;
	color: var(--vn-ink);
}

.vn-chat--left {
	left: 20px;
}

.vn-chat--right {
	right: 20px;
}

.vn-chat button,
.vn-chat input {
	font: inherit;
}

.vn-chat button {
	-webkit-tap-highlight-color: transparent;
}

.vn-chat .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

#vn-chat .vn-chat__launcher {
	display: flex !important;
	align-items: center;
	gap: 11px;
	min-height: 58px !important;
	padding: 9px 17px 9px 10px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--vn-blue) !important;
	background-color: var(--vn-blue) !important;
	background-image: none !important;
	color: var(--vn-white) !important;
	box-shadow: 0 12px 34px rgb(13 52 91 / 24%);
	cursor: pointer;
	transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

#vn-chat .vn-chat__launcher:hover {
	background: #082f5c !important;
	background-color: #082f5c !important;
	box-shadow: 0 14px 38px rgb(13 52 91 / 30%);
	transform: translateY(-2px);
}

.vn-chat__launcher:focus-visible,
.vn-chat__panel button:focus-visible,
.vn-chat__panel input:focus-visible,
.vn-chat__contact:focus-visible {
	outline: 3px solid #f6a623;
	outline-offset: 2px;
}

.vn-chat__launcher-icon {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	border-radius: 50%;
	background: rgb(255 255 255 / 14%) !important;
	color: var(--vn-white) !important;
}

.vn-chat__launcher-icon svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.vn-chat__launcher-copy {
	display: grid;
	gap: 1px;
	text-align: left;
}

.vn-chat__launcher-copy strong {
	margin: 0 !important;
	color: inherit !important;
	font-size: 14px;
	line-height: 1.25;
}

.vn-chat__launcher-copy small {
	margin: 0 !important;
	color: inherit !important;
	font-size: 11px;
	line-height: 1.3;
	opacity: 0.82;
}

.vn-chat__panel {
	position: absolute;
	bottom: 0;
	width: min(390px, calc(100vw - 40px));
	height: min(680px, calc(100vh - 40px));
	max-height: 680px;
	display: grid;
	grid-template-rows: auto 1fr auto auto auto;
	overflow: hidden;
	border: 1px solid rgb(11 61 117 / 12%);
	border-radius: 22px;
	background: #f8fbfd;
	box-shadow: 0 22px 60px rgb(19 42 68 / 26%);
	transform-origin: bottom left;
}

.vn-chat--left .vn-chat__panel {
	left: 0;
}

.vn-chat--right .vn-chat__panel {
	right: 0;
	transform-origin: bottom right;
}

.vn-chat__panel[aria-hidden="true"] {
	display: none;
}

.vn-chat__panel[aria-hidden="false"] {
	animation: vn-chat-open 180ms ease-out;
}

.vn-chat__header {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 10px;
	min-height: 70px;
	padding: 12px 13px 12px 15px;
	background: var(--vn-blue);
	color: var(--vn-white);
}

.vn-chat__avatar {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border: 2px solid rgb(255 255 255 / 62%);
	border-radius: 50%;
	background: #2ca7d4;
	font-size: 19px;
	font-weight: 800;
}

.vn-chat__header-copy {
	display: grid;
	gap: 3px;
}

.vn-chat__header-copy strong {
	font-size: 15px;
	line-height: 1.2;
}

.vn-chat__header-copy span {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	opacity: 0.86;
}

.vn-chat__header-copy i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #45d483;
	box-shadow: 0 0 0 3px rgb(69 212 131 / 17%);
}

.vn-chat__reset,
.vn-chat__close {
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.vn-chat__reset:hover,
.vn-chat__close:hover {
	background: rgb(255 255 255 / 13%);
}

.vn-chat__reset svg,
.vn-chat__close svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.vn-chat__messages {
	display: flex;
	min-height: 0;
	flex-direction: column;
	gap: 11px;
	overflow-y: auto;
	padding: 18px 15px 12px;
	scroll-behavior: smooth;
	overscroll-behavior: contain;
}

.vn-chat__message {
	display: flex;
	width: 100%;
	animation: vn-message-in 160ms ease-out;
}

.vn-chat__message--bot {
	justify-content: flex-start;
}

.vn-chat__message--user {
	justify-content: flex-end;
}

.vn-chat__bubble {
	max-width: 84%;
	padding: 10px 12px;
	border-radius: 15px;
	font-size: 13.5px;
	line-height: 1.48;
	white-space: pre-line;
}

.vn-chat__message--bot .vn-chat__bubble {
	border: 1px solid var(--vn-line);
	border-bottom-left-radius: 5px;
	background: var(--vn-white);
	box-shadow: 0 3px 12px rgb(27 59 92 / 6%);
}

.vn-chat__message--user .vn-chat__bubble {
	border-bottom-right-radius: 5px;
	background: var(--vn-blue);
	color: var(--vn-white);
}

.vn-chat__typing {
	display: flex;
	width: fit-content;
	align-items: center;
	gap: 4px;
	padding: 12px 14px;
	border: 1px solid var(--vn-line);
	border-radius: 15px 15px 15px 5px;
	background: var(--vn-white);
}

.vn-chat__typing i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #7e8da0;
	animation: vn-typing 1s infinite ease-in-out;
}

.vn-chat__typing i:nth-child(2) {
	animation-delay: 120ms;
}

.vn-chat__typing i:nth-child(3) {
	animation-delay: 240ms;
}

.vn-chat__replies {
	display: flex;
	max-height: 146px;
	flex-wrap: wrap;
	gap: 7px;
	overflow-y: auto;
	padding: 8px 15px 10px;
}

.vn-chat__replies--callback {
	display: block;
	max-height: 360px;
}

.vn-chat__reply {
	padding: 8px 11px;
	border: 1px solid #b9d4e8;
	border-radius: 999px;
	background: var(--vn-white);
	color: var(--vn-blue);
	font-size: 12.5px;
	line-height: 1.25;
	cursor: pointer;
	transition: background 130ms ease, border-color 130ms ease, color 130ms ease;
}

.vn-chat__reply:hover {
	border-color: var(--vn-blue-2);
	background: var(--vn-sky);
}

.vn-chat__contacts {
	display: grid;
	width: 100%;
	grid-template-columns: repeat(3, 1fr);
	gap: 7px;
	margin-top: 2px;
}

.vn-chat__contact--callback {
	grid-column: 1 / -1;
	border-color: var(--vn-blue);
	background: var(--vn-blue);
	color: var(--vn-white);
}

.vn-chat__contact--callback:hover {
	border-color: #082f5c;
	background: #082f5c;
	color: var(--vn-white);
}

.vn-chat__contact {
	display: flex;
	min-width: 0;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 9px 6px;
	border: 1px solid var(--vn-line);
	border-radius: 10px;
	background: var(--vn-white);
	color: var(--vn-blue);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.vn-chat__contact:hover {
	border-color: #a6c6de;
	background: var(--vn-sky);
	color: var(--vn-blue);
}

.vn-chat__contact--whatsapp {
	border-color: #a8ddbd;
	color: #087c3e;
}

.vn-chat__callback-form {
	display: grid;
	gap: 9px;
	padding: 12px;
	border: 1px solid var(--vn-line);
	border-radius: 14px;
	background: var(--vn-white);
}

.vn-chat__callback-form > strong {
	font-size: 15px;
	color: var(--vn-blue);
}

.vn-chat__callback-form > p {
	margin: 0;
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--vn-muted);
}

.vn-chat__callback-field {
	display: grid;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--vn-ink);
}

.vn-chat__callback-field input {
	width: 100%;
	height: 38px;
	padding: 0 10px;
	border: 1px solid #c7d5e2;
	border-radius: 9px;
	background: #fff;
	color: var(--vn-ink);
	font-size: 12.5px;
	font-weight: 400;
	box-shadow: none;
}

.vn-chat__callback-consent {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: start;
	gap: 7px;
	font-size: 10.5px;
	line-height: 1.4;
	color: var(--vn-muted);
}

.vn-chat__callback-consent input {
	width: 16px;
	height: 16px;
	margin: 1px 0 0;
}

.vn-chat__callback-consent a {
	color: var(--vn-blue);
	font-weight: 700;
}

.vn-chat__callback-status {
	color: #a33424 !important;
}

.vn-chat__callback-actions {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 7px;
}

.vn-chat__callback-submit,
.vn-chat__callback-cancel {
	min-height: 38px;
	padding: 8px 12px;
	border-radius: 9px;
	cursor: pointer;
}

.vn-chat__callback-submit {
	border: 1px solid var(--vn-blue);
	background: var(--vn-blue);
	color: var(--vn-white);
	font-weight: 700;
}

.vn-chat__callback-submit:disabled {
	opacity: 0.58;
	cursor: wait;
}

.vn-chat__callback-cancel {
	border: 1px solid #c7d5e2;
	background: var(--vn-white);
	color: var(--vn-blue);
}

.vn-chat__form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 7px;
	padding: 10px 12px;
	border-top: 1px solid var(--vn-line);
	background: var(--vn-white);
}

.vn-chat__form input {
	min-width: 0;
	height: 42px;
	padding: 0 13px;
	border: 1px solid #c7d5e2;
	border-radius: 12px;
	background: #fff;
	color: var(--vn-ink);
	font-size: 13px;
	box-shadow: none;
}

.vn-chat__form input::placeholder {
	color: #8491a2;
}

.vn-chat__form button {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--vn-blue);
	color: #fff;
	cursor: pointer;
}

.vn-chat__form button:hover {
	background: #082f5c;
}

.vn-chat__form button svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.vn-chat__notice {
	margin: 0;
	padding: 7px 13px 9px;
	background: var(--vn-white);
	color: var(--vn-muted);
	font-size: 9.5px;
	line-height: 1.35;
	text-align: center;
}

.vn-chat__notice a {
	color: var(--vn-blue);
	font-weight: 800;
}

@keyframes vn-chat-open {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes vn-message-in {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes vn-typing {
	0%, 60%, 100% {
		opacity: 0.35;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

@media (max-width: 560px) {
	.vn-chat {
		left: 0;
		right: 0;
		bottom: 0;
	}

	#vn-chat .vn-chat__launcher {
		position: fixed;
		left: 14px;
		bottom: max(14px, env(safe-area-inset-bottom));
		width: 50px !important;
		height: 50px !important;
		min-height: 50px !important;
		justify-content: center;
		gap: 0;
		padding: 5px !important;
		border-radius: 50% !important;
	}

	.vn-chat__launcher-copy {
		display: none;
	}

	.vn-chat__launcher-icon {
		width: 38px;
		height: 38px;
		background: transparent !important;
	}

	.vn-chat__panel,
	.vn-chat--left .vn-chat__panel,
	.vn-chat--right .vn-chat__panel {
		position: fixed;
		left: 8px;
		right: 8px;
		bottom: max(8px, env(safe-area-inset-bottom));
		width: calc(100% - 16px);
		height: min(72vh, 620px);
		max-height: calc(100vh - 24px);
		border: 1px solid rgb(11 61 117 / 12%);
		border-radius: 18px;
	}

	.vn-chat__bubble {
		max-width: 89%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vn-chat *,
	.vn-chat *::before,
	.vn-chat *::after {
		scroll-behavior: auto !important;
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
	}
}
