.wjMsg-launcher,
.wjMsg-app button,
.wjMsg-composer textarea {
	font: inherit;
}

.wjMsg-launcher {
	position: fixed;
	right: 16px;
	bottom: calc(138px + env(safe-area-inset-bottom, 0px));
	z-index: 280;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	background: var(--wcfButtonPrimaryBackground, #0a71b5);
	color: #fff;
	box-shadow: 0 10px 24px rgba(15, 23, 42, .22);
	cursor: pointer;
}

.wjMsg-launcher svg {
	width: 26px;
	height: 26px;
	display: block;
	margin: 0 auto;
}

.wjMsg-toasts {
	position: fixed;
	right: 16px;
	bottom: calc(206px + env(safe-area-inset-bottom, 0px));
	z-index: 285;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: min(320px, calc(100vw - 32px));
	pointer-events: none;
}

.wjMsg-toast {
	position: relative;
	width: 100%;
	padding: 12px 14px;
	border: 0;
	border-radius: 16px;
	background: var(--wcfContentContainerBackground, #fff);
	color: var(--wcfContentText, #1f2937);
	box-shadow: 0 14px 36px rgba(15, 23, 42, .24);
	text-align: left;
	cursor: pointer;
	pointer-events: auto;
}

.wjMsg-toast strong,
.wjMsg-toast span {
	display: block;
}

.wjMsg-toast span {
	margin-top: 4px;
	font-size: 13px;
	opacity: .8;
}

.wjMsg-bar .wjMsg-icon,
.wjMsg-head .wjMsg-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--wcfButtonPrimaryBackground, #0a71b5) 16%, #fff);
	color: var(--wcfButtonPrimaryBackground, #0a71b5);
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.wjMsg-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #e11d48;
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	font-weight: 700;
}

.wjMsg-panel {
	position: fixed;
	right: 16px;
	bottom: calc(204px + env(safe-area-inset-bottom, 0px));
	z-index: 290;
	width: min(400px, calc(100vw - 24px));
	height: min(540px, calc(100dvh - 240px));
	border-radius: 22px;
	overflow: hidden;
	background: var(--wcfContentContainerBackground, #fff);
	color: var(--wcfContentText, #1f2937);
	box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
}

.wjMsg-app {
	display: flex;
	height: 100%;
	min-height: 0;
	background: var(--wcfContentContainerBackground, #fff);
}

.wjMsg-page {
	height: calc(100dvh - 170px);
	min-height: 460px;
}

.wjMsg-page .wjMsg-app {
	height: 100%;
	border-radius: 22px;
	overflow: hidden;
	border: 1px solid var(--wcfContentBorderInner, rgba(15, 23, 42, .08));
}

.wjMsg-list,
.wjMsg-thread {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}

.wjMsg-list {
	width: 340px;
	border-right: 1px solid var(--wcfContentBorderInner, rgba(15, 23, 42, .08));
}

.wjMsg-thread {
	flex: 1;
	background: color-mix(in srgb, var(--wcfContentBackground, #f4f7fb) 86%, white);
}

.wjMsg-bar,
.wjMsg-head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 58px;
	padding: 10px 12px;
	background: var(--wcfContentContainerBackground, #fff);
	border-bottom: 1px solid var(--wcfContentBorderInner, rgba(15, 23, 42, .08));
}

.wjMsg-bar strong,
.wjMsg-head strong {
	font-size: 16px;
}

.wjMsg-list input[type="search"],
.wjMsg-compose input,
.wjMsg-composer textarea {
	width: 100%;
	border: 0;
	border-radius: 999px;
	background: var(--wcfContentBackground, #f3f4f6);
	color: inherit;
	padding: 10px 14px;
	font-size: 16px;
	box-sizing: border-box;
}

.wjMsg-list input[type="search"] {
	display: block;
	width: 100%;
	margin: 0 0 10px;
}

.wjMsg-grow {
	flex: 1;
	min-width: 0;
}

.wjMsg-icon,
.wjMsg-send {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wcfContentText, #1f2937);
	cursor: pointer;
}

.wjMsg-send {
	background: var(--wcfButtonPrimaryBackground, #0a71b5);
	color: #fff;
}

.wjMsg-icon.wjMsg-sound {
	background: #059669;
	color: #fff;
}

.wjMsg-icon.wjMsg-sound.is-off {
	background: #94a3b8;
	color: #fff;
}

.wjMsg-icon.wjMsg-new,
.wjMsg-icon.wjMsg-full {
	background: #2563eb;
	color: #fff;
}

.wjMsg-icon.wjMsg-dismiss {
	background: #e11d48;
	color: #fff;
	font-size: 24px;
}

a.wjMsg-title {
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

a.wjMsg-title[href] {
	color: #2563eb;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wjMsg-icon.wjMsg-profile {
	background: #2563eb;
	color: #fff;
}

.wjMsg-profile svg {
	display: block;
}

.wjMsg-rows,
.wjMsg-log {
	flex: 1;
	min-height: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.wjMsg-row,
.wjMsg-suggest button {
	display: flex;
	gap: 10px;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	color: inherit;
	padding: 10px 12px;
	cursor: pointer;
}

.wjMsg-row.is-active,
.wjMsg-row:hover {
	background: color-mix(in srgb, var(--wcfButtonPrimaryBackground, #0a71b5) 10%, transparent);
}

.wjMsg-avatar,
.wjMsg-avatarFallback {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
	background: #dbe4ee;
}

.wjMsg-avatarFallback {
	display: grid;
	place-items: center;
	font-weight: 700;
}

.wjMsg-rowText,
.wjMsg-bubble {
	min-width: 0;
}

.wjMsg-rowText small,
.wjMsg-head small,
.wjMsg-meta {
	display: block;
	color: var(--wcfContentDimmedText, #6b7280);
	font-size: 12px;
}

.wjMsg-rowTop {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.wjMsg-preview {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wjMsg-dot {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 2px var(--wcfContentContainerBackground, #fff);
}

.wjMsg-log {
	padding: 14px 12px 8px;
}

.wjMsg-day {
	align-self: center;
	margin: 8px 0;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--wcfContentContainerBackground, #fff);
	color: var(--wcfContentDimmedText, #6b7280);
	font-size: 12px;
}

.wjMsg-line {
	display: flex;
	gap: 8px;
	margin: 4px 0;
	max-width: 100%;
}

.wjMsg-line.is-mine {
	justify-content: flex-end;
}

.wjMsg-bubble {
	max-width: min(78%, 460px);
	padding: 9px 12px;
	border-radius: 18px;
	background: var(--wcfContentContainerBackground, #fff);
	box-shadow: 0 1px 1px rgba(15, 23, 42, .04);
	overflow-wrap: anywhere;
}

.wjMsg-line.is-mine .wjMsg-bubble {
	background: var(--wcfButtonPrimaryBackground, #0a71b5);
	color: #fff;
}

.wjMsg-line.is-mine .wjMsg-meta,
.wjMsg-line.is-mine .wjMsg-translation {
	color: rgba(255, 255, 255, .82);
}

.wjMsg-bubble p {
	margin: 0;
}

.wjMsg-translation {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid rgba(15, 23, 42, .08);
	font-size: 13px;
}

.wjMsg-line.is-mine .wjMsg-translation {
	border-top-color: rgba(255, 255, 255, .25);
}

.wjMsg-translate {
	margin-top: 4px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	opacity: .75;
	font-size: 12px;
	cursor: pointer;
}

.wjMsg-composer,
.wjMsg-compose {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	padding: 10px;
	background: var(--wcfContentContainerBackground, #fff);
}

.wjMsg-composer textarea {
	resize: none;
	min-height: 42px;
	max-height: 120px;
	border-radius: 18px;
}

.wjMsg-note,
.wjMsg-empty {
	padding: 18px 14px;
	color: var(--wcfContentDimmedText, #6b7280);
}

.wjMsg-app.is-dock .wjMsg-list,
.wjMsg-app.is-dock .wjMsg-thread {
	display: none;
	width: 100%;
	height: 100%;
}

.wjMsg-app.is-dock.is-thread .wjMsg-thread,
.wjMsg-app.is-dock:not(.is-thread) .wjMsg-list {
	display: flex;
}

.wjMsg-back {
	display: none;
}

.wjMsg-app.is-dock .wjMsg-back,
.wjMsg-app.is-page .wjMsg-back {
	display: grid;
	place-items: center;
}

@media (min-width: 801px) {
	.wjMsg-app.is-page .wjMsg-back {
		display: none;
	}
}

@media (max-width: 800px) {
	.wjMsg-page {
		height: calc(100dvh - 120px);
		min-height: 0;
	}

	.wjMsg-app.is-page .wjMsg-list,
	.wjMsg-app.is-page .wjMsg-thread {
		display: none;
		width: 100%;
	}

	.wjMsg-app.is-page.is-thread .wjMsg-thread,
	.wjMsg-app.is-page:not(.is-thread) .wjMsg-list {
		display: flex;
	}

	.wjMsg-panel.is-open {
		inset: 0;
		width: 100%;
		height: 100dvh;
		border-radius: 0;
	}

	.wjMsg-panel .wjMsg-composer {
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	}

	.wjMsg-panel.is-open .wjMsg-bar,
	.wjMsg-panel.is-open .wjMsg-head {
		padding-top: calc(10px + env(safe-area-inset-top, 0px));
	}

	.wjMsg-dismiss {
		width: 44px;
		height: 44px;
		font-size: 28px;
		line-height: 1;
	}
}

.wjMsg-windows {
	position: fixed;
	right: 84px;
	bottom: calc(48px + env(safe-area-inset-bottom, 0px));
	z-index: 276;
	display: flex;
	flex-direction: row-reverse;
	align-items: flex-end;
	gap: 10px;
	pointer-events: none;
}

.wjMsg-window {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	width: 300px;
	height: min(440px, calc(100dvh - 180px));
	border-radius: 18px;
	overflow: hidden;
	background: var(--wcfContentContainerBackground, #fff);
	color: var(--wcfContentText, #1f2937);
	box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
	border: 1px solid var(--wcfContentBorderInner, rgba(15, 23, 42, .08));
}

.wjMsg-window .wjMsg-log {
	flex: 1;
}

.wjMsg-window.is-fresh {
	outline: 2px solid var(--wcfButtonPrimaryBackground, #0a71b5);
}

body:has(.wjMsg-app.is-page) .wjMsg-dock,
body:has(.wjMsg-app.is-page) .wjMsg-windows {
	display: none;
}

@media (max-width: 800px) {
	.wjMsg-windows {
		display: none;
	}
}

html.wjMsg-lock,
html.wjMsg-lock body {
	overflow: hidden;
}
