/* /frontend/css/modal-chat.css - 20260726 - 01-30 */
#chat-modal-overlay .modal-content {
	background-color: #202123;
}
#chat-modal-overlay .chat-modal-body {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: calc(100vh - 60px);
	height: calc(100dvh - 60px);
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
}
.chat-container-box {
	display: flex;
	width: 100%;
	height: 100%;
	max-width: 100%;
	background-color: #2a2b2d;
	border: none;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
}
.chat-sidebar {
	width: 340px;
	flex-shrink: 0;
	border-right: 1px solid #444;
	display: flex;
	flex-direction: column;
	background-color: #202123;
}
.chat-dialogs-list {
	flex-grow: 1;
	overflow-y: auto;
}
.chat-dialog-item {
	padding: 12px 15px;
	border-bottom: 1px solid #333;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.chat-dialog-item:hover, .chat-dialog-item.active {
	background-color: #343541;
}
.chat-dialog-main {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex-grow: 1;
}
.chat-dialog-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.chat-dialog-role-icon {
	font-size: 18px;
	flex-shrink: 0;
	line-height: 1;
}
.chat-dialog-text-block {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex-grow: 1;
}
.chat-dialog-title {
	font-weight: bold;
	color: #fff;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.chat-dialog-sub {
	font-size: 12px;
	color: #aaa;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.chat-info-btn {
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s;
	padding: 4px;
	flex-shrink: 0;
}
.chat-info-btn:hover {
	opacity: 1.0;
}
.chat-area {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	background-color: #2a2b2d;
	position: relative;
	height: 100%;
}
.chat-info-panel {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #2a2b2d;
	z-index: 50;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}
.chat-info-header {
	position: relative;
	height: 55px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	border-bottom: 1px solid #333;
	background-color: #222;
	flex-shrink: 0;
	padding-left: 60px;
	padding-right: 20px;
	box-sizing: border-box;
	overflow: hidden;
}
.chat-info-header h3 {
	margin: 0;
	font-size: 17px;
	color: #fff;
	font-weight: 600;
}
.chat-info-header .chat-info-back-btn {
	position: absolute;
	top: 0;
	left: 0;
	width: 55px;
	height: 54px !important;
	font-size: 26px;
	font-weight: bold;
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.chat-info-header .chat-info-back-btn:hover {
	background-color: #fff;
	color: #202123;
}
.chat-info-body {
	padding: 25px;
}
.chat-info-body p {
	margin: 12px 0;
	font-size: 16px;
	line-height: 1.6;
	color: #e0e0e0;
	word-break: break-all;
}
.chat-info-body strong {
	color: #ffffff;
	font-weight: 600;
	display: block;
	margin-bottom: 8px;
}
.chat-info-body a {
	color: #ffff00;
	text-decoration: none;
	word-break: break-all;
}
.chat-info-body a:hover {
	text-decoration: underline;
}
.chat-messages-list {
	flex-grow: 1;
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.chat-message-item {
	max-width: 75%;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.4;
	position: relative;
	word-break: break-word;
}
.chat-message-item.outgoing {
	align-self: flex-end;
	background-color: #0055c4;
	color: #ffffff;
	border-bottom-right-radius: 2px;
}
.chat-message-item.incoming {
	align-self: flex-start;
	background-color: #343541;
	color: #ffffff;
	border: 1px solid #555;
	border-bottom-left-radius: 2px;
}
.chat-message-meta {
	font-size: 10px;
	color: rgba(255, 255, 255, 0.6);
	margin-top: 4px;
	text-align: right;
}
.chat-input-bar {
	display: flex;
	align-items: flex-end;
	padding: 10px 12px;
	background-color: #1e1e24;
	border-top: 1px solid #333;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
}
.chat-attach-btn {
	font-size: 22px;
	cursor: pointer;
	background: transparent;
	border: none;
	color: #aaa;
	padding: 6px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	transition: color 0.2s;
}
.chat-attach-btn:hover {
	color: #ffff00;
}
.chat-text-input {
	flex-grow: 1;
	background-color: #2d2e33;
	border: 1px solid #444;
	border-radius: 20px;
	color: #fff;
	padding: 10px 16px;
	font-size: 15px;
	font-family: inherit;
	outline: none;
	resize: none;
	min-height: 40px;
	max-height: 120px;
	box-sizing: border-box;
	line-height: 1.3;
}
.chat-send-btn {
	background-color: #28a745;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	cursor: pointer;
	flex-shrink: 0;
	padding: 0;
	transition: background-color 0.2s;
}
.chat-send-btn:hover {
	background-color: #218838;
}
@media (max-width: 650px) {
	.chat-container-box {
		flex-direction: column;
	}
	.chat-container-box:not(.show-chat-mobile) .chat-sidebar {
		width: 100%;
		height: 100%;
		display: flex;
		border-right: none;
	}
	.chat-container-box:not(.show-chat-mobile) .chat-area {
		display: none;
	}
	.chat-container-box.show-chat-mobile .chat-sidebar {
		display: none;
	}
	.chat-container-box.show-chat-mobile .chat-area {
		display: flex;
		width: 100%;
		height: 100%;
	}
	.chat-message-item {
		max-width: 88%;
	}
}