.vmst-live-chat {
	bottom: 22px;
	left: 22px;
	position: fixed;
	z-index: 9999;
}

.vmst-live-chat * {
	box-sizing: border-box;
}

.vmst-live-chat-panel {
	background: #fff;
	border: 1px solid #d9e5e3;
	border-radius: 8px;
	box-shadow: 0 18px 52px rgba(15, 23, 42, .18);
	display: flex;
	flex-direction: column;
	margin-bottom: 12px;
	max-height: min(680px, calc(100vh - 96px));
	overflow: hidden;
	width: min(380px, calc(100vw - 28px));
}

.vmst-live-chat-panel[hidden] {
	display: none;
}

.vmst-live-chat-header {
	align-items: center;
	background: #1867dc;
	color: #fff;
	display: flex;
	justify-content: space-between;
	padding: 14px 16px;
}

.vmst-live-chat-header strong,
.vmst-live-chat-header span {
	display: block;
}

.vmst-live-chat-header span {
	color: rgba(255, 255, 255, .78);
	font-size: .82rem;
	line-height: 1.35;
	margin-top: 2px;
}

.vmst-live-chat-close {
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	font-size: 24px;
	height: 34px;
	line-height: 1;
	margin: 0;
	padding: 0;
	width: 34px;
}

.vmst-live-chat-start,
.vmst-live-chat-body {
	padding: 16px;
}

.vmst-live-chat-start[hidden],
.vmst-live-chat-body[hidden] {
	display: none;
}

.vmst-live-chat-start label {
	color: #1d222b;
	display: block;
	font-size: .86rem;
	font-weight: 700;
	margin-bottom: 11px;
}

.vmst-live-chat-start input,
.vmst-live-chat-start textarea,
.vmst-live-chat-reply textarea {
	border: 1px solid #d9e5e3;
	border-radius: 6px;
	box-shadow: none;
	margin-top: 5px;
	width: 100%;
}

.vmst-live-chat-start textarea,
.vmst-live-chat-reply textarea {
	min-height: 78px;
	resize: vertical;
}

.vmst-live-chat-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	min-height: 360px;
}

.vmst-live-chat-messages {
	background: #f6faf9;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	min-height: 240px;
	overflow-y: auto;
	padding: 12px;
}

.vmst-live-chat-message {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	max-width: 86%;
}

.vmst-live-chat-message.is-admin {
	align-self: flex-start;
}

.vmst-live-chat-message.is-visitor {
	align-self: flex-end;
}

.vmst-live-chat-meta {
	color: #64748b;
	font-size: .72rem;
	margin-bottom: 4px;
}

.vmst-live-chat-bubble {
	background: #fff;
	border: 1px solid #d9e5e3;
	border-radius: 8px;
	color: #1d222b;
	line-height: 1.45;
	padding: 9px 11px;
	white-space: pre-wrap;
	word-break: break-word;
}

.vmst-live-chat-message.is-visitor .vmst-live-chat-bubble {
	background: #1867dc;
	border-color: #1867dc;
	color: #fff;
}

.vmst-live-chat-reply {
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(0, 1fr) auto;
}

.vmst-live-chat-reply textarea {
	min-height: 48px;
}

.vmst-live-chat-reply button {
	align-self: stretch;
	margin: 5px 0 0;
}

.vmst-live-chat-notice {
	color: #047857;
	font-size: .82rem;
	min-height: 18px;
	padding: 0 16px 14px;
}

.vmst-live-chat-notice.is-error {
	color: #b91c1c;
}

.vmst-live-chat-toggle {
	display: none !important;
}

@media (max-width: 549px) {
	.vmst-live-chat {
		bottom: 12px;
		left: 12px;
		right: auto;
	}

	.vmst-live-chat-panel {
		position: fixed;
		left: 12px;
		bottom: 72px;
		max-height: calc(100vh - 84px);
		width: calc(100vw - 24px);
	}

	.vmst-live-chat-toggle {
		border-radius: 999px;
		font-size: 0;
		justify-content: center;
		min-height: 54px;
		padding: 0;
		position: relative;
		width: 54px;
	}

	.vmst-live-chat-toggle span {
		display: none;
	}

	.vmst-live-chat-toggle::before {
		border: 2px solid currentColor;
		border-radius: 7px;
		content: "";
		display: block;
		height: 18px;
		width: 24px;
	}

	.vmst-live-chat-toggle::after {
		border-bottom: 2px solid currentColor;
		border-left: 2px solid currentColor;
		bottom: 16px;
		content: "";
		height: 8px;
		left: 19px;
		position: absolute;
		transform: rotate(-22deg);
		width: 8px;
	}
}
