:root {
	--sidebar-bg: #520050;
	--sidebar-txt: #e0e5f2;
	--sidebar-active: #ffffff;
	--sidebar-border: #520050;
	--topbar-bg: #520050;
	--topbar-txt: #e1e1e1;
	--umni-purple: #520050;
	--sidebar-width: 240px;
	--top-bar-height: 52px;
	--bottom-bar-height: 56px;
	--chat-border: #e6e9f1;
	--main-bg: #eef3fc;
	--slideup-speed: 0.6s;
	--slideup-easing: cubic-bezier(.42, .75, .42, 1);
}

html, body {
	height: 100%;
	margin: 0;
	padding: 0;
	background: var(--main-bg);
	overflow: hidden;
	overflow-x: hidden;
}
body {
	font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
	height: 100vh;
}




#main-content {
	overflow-x: hidden;
	/* ...your other rules... */
}

@media (max-width: 991.98px) {
	#main-content {
		position: static;
		top: 0px;
		bottom: 0px;
		left: 0;
		right: 0;
		width: 100vw;
		/*height: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height));*/
		overflow-y: auto;
		overflow-x: hidden;
		background: var(--main-bg);
		z-index: auto;
	}
}

@media (min-width: 992px) {
	#main-content {
		overflow-y: visible;
		height: auto;
		overflow-x: hidden; /* re-assert */
	}
}



.main-content-extra {
	box-sizing: border-box;
	padding: 32px 24px;
	padding-top: calc(var(--top-bar-height) + 32px);
	padding-left: 24px;
	padding-bottom: 32px;
	width: 100%;
	max-width: 100%;
	min-height: 100vh;
	height: 100vh;
	/*overflow-y: auto;*/
	/*overflow-x: hidden;*/
	background: var(--main-bg);
	transition: padding-left 0.2s;
/*	word-break: break-all;*/
	overflow-wrap: break-word;
	white-space: normal !important;

}

/* On desktop, maintain existing settings */
@media (min-width: 992px) {
	.main-content-extra {
		padding-left: calc(var(--sidebar-width) + 32px);
		padding-top: calc(var(--top-bar-height) + 32px);
		height: 100vh;
		margin-bottom: var(--bottom-bar-height);
		padding-bottom: calc(var(--bottom-bar-height, 56px) + 20px);
		flex: 1 1 auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch; /* iOS momentum scroll */
	}
}

/* On small screens, reduce padding for more space */
@media (max-width: 767px) {
	.main-content-extra {
		padding: 12px 20px;
		padding-top: calc(var(--top-bar-height) + 10px);
		min-height: 100vh;
		height: 100vh;
		margin-bottom: var(--bottom-bar-height);
	}
}



/* Sidebar (Desktop) */
.sidebar {
	display: none;
}
@media (min-width: 992px) {
	.sidebar {
		display: flex;
		flex-direction: column;
		width: var(--sidebar-width);
		min-width: var(--sidebar-width);
		background: var(--sidebar-bg);
		min-height: 100vh;
		position: fixed;
		left: 0;
		top: 0;
		z-index: 100;
		color: var(--sidebar-txt);
		padding-bottom: 24px;
		border-right: 1.5px solid var(--sidebar-border);
	}
	.sidebar-logo {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		padding: 10px 0 16px 28px;
		min-height: var(--top-bar-height);
		border-bottom: 1px solid var(--sidebar-border);
	}
	.sidebar-logo img {
		height: auto;
		width: 200px;
	}
	.sidebar-sections {
		flex: 1 1 auto;
		overflow-y: auto;
		padding: 18px 0 0 0;
	}
	.sidebar-section {
		margin-bottom: 18px;
	}
	.sidebar-title {
		font-size: 13px;
		font-weight: 700;
		color: #98a5cb;
		text-transform: uppercase;
		margin-bottom: 8px;
		padding-left: 26px;
		letter-spacing: 0.06em;
	}
	.sidebar-menu {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.sidebar-link {
		display: flex;
		align-items: center;
		gap: 14px;
		font-size: 15px;
		color: var(--sidebar-txt);
		padding: 8px 14px 8px 26px;
		text-decoration: none;
		border-radius: 7px;
		font-weight: 500;
		transition: background 0.13s, color 0.13s;
	}
	.sidebar-link.active, .sidebar-link:hover {
		background: rgba(173,173,173, 0.17);
		color: var(--sidebar-active);
		text-decoration: none;
	}
	.sidebar-link.active {
		font-weight: 700;
	}
	.sidebar-link .bi {
		font-size: 19px;
	}
}
.sidebar-footer {
	padding: 20px 0 0 0;
	border-top: 1px solid var(--sidebar-border);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Topbar */
.top-row {
	position: fixed;
	left: 0;
	top: 0;
	width: 100vw;
	height: var(--top-bar-height);
	background: var(--topbar-bg);
	display: flex;
	align-items: center;
	z-index: 900;
	color: var(--topbar-txt);
	border-bottom: 1.5px solid var(--sidebar-border);
	padding: 0 16px;
}
@media (min-width: 992px) {
	.top-row {
		left: var(--sidebar-width);
		width: calc(100vw - var(--sidebar-width));
	}
}
.top-row .sidebar-logo {
	display: flex;
	align-items: center;
	height: 38px;
}
.top-row .sidebar-logo img {
	height: 36px;
	width: auto;
}
@media (min-width: 992px) {
	.top-row .sidebar-logo {
		display: none;
	}
}

.mode-toggle-group {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	user-select: none;
	font-weight: 500;
	font-size: 1.08em;
}
.mode-label {
	color: #fff;
	opacity: 0.9;
	font-size: 1em;
	transition: color 0.2s;
}
.mode-label.mode-label-active {
	font-weight: 700;
	opacity: 1;
}



.mode-label-online.mode-label-active {
	color: #00e676;
}
.mode-label-offline.mode-label-active {
	color: #ff7675;
}

.mode-label-status {
	color: #000;
	opacity: 0.9;
	font-size: 1em;
	transition: color 0.2s;
}

.mode-label-enabled.mode-label-active {
	color: #00e676;
}
.mode-label-disabled.mode-label-active {
	color: #ff7675;
}

.form-switch .form-check-input {
	width: 2.3em;
	height: 1.13em;
	background-color: #ccc;
	border-color: #888;
	box-shadow: none;
	outline: none;
	transition: background 0.3s, border 0.3s;
	position: relative;
}
.form-switch .form-check-input:checked {
	background-color: #e0d1ec;
	border-color: var(--umni-purple);
}
.form-switch .form-check-input:checked::after {
	left: 1.13em;
	background: var(--umni-purple);
}
.form-switch .form-check-input::after {
	content: '';
	display: block;
	position: absolute;
	top: 0.12em;
	left: 0.13em;
	width: 1em;
	height: 0.87em;
	background: #fff;
	border-radius: 1em;
	transition: left 0.3s;
}

/* Layout containers */
.chat-row {
	width: 100vw;
	height: 100vh;
	background: var(--main-bg);
	padding-top: var(--top-bar-height);
	padding-bottom: var(--bottom-bar-height);
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: flex-start;
	position: relative;
	overflow: hidden;
	align-items: stretch;
}
@media (min-width: 992px) {
	.chat-row {
		padding-left: var(--sidebar-width);
		width: 100%;
		padding-bottom: 0;
		align-items: stretch;
		height: 100vh;
	}
}

/* chat-window full stretch */
.chat-window {
	flex: 1 1 0;
	width: 100%;
	height: 100%;
	background: #fff;
	border-radius: 0;
	box-shadow: 0 3px 12px #14245111;
	margin: 0 auto;
	border: 1.5px solid var(--chat-border);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
}
@media (min-width: 992px) {
	.chat-window {
		/*top: -26px;*/
		flex-direction: row;
		margin: 0;
		/*border-radius: 13px;*/
		height: calc(100vh - var(--top-bar-height));
		max-height: calc(100vh - var(--top-bar-height));
		max-width: none;
		width: 100%;
	}
}

/* MOBILE USERS BUTTON - fixed under top bar, full width */
.mobile-users-btn-row {
	position: fixed;
	left: 0;
	top: var(--top-bar-height);
	width: 100vw;
	height: 44px; /* Adjust as needed to match button height */
	background: #f5f8ff;
	z-index: 1099;
	display: flex;
	align-items: center;
	border-bottom: 1.5px solid #e5eaf6;
	justify-content: space-between;
	padding: 0 13px 0 13px;
}
@media (min-width: 992px) {
	.mobile-users-btn-row {
		display: none !important;
	}
}

/* MOBILE USERS BUTTON - always fixed under top bar */
.mobile-users-btn {
	background: transparent;
	border: none;
	color: #253151;
	font-weight: 700;
	font-size: 1.13em;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}
@media (min-width: 992px) {
	.mobile-users-btn {
		display: none !important;
	}
	.chat-messages-list {
		padding-top: 24px; /* add extra top padding so content never hides behind */
		padding-bottom: 56px;
	}
}

/* Adjust chat-row to add top margin equal to users button height on mobile */
@media (max-width: 991.98px) {
	.chat-row {
		padding-top: calc(var(--top-bar-height) + 44px); /* 44px = height of mobile-users-btn-row */
	}
	.chat-messages-list {
		padding-top: 24px; /* add extra top padding so content never hides behind */
		padding-bottom: 56px;
	}
}
.mobile-chat-title {
	font-weight: 600;
	font-size: 1.11em;
	color: #253151;
	text-align: right;
	flex: 1 1 auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-left: 8px;
}


/* Chat User List */
.chat-user-list {
	width: 320px;
	min-width: 380px;
	background: #f8f9fb;
	border-right: 1.5px solid var(--chat-border);
	padding: 0;
	overflow-y: auto;
	overflow-x: hidden;
	max-height: none;
	display: flex;
	flex-direction: column; 
}
@media (max-width: 991.98px) {
	.chat-user-list {
		display: none;
	}
}
.chat-user-list-header {
	font-weight: 700;
	font-size: 1.1em;
	padding: 15px 30px 10px 30px;
}
@media (max-width: 991.98px) {
	.chat-user-list-header {
		font-weight: 700;
		font-size: 1.1em;
		padding: 10px 20px 5px 10px;
	}
}
.chat-user-search {
	padding: 0 14px 11px 18px;
}
.chat-user-search input {
	width: 100%;
	font-size: 15px;
	padding: 7px 13px;
	border-radius: 7px;
	border: 1px solid #e1e5f3;
	background: #f4f8ff;
}
.chat-user-items {
	flex: 1 1 auto;
	overflow-y: auto;
	min-height: 1px;
}
.chat-user {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 10px 9px 18px;
	cursor: pointer;
	transition: background 0.13s;
	border-bottom: 1px solid #f2f4fb;
	background: transparent;
}
.chat-user:last-child {
	border-bottom: none;
}
.chat-user.selected, .chat-user:hover {
	background: #e7effc;
}
.chat-user-avatar {
	width: 37px;
	height: 37px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #e1e5f3;
}
.chat-user-meta {
	flex: 1 1 auto;
	min-width: 0;
}
.chat-user-name {
	font-weight: 600;
	font-size: 15px;
	color: #253151;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.chat-user-lastmsg {
	font-size: 13.2px;
	color: #6b7bb2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* chat-messages-area always fill remaining space */
.chat-messages-area {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: 100%;
	height: 100%;
	position: relative;
	overflow-x: hidden !important;
}

#chatMessages {
	flex: 1 1 auto;
	overflow-y: auto;
	/* Reserve space for chat input and bottom bar */
	/*padding-bottom: calc(var(--bottom-bar-height, 56px) + 120px); /* 72px = approx height of chat-input-bar, adjust if needed */*/
	/* Remove hardcoded 120px if present */
}

.chat-input-bar {
	position: sticky;
	/*left: 0;*/
	right: 0;
	bottom: 0;
	background: #eaeaea;
	border-top: 5px solid #eaeaea;
	padding: 10px;
	z-index: 1002; /* above chat content, below modals */
	display: flex;
	flex-direction: column;
	gap: 6px;
	opacity: .95;
	/* Optionally add shadow: */
	/* box-shadow: 0 -2px 12px #0001; */
	border-top-left-radius: 18px;
	border-top-right-radius: 18px;
	/*width: calc(100% - var(--sidebar-width));*/
}





.chat-input-bar textarea {
	width: 100%;
	resize: none;
	min-height: 48px;
	max-height: 120px;
}

.chat-input-actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}
/* Padding on all sides for messages-list */
.chat-messages-list {
	flex: 1 1 auto;
	overflow-y: auto;
	padding-top: 32px;
	/*padding-bottom: 56px;*/
	padding-left: 28px;
	padding-right: 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 100%;
	box-sizing: border-box;
	height: 100%;
	width: 100%;
	min-width: 0;
	min-height: 0;
}


.chat-msg {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 15px;
}

.chat-msg.right {
	flex-direction: row-reverse;
}

.chat-msg-avatar-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 50px;
}

.chat-msg-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.chat-msg-name {
	font-size: 0.75em;
	font-weight: bold;
	text-align: center;
	margin-top: 4px;
	color: #444;
	word-break: break-all;      /* Break ANYWHERE if needed */
	overflow-wrap: break-word;  /* Also helps breaking long words */
}

.chat-msg-content {
	background: #f6fafd;
	border-radius: 8px;
	padding: 11px 18px;
	font-size: 15px;
	color: #243140;
	box-shadow: 0 2px 4px #1a2a3311;
	min-width: 240px;
	max-width: 400px;
	text-align: left;
}
.chat-msg.right .chat-msg-content {
	background: #e4f0ff;
	color: #1c2b49;
	font-weight: 500;
}

/* Media inside bubbles */
.chat-msg-content img,
.chat-msg-content video,
.chat-msg-content .acm-youtube-preview,
.chat-msg-content .acm-media-wrapper,
.chat-msg-content iframe {
	max-width: 100%;
	width: 100%;
	height: auto;
	display: block;
	border-radius: 10px;
	margin-top: 8px;
	margin-bottom: 8px;
	box-sizing: border-box;
}

.chat-msg-content .acm-youtube-preview {
	cursor: pointer;
	position: relative;
	aspect-ratio: 16/9;
	background: #000;
	overflow: hidden;
}

.chat-msg-content .acm-youtube-preview img {
	object-fit: cover;
	width: 100%;
	height: 100%;
	border-radius: 10px;
}

.chat-msg-content a,
.chat-msg-content a[href^="mailto:"] {
	word-break: break-all;
	/* or use: word-wrap: break-word; for older support */
	overflow-wrap: anywhere;
}

.chat-msg-meta {
	font-size: 13px;
	color: #99a7c9;
	font-weight: 500;
	margin-top: 4px;
	text-align: right;
	/*position: relative;*/
}

.holder-h35 {
	position: sticky;
	top: 0;
	background: #fff;
	padding: 6px 20px;
	font-size: 14px;
	font-weight: 600;
	color: #666;
	border-bottom: 1px solid #ddd;
	z-index: 2;
	display: none; /* hidden until first update */
	min-height: 24px;
	transition: opacity 0.15s ease;

	height: 35px;
}
.chat-floating-date {

	height: 35px;
	min-height: 35px;
	max-height: 35px;
	flex: 0 0 50%;
	left: 3px;
	position: absolute;

}
.chat-complete-button {
	
	min-height: 35px;
	max-height: 35px;
	flex: 0 0 50%;

}

.complete-button {
	height: 26px;
	padding: 2px 8px 2px 8px;
	background: var(--umni-purple);
	color: white;
	border-radius: 5px;
	display: inline-table;
	top: 3px;
	position: absolute;
	right: 3px;
	cursor: pointer;
}
.complete-button:hover {
	opacity: 0.8;
}
.chat-msg.right .chat-msg-date {
	left: 0;
	right: auto;
}
@media (max-width: 991.98px) {
	.chat-row {
		padding: var(--top-bar-height) 0 var(--bottom-bar-height) 0;
		align-items: stretch;
		height: 100vh;
	}
	.chat-window {
		border-radius: 0;
		min-height: 100%;
		max-height: 100%;
		height: 100%;
		width: 100%;
	}
	.chat-messages-area {
		/*padding: 10px;*/
		height: 100%;
		min-height: 0;
		margin-bottom: 56px;
	}
	.chat-messages-list {
		/*padding: 15px 7px 75px 7px; /* Top and bottom increased! */*/
		height: 100%;
		max-height: 100%;
	}
}

/* Mobile: Slideup Users */
.slideup-users {
	position: fixed;
	left: 0;
	top: var(--top-bar-height);
	width: 100vw;
	height: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height));
	min-height: calc(100vh - 108px);
	background: #fafbff !important;
	z-index: 50;
	display: flex;
	flex-direction: column;
	transform: translateY(100%);
	opacity: 0;
	pointer-events: none;
	border-radius: 0 !important;
	box-shadow: none !important;
	transition: transform 0.6s cubic-bezier(.42,.75,.42,1), opacity 0.4s;
}
.slideup-users.active {
	transform: translateY(0);
	opacity: 1;
	pointer-events: all;
	display: flex !important;
}

/* Bottom bar */
.bottom-row {
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100vw;
	height: var(--bottom-bar-height);
	background: var(--sidebar-bg);
	display: flex;
	align-items: stretch;
	z-index: 1003;
	border-top: 1.5px solid var(--sidebar-border);
	box-shadow: 0 -2px 14px #1c223b14;
}
.bottom-row button {
	flex: 1 1 0;
	border: none;
	background: transparent;
	color: var(--sidebar-txt);
	font-weight: 800;
	font-size: 0.9rem;
	border-right: 1px solid #263360;
	user-select: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: background 0.13s, color 0.13s;
	outline: none;
	cursor: pointer;
	padding: 0;
	margin: 0;
	height: 100%;
	letter-spacing: 0.01em;
	border-radius: 0;
	gap: 2px;
}
.bottom-row button:last-child {
	border-right: none;
}
.bottom-row button:focus-visible {
	background: #25304a;
	color: var(--sidebar-active);
}
.bottom-row button:hover {
	background: var(--sidebar-bg);
	color: var(--topbar-txt);
}
.bottom-row button.active {
	background: rgba(173,173,173, 0.37);
	color: var(--sidebar-active);
	text-decoration: none;
}
.bottom-row .bi {
	font-size: 1.25em;
}
@media (min-width: 992px) {
	.bottom-row, .slideup-menu, .slideup-users {
		display: none !important;
	}
}
/* Slideup Menus (More, Settings) */
.slideup-menu {
	position: fixed;
	left: 0;
	bottom: var(--bottom-bar-height);
	width: 100vw;
	background: #fff;
	border-top-left-radius: 18px;
	border-top-right-radius: 18px;
	box-shadow: 0 -6px 18px #22347c20;
	transform: translateY(100%);
	transition: transform 0.6s cubic-bezier(.42, .75, .42, 1), opacity 0.4s;
	pointer-events: none;
	opacity: 0;
	display: none;
	height: auto;
	max-height: calc(100vh - var(--top-bar-height) - var(--bottom-bar-height));
	overflow-y: auto;
}
.slideup-menu.active {
	transform: translateY(0);
	pointer-events: all;
	opacity: 1;
	display: block;
	z-index: 1002
}
.slideup-menu.closing {
	transform: translateY(100%);
	opacity: 0;
	pointer-events: none;
}
.slideup-menu .section-title {
	font-size: 12px;
	font-weight: 700;
	color: #7381a9;
	text-transform: uppercase;
	margin: 9px 0 4px 26px;
	letter-spacing: 0.04em;
}
.slideup-menu .menu-list {
	margin: 0 0 6px 0;
	padding: 0;
	list-style: none;
}
.slideup-menu .menu-btn {
	width: 100%;
	background: transparent;
	border: none;
	color: #1c2353;
	text-align: left;
	font-size: 17px;
	font-weight: 500;
	padding: 10px 26px;
	border-radius: 7px;
	margin: 0;
	transition: background 0.14s;
	display: flex;
	align-items: center;
	gap: 15px;
}
.slideup-menu .menu-btn:active, .slideup-menu .menu-btn:hover {
	background: #f0f4fd;
	color: #3557fc;
}
.slideup-menu .bi {
	font-size: 1.1em;
	opacity: 0.7;
}
.slideup-menu .close-slideup {
	display: block;
	margin: 0 auto 8px auto;
	color: #fff;
	background: #7381a9;
	border: none;
	border-radius: 50%;
	width: 38px;
	height: 38px;
	font-size: 1.6em;
	text-align: center;
	line-height: 38px;
	cursor: pointer;
	transition: background 0.2s;
}
.slideup-menu .close-slideup:hover {
	background: #2b3670;
	color: #fff;
}

.slideup-menu .menu-btn.active {
	background: #e9edfa;
	color: #520050;
	font-weight: 700;
}
@keyframes fadeInSlideFromTop {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.chat-msg-animate-in {
	animation: fadeInSlideFromTop 0.5s cubic-bezier(.42, .75, .42, 1);
}

.fit-content {
	max-width: -webkit-fill-available;
}

/* Already provided for left */
.acm-typing-indicator {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 24px;
	margin: 8px 0;
}
.acm-typing-indicator span {
	width: 6px;
	height: 6px;
	background-color: #888;
	border-radius: 50%;
	animation: acm-typing-bounce 1.2s infinite ease-in-out;
}
.acm-typing-indicator span:nth-child(2) {
	animation-delay: 0.2s;
}
.acm-typing-indicator span:nth-child(3) {
	animation-delay: 0.4s;
}
@keyframes acm-typing-bounce {
	0%, 80%, 100% {
		transform: scale(0.8);
		opacity: 0.4;
	}
	40% {
		transform: scale(1.2);
		opacity: 1;
	}
}
/* Add this for right-aligned indicator */
.acm-typing-indicator.right {
	justify-content: flex-end;
}

.modal-backdrop {
	z-index: 2000 !important;
}
.modal {
	z-index: 2001 !important;
}


.translate-icon {
	margin-left: 8px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.translate-icon.faded {
	opacity: 0.5;
}

@keyframes acm-pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.3);
	}
	100% {
		transform: scale(1);
	}
}

.acm-pulsing {
	animation: acm-pulse 0.6s ease-in-out;
}

.acm-pulsing-status {
	animation: acm-pulse 0.6s infinite ease-in-out;
}
.menu-icon {
	color: #c5c5c5;
}
.menu-icon:hover {
	color: #484848;
}

.bi-card-checklist.acm-notes-unseen {
	color: #d93030 !important;
}



.tooltip {
	--bs-tooltip-bg: var(--umni-purple);
	--bs-tooltip-color: #fff;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
	border-top-color: var(--umni-purple) !important;
}
.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
	border-bottom-color: var(--umni-purple) !important;
}
.tooltip.bs-tooltip-left .tooltip-arrow::before {
	border-left-color: var(--umni-purple) !important;
}
.tooltip.bs-tooltip-right .tooltip-arrow::before {
	border-right-color: var(--umni-purple) !important;
}

a, .chat-msg-content, .chat-user-lastmsg, .chat-user-name, #main-content {
/*	word-break: break-all;*/
	overflow-wrap: break-word;
	white-space: normal !important;
}

.acm-media-wrapper {
	min-width:370px;
}
@media (max-width: 991.98px) {
	.acm-media-wrapper {
		min-width: 200px;
	}
}

.chat-messages-area {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 56px); /* 100% - 56px (top bar) */
	min-height: 0;
	position: relative;
}



.chat-messages-list {
	flex: 1 1 0;
	min-height: 0;
	overflow-y: auto;
	/* height is managed by flex! */
}

.chat-input-bar {
	flex: 0 0 125px;
	height: 125px;
	max-height: 125px;
	min-height: 125px;
	background: #eaeaea;
	border-top: 1px solid #ccc;
	padding: 10px;
	margin-bottom: 56px;
}

@media (min-width: 992px) {
	.chat-input-bar {
		margin-bottom: 0px;
	}
}



#chatMessages,
.chat-messages-list {
	padding-bottom: 0px !important; /* 185px or a few px extra */
}

.chat-loading-overlay {
	position: absolute;
	z-index: 1000;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255,255,255,0.85);
	display: flex;
	align-items: center;
	justify-content: center;
}

.chat-loading-text {
  /*margin-top: 18px;*/
  font-size: 0.9rem;
  color: #520050;
  letter-spacing: 1px;
  font-weight: 600;
  font-family: inherit;
  text-shadow: 0 1px 2px #fff;
}

.new-messages {
	display: inline-block;
	min-width: 17px;
	min-height: 17px;
	padding: 3px;
	margin-left: 15px;
	background: #198754;
	color: #fff;
	font-weight: 500;
	font-size: 0.7em;
	border-radius: 5px;
	text-align: center;
	vertical-align: middle;
}

.hand {
	cursor: pointer;
}

.chat-user-list-header {
	color:#9e9e9e;
}
.active-chats-link {
	color: #00aa00;
}
.active-chats-link:hover {
	opacity: 0.7
}

.trans-toggle-translated {
	font-size: small;
	font-weight: bold;
	color:#9e9e9e;
}

.trans-toggle-original {
	font-size: small;
	font-weight: bold; 
	color:#9e9e9e;
}

.active-trans-link {
	color: #00aa00;
	font-weight: bold;
	font-size: small;
}

.trans-toggle-original:hover, .trans-toggle-translated:hover {
	opacity: 0.6;
}
#notesList {
	margin-right: 10px;
}
@media (min-width: 768px) {
	#notesListCol {
		max-height: 440px;
		overflow: auto;
	}
}
#agentNotesModalLabel {
	font-size: medium;
} 

.msgStatus {
	color: #6c757d;
	padding-right: 3px;
	font-size: large;
}
.msgStatusSeen {
	color: #650098;
	padding-right: 3px;
	font-size: large;
}

/* Template Modal: Responsive layout */
@media (max-width: 991.98px) {
	#templateModalLayout {
		flex-direction: column !important;
		display: flex;
	}
	#templateModalLeft, #templateModalRight {
		border: none !important;
		width: 100% !important;
		max-width: 100%;
	}
}
@media (min-width: 992px) {
	#templateModalLayout {
		display: flex;
		flex-direction: row !important;
	}
	#templateModalLeft {
		border-right: 1.5px solid #e6e9f1 !important;
		min-height: 320px;
		max-width: 370px;
	}
	#templateModalRight {
		min-width: 250px;
	}
}
#templateListContainer {
	max-height: 340px;
	overflow-y: auto;
}
#templateListContainer a {
	display: block;
	padding: 8px 12px;
	color: #520050;
	border-radius: 5px;
	cursor: pointer;
	font-weight: 500;
	margin-bottom: 3px;
	transition: background 0.13s;
	text-decoration: none;
}
#templateListContainer a:hover,
#templateListContainer a.selected {
	background: #f0f0fd;
	color: #2b003e;
}

.acm-image-overlay {
	position: fixed;
	z-index: 1080;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(30,34,52,0.85);
	display: flex;
	align-items: center;
	justify-content: center;
}
.acm-image-overlay-bg {
	position: absolute;
	inset: 0;
	background: transparent;
	z-index: 1;
}
.acm-image-overlay-content {
	position: relative;
	z-index: 2;
	max-width: 95vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}
#acmImageOverlayImg {
	max-width: 95vw;
	max-height: 80vh;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.acm-image-overlay-close {
	position: absolute;
	top: -15px;
	right: -15px;
	background: #fff;
	border-radius: 50%;
	z-index: 3;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
@media (max-width: 600px) {
	.acm-image-overlay-content {
		max-width: 100vw;
		max-height: 80vh;
	}
	#acmImageOverlayImg {
		max-width: 100vw;
		max-height: 60vh;
	}
}

.fancy-close {
	position: absolute;
	top: -18px;
	right: -18px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: transparent;
	z-index: 3;
	border: none;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fancy-close::before {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: #fff;
	z-index: -1;
	box-shadow: 0 2px 10px 0 rgba(0,0,0,0.11);
}
.fancy-close:hover,
.fancy-close:focus {
	background: #f2f4fa !important;
}

.template-eye-link i {
	font-size: 1.25em;
	opacity: 0.7;
	transition: opacity 0.15s;
}
.template-eye-link:hover i {
	opacity: 1;
	color: #2b003e;
}
.template-row {
	border-radius: 6px;
	transition: background 0.12s;
	padding-right: 5px;
}
.template-row:hover {
	background: #f7f1ff;
}

#templatePreviewModal {
	z-index: 2014 !important;
}
#templatePreviewModal .modal-backdrop,
#templatePreviewModal .modal-backdrop.show {
	z-index: 2004 !important;
}

#suggestAnswerModal .modal-body {
	height: auto;
	min-height: calc(60vh - 23px);
	max-height: calc(100vh - 50px - 56px); /* header/footer */
	overflow-y: auto;
	padding: 12px;

	display: flex;
	flex-direction: column;

}
#suggestedAnswerTextarea {
	flex: 1 1 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	border-radius: 0;
	margin: 0;
	resize: none;
	border: none;
	padding: 16px;
	font-size: 1.08em;
	background: #f1f1f1;
	box-sizing: border-box;
	overflow-y: scroll !important; /* Always show vertical scrollbar */
}
@media (max-width: 991.98px) {
	#templateModal .modal-dialog,
	#templatePreviewModal .modal-dialog {
		width: 100vw;
		max-width: 100vw;
		margin: 0;
		height: 100vh;
		max-height: 100vh;
		top:50px;
	}
	
	#suggestAnswerModal .modal-dialog {
		width: 100vw;
		max-width: 100vw;
		margin: 0;
		height: calc(100vh - 50px - 56px);
		max-height: calc(100vh - 50px - 56px);
		top: 6px;
	}
	
	#templateModal .modal-content,
	#templatePreviewModal .modal-content {
		border-radius: 0;
		height: 100vh;
		max-height: 100vh;
		min-height: 100vh;
		width: 100vw;
		max-width: 100vw;
		overflow-y: auto;
	}
	#templateModal .modal-body,
	#templatePreviewModal .modal-body {
		height: auto;
		min-height: 60vh;
		max-height: calc(100vh - 56px - 56px); /* header/footer */
		overflow-y: auto;
		padding: 12px;
	}
	
	#suggestAnswerModal .modal-body {
		height: auto;
		min-height: calc(60vh - 23px);
		max-height: calc(100vh - 50px - 56px); /* header/footer */
		overflow-y: auto;
		padding: 12px;
		
		display: flex;
		flex-direction: column;

	}
	#suggestedAnswerTextarea {
		flex: 1 1 0;
		width: 100%;
		height: 100%;
		min-height: 0;
		border-radius: 0;
		margin: 0;
		resize: none;
		border: none;
		padding: 16px;
		font-size: 1.08em;
		background: #f1f1f1;
		box-sizing: border-box;
		overflow-y: scroll !important; /* Always show vertical scrollbar */
	}
	#templateModal .modal-header,
	#templatePreviewModal .modal-header,
	#suggestAnswerModal .modal-header,
	#templateModal .modal-footer,
	#templatePreviewModal .modal-footer,
	#suggestAnswerModal .modal-footer, {
		padding-left: 12px;
		padding-right: 12px;
	}
}


.input-tags {
	min-height: 38px;
	border: 1px solid #ced4da;
	padding: 4px 6px;
}
.input-tags .tag {
	background-color: var(--umni-purple);
	color: white;
	padding: 3px 6px;
	border-radius: 3px;
	margin-right: 5px;
}

.halo-icon-bgr {
	width: 65px;
	height: 65px;
	position: absolute;
	background: white;
	border-radius: 50%;
	z-index: -1;
	padding-left: 0px;
	top: -1px;
	left: -1px;
	opacity: 1;
}

.pulse-halo {
	border-radius: 50%;
	overflow: visible;
	z-index: 2;
}

.pulse-halo::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(0deg);
	width: 120%;
	height: 125%;
	border-radius: 50%;
	background: conic-gradient(
	red, orange, yellow, green, cyan, blue, violet, red
	);
	/*background: var(--halo-bg);*/
	opacity: 0.7;
	z-index: -1;
	animation: rotateHalo 2.5s linear infinite;
	filter: blur(2px);
	box-shadow: 0 0 16px 8px rgba(255,255,255,0.5);
}

/* Animation for rotating the halo */
@keyframes rotateHalo {
	0% {
		transform: translate(-50%, -50%) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}


/* Softer borders + nice rounding via the card wrapper */
.table-fancy thead th {
	background-color: var(--bs-light);
}

/* Keep only horizontal separators inside table-bordered (cleaner look) */
.table-fancy.table-bordered > :not(caption) > * {
	border-width: 0; /* remove outer section borders */
}
.table-fancy.table-bordered > :not(caption) > * > * {
	border-width: 0 0 1px;              /* only bottom line per row/cell */
	border-color: var(--bs-border-color);
}

/* Row hover */
.table-fancy tbody tr:hover {
	background-color: rgba(0,0,0,.02);
}

/* Slightly tighter table density */
.table-fancy td, .table-fancy th {
	padding-top: .85rem;
	padding-bottom: .85rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

/* Make the header look attached to the rounded shell */
.card > .table-responsive {
	background: #fff;
}
