.bwa_chat {
	padding-block: 16px;
}

.bwa_chat_heading {
	margin-bottom: 20px;
}

.bwa_chat_heading h1 {
	color: #79150f;
	font-size: 1.6rem;
}

.bwa_chat_heading p, .bwa_chat_hint {
	color: #555;
	margin-top: 8px;
}

.bwa_chat_layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
	align-items: start;
	gap: 24px;
}

.bwa_chat_panel {
	min-width: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
}

.bwa_chat .cat_bar h2 {
	color: #fff;
	padding: 12px 16px;
	font-size: 0.95rem;
}

.bwa_chat_sidebar {
	display: grid;
	gap: 20px;
	min-width: 0;
}

.bwa_chat_panel_body {
	padding: 16px;
}

.bwa_chat_messages {
	max-height: 65vh;
	min-height: 260px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 16px;
}

.bwa_chat_message {
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}

.bwa_chat_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 5px;
}

.bwa_chat_meta time {
	color: #79150f;
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
}

.bwa_chat_meta strong, .bwa_chat_user {
	max-width: 100%;
	overflow-wrap: anywhere;
	text-align: left;
}

.bwa_chat_text {
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.bwa_chat_text img {
	max-width: 100%;
}

.bwa_chat label {
	display: block;
	font-weight: bold;
	margin-bottom: 8px;
}

#bwa_chat_input {
	box-sizing: border-box;
	width: 100%;
	resize: vertical;
	font: inherit;
}

.bwa_chat_tools, .bwa_chat_smileys, .bwa_chat_pages {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-block: 14px;
}

.bwa_chat_tools label {
	margin: 0;
}

.bwa_chat_smileys button {
	background: #f5f5f5;
	border: 1px solid #ccc;
	border-radius: 4px;
	min-width: 32px;
	min-height: 32px;
	cursor: pointer;
}

.bwa_chat .button {
	background: #79150f;
	border-color: #650000;
	color: #fff;
}

.bwa_chat .button:hover, .bwa_chat .button:focus {
	background: #650000;
}

#bwa_chat_users {
	list-style: none;
	padding: 0;
}

.bwa_chat_user, .bwa_chat_delete {
	background: none;
	border: 0;
	padding: 5px 0;
	color: #79150f;
	cursor: pointer;
	font: inherit;
}

.bwa_chat_delete, .bwa_chat_hint {
	font-size: 0.8rem;
}

.bwa_chat_empty, .bwa_chat_pages {
	padding: 16px;
}

.bwa_chat_guest h2 {
	font-size: 1.2rem;
}

.bwa_chat_guest p {
	margin-block: 14px;
}

@media (max-width: 800px) {
	.bwa_chat_layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.bwa_chat_messages {
		max-height: 50vh;
	}
}
