.zybns-chat-wrap { max-width: 1400px; margin: 0 auto; }
.zybns-chat-layout {
	display: flex;
	height: calc(100vh - 130px);
	min-height: 500px;
	background: var(--bs-body-bg, #fff);
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: .5rem;
	overflow: hidden;
}
.zybns-chat-sidebar {
	width: 240px;
	flex-shrink: 0;
	border-right: 1px solid var(--bs-border-color, #dee2e6);
	display: flex;
	flex-direction: column;
	background: var(--bs-tertiary-bg, #f8f9fa);
}
.zybns-chat-sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .75rem 1rem;
	border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.zybns-chat-sidebar-body { flex: 1; overflow-y: auto; padding: .5rem; }
.zybns-chat-sidebar-label {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--bs-secondary-color, #6c757d);
	padding: .5rem .5rem .25rem;
}
.zybns-chat-channel-list { list-style: none; padding: 0; margin: 0; }
.zybns-chat-channel-item {
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: .45rem .6rem;
	border-radius: .375rem;
	color: inherit;
	text-decoration: none;
	font-size: .9rem;
}
.zybns-chat-channel-item:hover { background: var(--bs-secondary-bg, #e9ecef); }
.zybns-chat-channel-item.active { background: var(--bs-primary, #0d6efd); color: #fff; }
.zybns-chat-channel-item.active .zybns-chat-channel-online { background: rgba(255,255,255,.25); }
.zybns-chat-channel-icon { opacity: .7; }
.zybns-chat-channel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zybns-chat-channel-online {
	font-size: .7rem;
	background: var(--bs-success, #198754);
	color: #fff;
	border-radius: 999px;
	padding: 0 .4rem;
	line-height: 1.4;
}
.zybns-chat-channel-default { opacity: .8; font-size: .8rem; }
.zybns-chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.zybns-chat-header {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .75rem 1rem;
	border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.zybns-chat-header-title { flex: 1; min-width: 0; }
.zybns-chat-header-title small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.zybns-chat-messages { flex: 1; overflow-y: auto; padding: 1rem; }
.zybns-chat-msg { display: flex; gap: .6rem; margin-bottom: .9rem; }
.zybns-chat-msg-self { flex-direction: row-reverse; }
.zybns-chat-msg-avatar { width: 36px; height: 36px; flex-shrink: 0; }
.zybns-chat-msg-avatar img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.zybns-chat-msg-avatar .ti { font-size: 2rem; line-height: 1; }
.zybns-chat-msg-body { max-width: 75%; }
.zybns-chat-msg-meta { font-size: .75rem; color: var(--bs-secondary-color, #6c757d); margin-bottom: .15rem; }
.zybns-chat-msg-self .zybns-chat-msg-meta { text-align: right; }
.zybns-chat-msg-bubble {
	display: inline-block;
	padding: .5rem .75rem;
	border-radius: .5rem;
	background: var(--bs-tertiary-bg, #f1f3f5);
	word-break: break-word;
	white-space: pre-wrap;
}
.zybns-chat-msg-self .zybns-chat-msg-bubble { background: var(--bs-primary, #0d6efd); color: #fff; }
.zybns-chat-msg-share-card-wrap { border: 1px dashed var(--bs-border-color, #dee2e6); background: var(--bs-warning-bg-subtle, #fff3cd); }
.zybns-chat-share-card {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	text-decoration: none;
	color: var(--bs-primary, #0d6efd);
	margin-top: .35rem;
	font-size: .85rem;
	padding-top: .35rem;
	border-top: 1px solid var(--bs-border-color, rgba(0,0,0,.1));
}
.zybns-chat-share-card:hover { text-decoration: underline; }
.zybns-chat-input-bar {
	display: flex;
	align-items: flex-end;
	gap: .5rem;
	padding: .75rem 1rem;
	border-top: 1px solid var(--bs-border-color, #dee2e6);
}
.zybns-chat-emoji-wrap { position: relative; }
.zybns-chat-emoji-panel {
	position: absolute;
	bottom: 100%;
	left: 0;
	margin-bottom: .5rem;
	background: var(--bs-body-bg, #fff);
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: .5rem;
	padding: .5rem;
	width: 320px;
	max-height: 240px;
	overflow-y: auto;
	box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
	z-index: 1030;
}
.zybns-chat-emoji-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.zybns-chat-emoji-grid button {
	border: 0;
	background: transparent;
	font-size: 1.2rem;
	padding: .2rem;
	border-radius: .25rem;
	cursor: pointer;
	line-height: 1;
}
.zybns-chat-emoji-grid button:hover { background: var(--bs-secondary-bg, #e9ecef); }
.zybns-chat-input-form { flex: 1; display: flex; gap: .5rem; align-items: flex-end; }
.zybns-chat-input { resize: none; max-height: 120px; }
.zybns-chat-empty { color: var(--bs-secondary-color, #6c757d); }

/* 移动端：频道列表抽屉式 */
@media (max-width: 991.98px) {
	.zybns-chat-layout { flex-direction: column; height: auto; min-height: calc(100vh - 130px); }
	.zybns-chat-sidebar {
		width: 80%;
		max-width: 300px;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1045;
		transform: translateX(-100%);
		transition: transform .2s ease;
		border-right: 1px solid var(--bs-border-color, #dee2e6);
		box-shadow: 0 0 1rem rgba(0,0,0,.2);
	}
	.zybns-chat-sidebar.open { transform: translateX(0); }
	.zybns-chat-main { min-height: calc(100vh - 130px); }
	.zybns-chat-msg-body { max-width: 85%; }
}
