/* PT Unified Messaging, Email Mirror & Live Chat Hub (RTL & LTR) */
.pt-msg-app {
	--msg-navy: #0b1a30;
	--msg-bronze: #9e521b;
	--msg-border: #e2e8f0;
	--msg-bg: #f8fafc;
	--msg-text: #1e293b;
	--msg-muted: #64748b;
	font-family: 'ShebaRegular', 'sheba-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
	color: var(--msg-text);
	background: #ffffff;
	border: 1px solid var(--msg-border);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(11, 26, 48, 0.06);
	margin: 12px 0;
}

.pt-msg-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding: 14px 18px;
	background: linear-gradient(135deg, var(--msg-navy), #162d4e);
	color: #ffffff;
}

.pt-msg-topbar h2 {
	margin: 0;
	font-size: 16.5px;
	color: #ffffff;
	font-weight: 800;
}

.pt-msg-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 13px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: var(--msg-navy);
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
}

.pt-msg-btn-primary {
	background: var(--msg-bronze);
	border-color: var(--msg-bronze);
	color: #ffffff !important;
}

.pt-msg-btn-navy {
	background: var(--msg-navy);
	border-color: var(--msg-navy);
	color: #ffffff !important;
}

.pt-msg-btn-wa {
	background: #16a34a;
	border-color: #16a34a;
	color: #ffffff !important;
}

.pt-msg-btn-sm {
	height: 28px;
	padding: 0 9px;
	font-size: 11.5px;
}

.pt-msg-folders {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px 14px;
	background: var(--msg-bg);
	border-bottom: 1px solid var(--msg-border);
}

.pt-msg-folder-btn {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--msg-border);
	background: #ffffff;
	color: var(--msg-text);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.pt-msg-folder-btn.is-active {
	background: var(--msg-navy);
	border-color: var(--msg-navy);
	color: #ffffff;
}

.pt-msg-layout {
	display: grid;
	grid-template-columns: 320px 1fr;
	min-height: 520px;
}

.pt-msg-list-pane {
	border-inline-end: 1px solid var(--msg-border);
	display: flex;
	flex-direction: column;
	background: #fbfdff;
}

.pt-msg-search {
	padding: 10px;
	border-bottom: 1px solid var(--msg-border);
}

.pt-msg-search input {
	width: 100%;
	padding: 7px 10px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	font-size: 12.5px !important;
	box-sizing: border-box;
}

.pt-msg-thread-list {
	overflow-y: auto;
	max-height: 520px;
}

.pt-msg-thread-item {
	padding: 12px 14px;
	border-bottom: 1px solid #f1f5f9;
	cursor: pointer;
	transition: background 0.15s;
}

.pt-msg-thread-item:hover { background: #f1f5f9; }
.pt-msg-thread-item.is-active { background: #fffaf5; border-inline-start: 3px solid var(--msg-bronze); }
.pt-msg-thread-item.is-unread { background: #eff6ff; }
.pt-msg-thread-item.is-unread .pt-msg-t-subj { font-weight: 800; color: var(--msg-navy); }

.pt-msg-t-top {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	font-size: 11px;
	color: var(--msg-muted);
	margin-bottom: 3px;
}

.pt-msg-t-subj {
	font-size: 13px;
	font-weight: 700;
	color: var(--msg-text);
	margin-bottom: 3px;
}

.pt-msg-t-snip {
	font-size: 11.5px;
	color: var(--msg-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pt-msg-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 700;
}
.pt-msg-badge-visitor { background: #fef3c7; color: #92400e; }
.pt-msg-badge-email { background: #e0e7ff; color: #3730a3; }
.pt-msg-badge-dept { background: #dcfce7; color: #166534; }
.pt-msg-badge-closed { background: #fee2e2; color: #b91c1c; }

.pt-msg-chat-pane {
	display: flex;
	flex-direction: column;
	background: #ffffff;
}

.pt-msg-chat-head {
	padding: 12px 16px;
	border-bottom: 1px solid var(--msg-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	background: #f8fafc;
}

.pt-msg-messages {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
	max-height: 410px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pt-msg-bubble {
	max-width: 78%;
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.55;
	white-space: pre-wrap;
	word-break: break-word;
}

.pt-msg-bubble.is-me {
	align-self: flex-start;
	background: #fffaf5;
	border: 1px solid #fed7aa;
}

.pt-msg-bubble.is-other {
	align-self: flex-end;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
}

.pt-msg-bubble.is-system {
	align-self: stretch;
	max-width: 100%;
	background: #eef2ff;
	border: 1px solid #c7d2fe;
}

.pt-msg-b-meta {
	font-size: 11px;
	color: var(--msg-muted);
	margin-bottom: 4px;
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.pt-msg-composer {
	padding: 12px 14px;
	border-top: 1px solid var(--msg-border);
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pt-msg-composer textarea,
.pt-msg-input,
.pt-msg-select {
	width: 100%;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	padding: 8px 10px !important;
	font-size: 13px !important;
	box-sizing: border-box;
	background: #ffffff !important;
}

.pt-msg-panel-pad {
	padding: 18px 20px;
}

.pt-msg-loading,
.pt-msg-empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--msg-muted);
	font-size: 13.5px;
}

/* Floating Visitor & Customer Live Chat Widget (opposite side of WhatsApp) */
.pt-lc-wrap {
	position: fixed;
	bottom: 22px;
	z-index: 99990;
	font-family: 'ShebaRegular', 'sheba-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
}
.pt-lc-wrap.pt-lc-rtl { left: 22px; }
.pt-lc-wrap.pt-lc-ltr { right: 22px; }

.pt-lc-fab-stack {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.pt-lc-fab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, #16a34a, #15803d);
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 11px 18px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(22, 163, 74, 0.34);
	transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.pt-lc-fab:hover {
	transform: translateY(-2px);
}

.pt-lc-fab.is-online {
	background: linear-gradient(135deg, #16a34a, #15803d);
	box-shadow: 0 8px 24px rgba(22, 163, 74, 0.36);
}

.pt-lc-fab.is-offline {
	background: linear-gradient(135deg, #dc2626, #b91c1c);
	box-shadow: 0 8px 24px rgba(220, 38, 38, 0.34);
}

.pt-lc-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
}
.pt-lc-dot.is-online {
	background: #bbf7d0;
	box-shadow: 0 0 0 3px rgba(187, 247, 208, 0.45);
}
.pt-lc-dot.is-offline {
	background: #fecaca;
}

.pt-lc-status-caption {
	font-size: 11px;
	font-weight: 800;
	padding: 2px 10px;
	border-radius: 999px;
	background: #ffffff;
	box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
	white-space: nowrap;
}
.pt-lc-status-caption.is-online {
	color: #15803d;
	border: 1px solid #86efac;
}
.pt-lc-status-caption.is-offline {
	color: #b91c1c;
	border: 1px solid #fca5a5;
}

.pt-lc-head.is-online {
	background: linear-gradient(135deg, #14532d, #16a34a);
}
.pt-lc-head.is-offline {
	background: linear-gradient(135deg, #7f1d1d, #dc2626);
}

.pt-lc-box {
	width: 340px;
	max-width: calc(100vw - 32px);
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 16px 44px rgba(11, 26, 48, 0.24);
	border: 1px solid #e2e8f0;
	margin-bottom: 10px;
}

.pt-lc-head {
	background: linear-gradient(135deg, #0b1a30, #162d4e);
	color: #ffffff;
	padding: 13px 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.pt-lc-sub { font-size: 11px; color: #cbd5e1; margin-top: 2px; }
.pt-lc-close { background: transparent; border: none; color: #fff; font-size: 15px; cursor: pointer; }
.pt-lc-body { padding: 12px; }

@media (max-width: 780px) {
	.pt-msg-layout { grid-template-columns: 1fr; }
	.pt-msg-list-pane { border-inline-end: none; border-bottom: 1px solid var(--msg-border); max-height: 260px; }
}


/* ============================================================================
 * RESPONSIVE HIGH-VOLUME WORKSPACE, LIVE FOOTER STATUS BAR & SUPERVISOR NOTICE
 * ============================================================================ */
.pt-msg-app {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 110px);
}

.pt-msg-layout {
	flex: 1 1 auto;
	min-height: 460px;
}

.pt-msg-list-pane {
	max-height: calc(100vh - 260px);
	overflow-y: auto;
}

.pt-msg-messages {
	max-height: calc(100vh - 380px);
	overflow-y: auto;
}

/* Official Manager / Supervisor Highlighted Notice Bubble (visible to Visitor & Agent) */
.pt-msg-bubble.is-supervisor-notice,
.pt-lc-sup-notice {
	background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
	border: 1.5px solid #d97706 !important;
	border-inline-start: 5px solid #9e521b !important;
	color: #0b1a30 !important;
	align-self: stretch !important;
	max-width: 100% !important;
	box-shadow: 0 4px 14px rgba(158, 82, 27, 0.14);
}

.pt-sup-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #9e521b;
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 999px;
	margin-inline-end: 6px;
}

/* Pinned Live Status Footer Bar */
.pt-msg-footer-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 16px;
	background: #0b1a30;
	color: #f8fafc;
	border-top: 2px solid #9e521b;
	font-size: 12.5px;
	margin-top: auto;
}

.pt-msg-footer-pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.pt-msg-f-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #ffffff;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s;
}
.pt-msg-f-pill:hover {
	background: rgba(255, 255, 255, 0.2);
}
.pt-msg-f-pill.is-green { border-color: #4ade80; color: #bbf7d0; }
.pt-msg-f-pill.is-teal  { border-color: #2dd4bf; color: #ccfbf1; }
.pt-msg-f-pill.is-gold  { border-color: #fbbf24; color: #fef3c7; }

@media (max-width: 960px) {
	.pt-msg-topbar {
		flex-direction: column;
		align-items: stretch !important;
		gap: 8px;
	}
	.pt-msg-folders {
		overflow-x: auto;
		flex-wrap: nowrap !important;
		padding-bottom: 6px;
	}
	.pt-msg-folder-btn {
		white-space: nowrap;
		flex-shrink: 0;
	}
	.pt-msg-list-pane {
		max-height: 280px;
	}
	.pt-msg-messages {
		max-height: 360px;
	}
}
