.mewc,
.mewc * {
	box-sizing: border-box;
}

.mewc {
	--c-teal: #2a9d8f;
	--c-teal-dark: #218577;
	--c-slate: #264653;
	--c-yellow: #ffec1f;
	--c-sand: #f7f4ed;
	--c-line: #e2ded3;
	--c-text: #23303a;
	--c-muted: #6a7a7c;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99990;
	font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.5;
}

.mewc__launcher {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 0;
	cursor: pointer;
	padding: 0;
	background: none;
	font: inherit;
}

.mewc__hint {
	max-width: 210px;
	background: #fff;
	color: var(--c-slate);
	border: 1px solid var(--c-line);
	border-radius: 14px 14px 4px 14px;
	padding: 11px 15px;
	font-size: 14.5px;
	font-weight: 600;
	text-align: left;
	box-shadow: 0 10px 28px rgba(24, 44, 52, .14);
	opacity: 0;
	transform: translateY(6px) scale(.96);
	transition: opacity .3s ease, transform .3s ease;
	pointer-events: none;
}

.mewc__hint.is-on {
	opacity: 1;
	transform: none;
}

.mewc__hint small {
	display: block;
	margin-top: 3px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--c-muted);
}

.mewc__fab {
	position: relative;
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--c-teal);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 30px rgba(42, 157, 143, .38);
	transition: transform .22s ease, background .22s ease;
}

.mewc__launcher:hover .mewc__fab {
	background: var(--c-teal-dark);
	transform: translateY(-2px);
}

.mewc__fab svg {
	width: 27px;
	height: 27px;
	display: block;
}

.mewc__fab::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--c-teal);
	opacity: 0;
	animation: mewc-ping 2.8s ease-out infinite;
}

@keyframes mewc-ping {
	0% { opacity: .55; transform: scale(.86); }
	70% { opacity: 0; transform: scale(1.18); }
	100% { opacity: 0; }
}

.mewc__panel {
	position: absolute;
	right: 0;
	bottom: 78px;
	width: 384px;
	max-width: calc(100vw - 32px);
	height: 552px;
	max-height: calc(100vh - 130px);
	background: #fff;
	border-radius: 20px;
	border: 1px solid var(--c-line);
	box-shadow: 0 26px 60px rgba(19, 38, 45, .26);
	display: none;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom right;
}

.mewc.is-open .mewc__panel {
	display: flex;
	animation: mewc-in .24s cubic-bezier(.2, .8, .3, 1);
}

.mewc.is-open .mewc__hint {
	display: none;
}

.mewc.is-open .mewc__fab::after {
	display: none;
}

@keyframes mewc-in {
	from { opacity: 0; transform: translateY(14px) scale(.97); }
	to { opacity: 1; transform: none; }
}

.mewc__head {
	background: var(--c-slate);
	color: #fff;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

.mewc__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--c-teal);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
	flex: 0 0 auto;
}

.mewc__who {
	flex: 1 1 auto;
	min-width: 0;
}

.mewc__who b {
	display: block;
	font-size: 15px;
	font-weight: 700;
}

.mewc__who span {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: #b9cdcd;
}

.mewc__who span::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #6ede9a;
}

.mewc__close {
	background: none;
	border: 0;
	color: #c3d4d4;
	cursor: pointer;
	padding: 6px;
	line-height: 0;
	border-radius: 8px;
	flex: 0 0 auto;
}

.mewc__close:hover {
	color: #fff;
	background: rgba(255, 255, 255, .12);
}

.mewc__close svg {
	width: 18px;
	height: 18px;
}

.mewc__log {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 16px 6px;
	background: var(--c-sand);
	scroll-behavior: auto;
	overscroll-behavior: contain;
}

.mewc__msg {
	max-width: 86%;
	margin-bottom: 10px;
	padding: 11px 14px;
	font-size: 14.5px;
	color: var(--c-text);
	background: #fff;
	border: 1px solid var(--c-line);
	border-radius: 16px 16px 16px 5px;
	animation: mewc-pop .22s ease;
}

.mewc__msg--me {
	margin-left: auto;
	background: var(--c-teal);
	border-color: var(--c-teal);
	color: #fff;
	border-radius: 16px 16px 5px 16px;
}

.mewc__msg p {
	margin: 0 0 8px;
}

.mewc__msg p:last-child {
	margin-bottom: 0;
}

.mewc__msg ul {
	margin: 6px 0 0;
	padding-left: 0;
	list-style: none;
}

.mewc__msg li {
	position: relative;
	padding-left: 18px;
	margin-bottom: 5px;
}

.mewc__msg li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 6px;
	height: 6px;
	border-radius: 2px;
	background: var(--c-teal);
	transform: rotate(45deg);
}

.mewc__msg a {
	color: var(--c-teal-dark);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mewc__msg--me a {
	color: #fff;
}

@keyframes mewc-pop {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

.mewc__typing {
	display: inline-flex;
	gap: 4px;
	padding: 14px 15px;
	background: #fff;
	border: 1px solid var(--c-line);
	border-radius: 16px 16px 16px 5px;
	margin-bottom: 10px;
}

.mewc__typing i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #b3c2c3;
	animation: mewc-dot 1.15s infinite;
}

.mewc__typing i:nth-child(2) { animation-delay: .16s; }
.mewc__typing i:nth-child(3) { animation-delay: .32s; }

@keyframes mewc-dot {
	0%, 60%, 100% { transform: translateY(0); opacity: .55; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.mewc__foot {
	flex: 0 0 auto;
	border-top: 1px solid var(--c-line);
	background: #fff;
	padding: 12px 14px 14px;
	max-height: 47%;
	overflow-y: auto;
}

.mewc__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mewc__chip {
	border: 1.5px solid var(--c-teal);
	background: #fff;
	color: var(--c-teal-dark);
	border-radius: 999px;
	padding: 9px 15px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .16s ease, color .16s ease;
	text-align: left;
}

.mewc__chip:hover {
	background: var(--c-teal);
	color: #fff;
}

.mewc__chip--ghost {
	border-color: var(--c-line);
	color: var(--c-muted);
}

.mewc__chip--ghost:hover {
	background: var(--c-slate);
	border-color: var(--c-slate);
	color: #fff;
}

.mewc__form label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--c-slate);
	margin: 0 0 4px;
}

.mewc__form input,
.mewc__form textarea {
	width: 100%;
	border: 1px solid var(--c-line);
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	font-size: 14px;
	color: var(--c-text);
	background: #fff;
	margin-bottom: 9px;
}

.mewc__form textarea {
	min-height: 62px;
	resize: vertical;
}

.mewc__form input:focus,
.mewc__form textarea:focus {
	outline: 2px solid var(--c-teal);
	outline-offset: 1px;
	border-color: var(--c-teal);
}

.mewc__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

.mewc__send {
	width: 100%;
	border: 0;
	border-radius: 10px;
	background: var(--c-teal);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	padding: 12px;
	cursor: pointer;
}

.mewc__send:hover {
	background: var(--c-teal-dark);
}

.mewc__send[disabled] {
	opacity: .6;
	cursor: default;
}

.mewc__note {
	font-size: 11.5px;
	color: var(--c-muted);
	margin: 8px 2px 0;
	text-align: center;
}

.mewc__err {
	font-size: 13px;
	color: #c0392b;
	margin: 0 2px 8px;
}

@media (max-width: 600px) {
	.mewc {
		right: 14px;
		bottom: 14px;
	}

	.mewc__hint {
		display: none;
	}

	.mewc__fab {
		width: 54px;
		height: 54px;
	}

	.mewc__panel {
		position: fixed;
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		height: 86vh;
		max-height: 86vh;
		border-radius: 18px 18px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mewc__fab::after {
		animation: none;
	}

	.mewc *,
	.mewc__msg,
	.mewc.is-open .mewc__panel {
		animation: none !important;
		transition: none !important;
	}
}
