/**
 * MyCreaTools Chat - Frontend CSS
 * Design System: 8px default border-radius, clean borders, no forced box-shadows, mobile offcanvas.
 */

:root {
	--mct-chat-radius: 8px;
	--mct-chat-primary: var(--e-global-color-primary, var(--color-primary, #dc2626));
	--mct-chat-primary-hover: var(--color-primary-darker, var(--e-global-color-accent, #b91c1c));
	--mct-chat-bg: #ffffff;
	--mct-chat-sidebar-bg: #f8fafc;
	--mct-chat-border: #e2e8f0;
	--mct-chat-text: var(--e-global-color-text, #0f172a);
	--mct-chat-text-muted: #64748b;
	--mct-chat-bubble-me: var(--e-global-color-primary, var(--color-primary, #dc2626));
	--mct-chat-bubble-me-text: #ffffff;
	--mct-chat-bubble-other: #f1f5f9;
	--mct-chat-bubble-other-text: var(--e-global-color-text, #0f172a);
	--mct-chat-online: #22c55e;
	--mct-chat-offline: #94a3b8;
	--mct-chat-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset theme button overrides inside chat container */
.mct-chat-app button,
.mct-chat-app .mct-btn,
.mct-chat-app input[type="button"],
.mct-chat-app input[type="submit"] {
	box-shadow: none !important;
	text-shadow: none !important;
	background-image: none !important;
	outline: none !important;
}

/* ==========================================================================
   Base App Layout Structure
   ========================================================================== */
.mct-chat-app {
	display: flex;
	position: relative;
	width: 100%;
	height: 680px;
	background-color: var(--mct-chat-bg);
	border: 1px solid var(--mct-chat-border);
	border-radius: var(--mct-chat-radius);
	font-family: var(--mct-chat-font);
	color: var(--mct-chat-text);
	overflow: hidden;
	box-sizing: border-box;
}

.mct-chat-app * {
	box-sizing: border-box;
}

/* ==========================================================================
   Left Sidebar / Offcanvas Drawer
   ========================================================================== */
.mct-chat-sidebar {
	width: 320px;
	height: 100%;
	background-color: var(--mct-chat-sidebar-bg);
	border-right: 1px solid var(--mct-chat-border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	z-index: 20;
	transition: transform 0.3s ease;
}

.mct-chat-sidebar-header {
	padding: 16px;
	border-bottom: 1px solid var(--mct-chat-border);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mct-chat-sidebar-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.mct-chat-sidebar-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--mct-chat-text);
}

.mct-chat-btn-new-chat {
	background: rgba(220, 38, 38, 0.1) !important;
	color: var(--mct-chat-primary) !important;
	border: 1px solid rgba(220, 38, 38, 0.2) !important;
	width: 34px !important;
	height: 34px !important;
	border-radius: var(--mct-chat-radius) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	cursor: pointer !important;
	transition: background 0.2s ease;
}

.mct-chat-btn-new-chat:hover {
	background: rgba(220, 38, 38, 0.2) !important;
}

.mct-chat-offcanvas-close {
	display: none;
	background: transparent !important;
	border: none !important;
	font-size: 20px !important;
	color: var(--mct-chat-text-muted) !important;
	cursor: pointer !important;
	padding: 0 !important;
}

/* Sidebar Filter Tabs */
.mct-chat-tabs-bar {
	display: flex;
	background: #e2e8f0;
	padding: 3px;
	border-radius: var(--mct-chat-radius);
	gap: 3px;
}

.mct-chat-tab-btn {
	flex: 1;
	border: none !important;
	background: transparent !important;
	padding: 6px 10px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	color: var(--mct-chat-text-muted) !important;
	border-radius: calc(var(--mct-chat-radius) - 2px) !important;
	cursor: pointer !important;
	transition: all 0.2s ease;
}

.mct-chat-tab-btn.active {
	background: #ffffff !important;
	color: var(--mct-chat-text) !important;
	border: 1px solid var(--mct-chat-border) !important;
}

/* Sidebar Search Box */
.mct-chat-search-wrap {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	width: 100% !important;
}

.mct-chat-search-wrap .search-icon {
	position: absolute !important;
	left: 12px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	color: var(--mct-chat-text-muted) !important;
	font-size: 14px !important;
	pointer-events: none !important;
	z-index: 5 !important;
}

.mct-chat-search-wrap input#mct-chat-search-input {
	width: 100% !important;
	padding: 8px 12px 8px 36px !important;
	border: 1px solid var(--mct-chat-border) !important;
	border-radius: var(--mct-chat-radius) !important;
	background: #ffffff !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	color: var(--mct-chat-text) !important;
	outline: none !important;
	transition: border-color 0.2s ease;
	box-sizing: border-box !important;
	height: 38px !important;
	margin: 0 !important;
}

.mct-chat-search-wrap input#mct-chat-search-input:focus {
	border-color: var(--mct-chat-primary) !important;
}

/* Conversations Stream List */
.mct-chat-conversations-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
}

.mct-chat-conversation-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: var(--mct-chat-radius);
	cursor: pointer;
	transition: background 0.15s ease;
	position: relative;
	margin-bottom: 4px;
}

.mct-chat-conversation-item:hover {
	background: #f1f5f9;
}

.mct-chat-conversation-item.active {
	background: #e2e8f0;
}

.mct-chat-item-avatar {
	position: relative !important;
	width: 42px !important;
	height: 42px !important;
	border-radius: 50% !important;
	flex-shrink: 0 !important;
	background: #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mct-chat-item-avatar img {
	width: 100% !important;
	height: 100% !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	display: block !important;
}

.mct-avatar-initials {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--mct-chat-primary);
	color: #ffffff;
	font-weight: 700;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-transform: uppercase;
}

.mct-online-indicator {
	position: absolute;
	bottom: 2px;
	right: 2px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--mct-chat-offline);
	border: 2px solid #ffffff;
	z-index: 2;
}

.mct-online-indicator.online {
	background-color: var(--mct-chat-online);
}

.mct-chat-item-content {
	flex: 1;
	min-width: 0;
}

.mct-chat-item-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2px;
}

.mct-chat-item-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--mct-chat-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mct-chat-item-time {
	font-size: 11px;
	color: var(--mct-chat-text-muted);
}

.mct-chat-item-preview {
	font-size: 12px;
	color: var(--mct-chat-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mct-chat-unread-badge {
	background-color: var(--mct-chat-primary);
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 10px;
	margin-left: 6px;
}

/* Loading & Empty state */
.mct-chat-loading-state,
.mct-chat-empty-state {
	padding: 40px 20px;
	text-align: center;
	color: var(--mct-chat-text-muted);
}

.mct-spinner {
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 3px solid rgba(220, 38, 38, 0.2);
	border-top-color: var(--mct-chat-primary);
	border-radius: 50%;
	animation: mctSpin 0.8s infinite linear;
}

@keyframes mctSpin {
	to { transform: rotate(360deg); }
}

/* ==========================================================================
   Right Active Conversation Main Room Panel
   ========================================================================== */
.mct-chat-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	height: 100%;
	background-color: var(--mct-chat-bg);
	min-width: 0;
	position: relative;
}

.mct-chat-room-header {
	height: 64px;
	padding: 0 16px;
	border-bottom: 1px solid var(--mct-chat-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
	flex-shrink: 0;
}

.mct-chat-room-header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mct-chat-offcanvas-toggle {
	display: none;
	background: #ffffff !important;
	border: 1px solid var(--mct-chat-border) !important;
	width: 36px !important;
	height: 36px !important;
	border-radius: var(--mct-chat-radius) !important;
	color: var(--mct-chat-text) !important;
	cursor: pointer !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
}

.mct-chat-user-avatar-wrap {
	position: relative !important;
	width: 40px !important;
	height: 40px !important;
	border-radius: 50% !important;
	flex-shrink: 0 !important;
	overflow: hidden !important;
	background: #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.mct-chat-user-avatar-wrap img {
	width: 100% !important;
	height: 100% !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	display: block !important;
}

.mct-chat-header-info {
	display: flex;
	flex-direction: column;
}

.mct-chat-header-name {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--mct-chat-text);
	cursor: pointer;
}

.mct-chat-header-subtext {
	font-size: 12px;
	color: var(--mct-chat-text-muted);
}

/* Dropdown Menu Header Actions */
.mct-chat-dropdown-wrap {
	position: relative;
}

.mct-chat-btn-icon {
	background: #ffffff !important;
	border: 1px solid var(--mct-chat-border) !important;
	width: 36px !important;
	height: 36px !important;
	border-radius: var(--mct-chat-radius) !important;
	color: var(--mct-chat-text-muted) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	cursor: pointer !important;
	transition: all 0.2s ease;
}

.mct-chat-btn-icon:hover {
	color: var(--mct-chat-text) !important;
	border-color: #cbd5e1 !important;
	background: #f8fafc !important;
}

.mct-chat-dropdown-menu {
	position: absolute;
	right: 0;
	top: 44px;
	background: #ffffff;
	border: 1px solid var(--mct-chat-border);
	border-radius: var(--mct-chat-radius);
	min-width: 200px;
	padding: 6px;
	display: none;
	z-index: 50;
}

.mct-chat-dropdown-menu.is-open {
	display: block;
}

.mct-chat-dropdown-item {
	width: 100%;
	text-align: left;
	background: transparent !important;
	border: none !important;
	padding: 8px 12px !important;
	font-size: 13px !important;
	color: var(--mct-chat-text) !important;
	border-radius: calc(var(--mct-chat-radius) - 2px) !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
}

.mct-chat-dropdown-item:hover {
	background: #f1f5f9 !important;
}

.mct-chat-dropdown-item.danger {
	color: #ef4444 !important;
}

.mct-chat-dropdown-item.danger:hover {
	background: #fef2f2 !important;
}

/* ==========================================================================
   Product Banner Bar inside Chat Room
   ========================================================================== */
.mct-chat-product-banner {
	padding: 10px 16px;
	background: #f8fafc;
	border-bottom: 1px solid var(--mct-chat-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mct-chat-product-banner-left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.mct-chat-product-banner-left img {
	width: 44px;
	height: 44px;
	border-radius: var(--mct-chat-radius);
	object-fit: cover;
	border: 1px solid var(--mct-chat-border);
}

.mct-chat-pb-details {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mct-chat-pb-label {
	font-size: 11px;
	color: var(--mct-chat-text-muted);
}

.mct-chat-pb-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--mct-chat-text);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mct-chat-pb-title:hover {
	color: var(--mct-chat-primary);
}

.mct-chat-pb-price {
	font-size: 12px;
	font-weight: 700;
	color: var(--mct-chat-primary);
}

/* ==========================================================================
   Messages Stream Container & Bubbles
   ========================================================================== */
.mct-chat-messages-container {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #ffffff;
}

/* Date Separator Break Line */
.mct-chat-date-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 16px 0 8px 0;
	position: relative;
	width: 100%;
}

.mct-chat-date-divider::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 100%;
	height: 1px;
	background-color: var(--mct-chat-border, #e2e8f0);
	z-index: 1;
}

.mct-chat-date-divider span {
	position: relative;
	z-index: 2;
	background: #ffffff;
	padding: 4px 14px;
	border-radius: 12px;
	border: 1px solid var(--mct-chat-border, #e2e8f0);
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
	text-transform: capitalize;
}

.mct-msg-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 75%;
}

.mct-msg-group.me {
	align-self: flex-end;
	align-items: flex-end;
}

.mct-msg-group.other {
	align-self: flex-start;
	align-items: flex-start;
}

.mct-msg-bubble {
	padding: 10px 14px;
	border-radius: var(--mct-chat-radius);
	font-size: 14px;
	line-height: 1.45;
	word-break: break-word;
}

.mct-msg-bubble.me {
	background-color: var(--mct-chat-bubble-me);
	color: var(--mct-chat-bubble-me-text);
}

.mct-msg-bubble.other {
	background-color: var(--mct-chat-bubble-other);
	color: var(--mct-chat-bubble-other-text);
	border: 1px solid var(--mct-chat-border);
}

/* Image attachment in bubble */
.mct-msg-image {
	max-width: 140px;
	max-height: 140px;
	width: auto;
	height: auto;
	object-fit: cover;
	border-radius: var(--mct-chat-radius);
	cursor: pointer;
	display: block;
	margin-top: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: transform 0.15s ease;
}

.mct-msg-image:hover {
	transform: scale(1.03);
}

.mct-msg-time {
	font-size: 10px;
	color: var(--mct-chat-text-muted);
	margin-top: 2px;
}

/* ==========================================================================
   Product Offer Card Block inside Chat Stream — Premium Redesign
   ========================================================================== */
.mct-chat-offer-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px !important;
	min-width: 280px;
	max-width: 340px;
	margin-top: 4px;
	overflow: hidden;
	transition: border-color 0.2s ease;
	box-shadow: none !important;
}

.mct-chat-offer-card:hover {
	box-shadow: none !important;
	border-color: #cbd5e1;
}

/* Card Header: Tag + Status */
.mct-offer-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 14px;
	background: #fff7ed;
	border-bottom: 1px solid #ffedd5;
}

.mct-offer-badge-tag {
	font-size: 11px;
	font-weight: 700;
	color: #c2410c;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #ffedd5;
	padding: 3px 8px;
	border-radius: 8px !important;
	white-space: nowrap;
	letter-spacing: 0.01em;
	box-shadow: none !important;
}

/* Status Pills */
.mct-offer-status-pill {
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 8px !important;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	letter-spacing: 0.03em;
	white-space: nowrap;
	box-shadow: none !important;
}

.mct-offer-status-pending {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fcd34d;
}

.mct-offer-status-accepted {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

.mct-offer-status-declined {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

/* Product Row */
.mct-offer-card-product {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none !important;
	padding: 12px 14px;
	transition: background 0.15s ease;
}

.mct-offer-card-product:hover {
	background: #f8fafc;
}

.mct-offer-thumb-wrap {
	width: 52px;
	height: 52px;
	border-radius: 8px !important;
	overflow: hidden;
	flex-shrink: 0;
	background-color: #f1f5f9;
	border: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: none !important;
}

.mct-offer-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mct-offer-thumb-placeholder {
	color: #94a3b8;
	font-size: 20px;
}

.mct-offer-product-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.mct-offer-prod-title {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.2s ease;
}

.mct-offer-card-product:hover .mct-offer-prod-title {
	color: #dc2626;
}

/* Price Comparison Block */
.mct-offer-price-compare {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 14px;
	background: #f8fafc;
	border-top: 1px solid #f1f5f9;
	border-bottom: 1px solid #f1f5f9;
}

.mct-offer-price-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.mct-offer-price-label {
	font-size: 10px;
	font-weight: 600;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.mct-offer-price-value {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.2;
}

.mct-offer-price-original {
	color: #475569;
}

.mct-offer-price-offered {
	color: #dc2626;
	background: #fef2f2;
	padding: 3px 10px;
	border-radius: 8px !important;
	border: 1px solid rgba(220, 38, 38, 0.2);
	box-shadow: none !important;
}

.mct-offer-price-arrow {
	color: #cbd5e1;
	font-size: 12px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

/* Note / Message Box */
.mct-offer-note-box {
	padding: 10px 14px;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	background: #ffffff;
}

.mct-offer-note-icon {
	flex-shrink: 0;
	color: #94a3b8;
	font-size: 14px;
	margin-top: 1px;
}

.mct-offer-note-text {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: #475569;
	font-style: italic;
	word-break: break-word;
}

/* Action Buttons */
.mct-offer-actions {
	display: flex;
	gap: 8px;
	padding: 10px 14px;
	border-top: 1px solid #f1f5f9;
	background: #ffffff;
}

.mct-offer-action-btn {
	flex: 1;
	padding: 9px 14px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	border-radius: 8px !important;
	border: none !important;
	cursor: pointer !important;
	transition: background 0.15s ease, opacity 0.15s ease;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	letter-spacing: 0.01em;
	box-shadow: none !important;
	text-shadow: none !important;
}

.mct-offer-action-accept {
	background: #16a34a !important;
	color: #ffffff !important;
}

.mct-offer-action-accept:hover {
	background: #15803d !important;
}

.mct-offer-action-decline {
	background: #dc2626 !important;
	color: #ffffff !important;
}

.mct-offer-action-decline:hover {
	background: #b91c1c !important;
}

.mct-offer-action-revise,
.mct-offer-action-new {
	background: #0f172a !important;
	color: #ffffff !important;
}

.mct-offer-action-revise:hover,
.mct-offer-action-new:hover {
	background: #1e293b !important;
}

/* Accepted Banner */
.mct-offer-accepted-banner {
	margin: 0;
	padding: 10px 14px;
	background: #ecfdf5;
	border-top: 1px solid #a7f3d0;
	border-radius: 0 0 8px 8px !important;
	color: #047857;
	font-weight: 700;
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 6px;
	justify-content: center;
	box-shadow: none !important;
}

/* Custom Checkout Button for Buyer */
.mct-offer-checkout-wrapper {
	padding: 8px 12px 10px;
	background: #f8fafc;
	border-top: 1px dashed #cbd5e1;
	display: flex;
	justify-content: center;
	border-radius: 0 0 8px 8px;
}

.mct-offer-buy-now-btn {
	background: var(--color-primary, var(--e-global-color-primary, var(--mct-chat-primary))) !important;
	color: #ffffff !important;
	font-weight: 700 !important;
	font-size: 13px !important;
	padding: 10px 16px !important;
	border-radius: 8px !important;
	text-decoration: none !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	transition: all 0.25s ease !important;
	width: 100%;
	justify-content: center;
	box-sizing: border-box;
	cursor: pointer !important;
	border: none !important;
}

.mct-offer-buy-now-btn:hover {
	background: var(--color-primary-darker, var(--e-global-color-accent, var(--mct-chat-primary-hover))) !important;
	transform: translateY(-1px);
	color: #ffffff !important;
}

.mct-offer-buy-now-btn:active {
	transform: translateY(0);
}

.mct-btn {
	padding: 6px 12px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	border-radius: var(--mct-chat-radius) !important;
	border: none !important;
	cursor: pointer !important;
	transition: all 0.2s ease;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
}

.mct-btn-primary { background: var(--color-primary, var(--e-global-color-primary, var(--mct-chat-primary))) !important; color: #ffffff !important; }
.mct-btn-primary:hover { background: var(--color-primary-darker, var(--e-global-color-accent, var(--mct-chat-primary-hover))) !important; }
.mct-btn-accent { background: #0f172a !important; color: #ffffff !important; }
.mct-btn-accent:hover { background: #334155 !important; }
.mct-btn-secondary { background: #e2e8f0 !important; color: #334155 !important; }
.mct-btn-secondary:hover { background: #cbd5e1 !important; }
.mct-btn-danger { background: #ef4444 !important; color: #ffffff !important; }

/* Typing Indicator Animation */
.mct-chat-typing-indicator {
	padding: 6px 16px;
	font-size: 12px;
	color: var(--mct-chat-text-muted);
	display: flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
}

.mct-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.mct-typing-dots span {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: var(--mct-chat-text-muted);
	animation: mctBounce 1.4s infinite ease-in-out both;
}

.mct-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.mct-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Upload Progress Bar Overlay */
.mct-chat-upload-progress-wrap {
	padding: 10px 16px;
	background: #f8fafc;
	border-top: 1px solid var(--mct-chat-border);
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex-shrink: 0;
}

.mct-chat-upload-progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--mct-chat-text);
}

.mct-chat-upload-progress-bar-bg {
	width: 100%;
	height: 6px;
	background: #e2e8f0;
	border-radius: 4px;
	overflow: hidden;
}

.mct-chat-upload-progress-bar-fill {
	height: 100%;
	background: var(--mct-chat-primary);
	width: 0%;
	transition: width 0.2s ease;
	border-radius: 4px;
}

/* Footer Input Bar */
.mct-chat-input-bar {
	padding: 12px 16px;
	border-top: 1px solid var(--mct-chat-border);
	background: #ffffff;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.mct-chat-input-field-wrap {
	flex: 1;
	display: flex;
	align-items: center;
}

.mct-chat-input-field-wrap textarea {
	width: 100% !important;
	padding: 8px 12px !important;
	border: 1px solid var(--mct-chat-border) !important;
	border-radius: var(--mct-chat-radius) !important;
	font-size: 14px !important;
	font-family: inherit !important;
	color: var(--mct-chat-text) !important;
	outline: none !important;
	resize: none !important;
	max-height: 100px !important;
	transition: border-color 0.2s ease;
	box-shadow: none !important;
}

.mct-chat-input-field-wrap textarea:focus {
	border-color: var(--mct-chat-primary) !important;
}

.mct-chat-btn-send {
	background: var(--mct-chat-primary) !important;
	color: #ffffff !important;
	border: none !important;
	width: 38px !important;
	height: 38px !important;
	border-radius: var(--mct-chat-radius) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	transition: background 0.2s ease;
	padding: 0 !important;
}

.mct-chat-btn-send:hover {
	background: var(--mct-chat-primary-hover) !important;
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.mct-chat-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 16px;
}

.mct-chat-modal-overlay.is-open {
	display: flex;
}

.mct-chat-modal-card {
	background: #ffffff;
	border-radius: var(--mct-chat-radius);
	width: 100%;
	max-width: 480px;
	overflow: hidden;
}

.mct-chat-modal-header {
	padding: 16px;
	border-bottom: 1px solid var(--mct-chat-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.mct-chat-modal-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.mct-chat-modal-close {
	background: transparent !important;
	border: none !important;
	font-size: 24px !important;
	cursor: pointer !important;
	color: var(--mct-chat-text-muted) !important;
	padding: 0 !important;
}

.mct-chat-modal-body {
	padding: 16px;
}

.mct-chat-modal-footer {
	padding: 12px 16px;
	border-top: 1px solid var(--mct-chat-border);
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.mct-form-group {
	margin-bottom: 14px;
}

.mct-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}

.mct-form-control {
	width: 100% !important;
	padding: 8px 12px !important;
	border: 1px solid var(--mct-chat-border) !important;
	border-radius: var(--mct-chat-radius) !important;
	font-size: 14px !important;
	color: var(--mct-chat-text) !important;
}

/* Contacts Picker List */
.mct-chat-contacts-search-wrap input {
	width: 100% !important;
	padding: 8px 12px !important;
	border: 1px solid var(--mct-chat-border) !important;
	border-radius: var(--mct-chat-radius) !important;
	margin-bottom: 12px !important;
	font-size: 13px !important;
}

.mct-chat-contacts-list {
	max-height: 280px;
	overflow-y: auto;
}

.mct-chat-contact-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--mct-chat-radius);
	cursor: pointer;
}

.mct-chat-contact-item:hover {
	background: #f1f5f9;
}

.mct-chat-contact-avatar {
	width: 36px !important;
	height: 36px !important;
	border-radius: 50% !important;
	object-fit: cover !important;
}

.mct-chat-contact-info {
	flex: 1;
}

.mct-chat-contact-name {
	font-size: 14px;
	font-weight: 600;
}

.mct-chat-contact-rel {
	font-size: 11px;
	color: var(--mct-chat-text-muted);
}

/* Lightbox Preview */
.mct-chat-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.85);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.mct-chat-lightbox.is-open {
	display: flex;
}

.mct-chat-lightbox img {
	max-width: 90vw;
	max-height: 90vh;
	border-radius: var(--mct-chat-radius);
}

.mct-chat-lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: transparent !important;
	color: #ffffff !important;
	border: none !important;
	font-size: 36px !important;
	cursor: pointer !important;
	padding: 0 !important;
}

/* ==========================================================================
   Responsive Offcanvas Mobile Drawer (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
	.mct-chat-offcanvas-backdrop {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(15, 23, 42, 0.4);
		display: none;
		z-index: 15;
	}

	.mct-chat-offcanvas-backdrop.is-open {
		display: block;
	}

	.mct-chat-sidebar {
		position: absolute;
		top: 0;
		left: 0;
		width: 85%;
		max-width: 320px;
		height: 100%;
		transform: translateX(-100%);
		box-shadow: 4px 0 20px rgba(0,0,0,0.15);
	}

	.mct-chat-sidebar.is-open {
		transform: translateX(0);
	}

	.mct-chat-offcanvas-close,
	.mct-chat-offcanvas-toggle {
		display: inline-flex !important;
	}
}

@media (min-width: 769px) {
	.mct-chat-offcanvas-toggle,
	.mct-chat-offcanvas-close {
		display: none !important;
	}
}
