/**
 * WP-Conversations Live Support Floating Widget Styles
 * Ultra-modern, rounded, compact, and high-visibility UI/UX.
 */

:root {
	--cr-primary: #18ac84;
	--cr-primary-hover: #138f6d;
	--cr-primary-light: #e6f7f2;
	--cr-text: #0f172a;
	--cr-text-muted: #64748b;
	--cr-bg: #ffffff;
	--cr-border: #e2e8f0;
	--cr-radius-card: 20px;
	--cr-radius-btn: 12px;
	--cr-radius-chip: 9999px;
}

/* Base Floating Widget Container */
.cr-chat-widget {
	position: fixed !important;
	z-index: 2147483647 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	direction: ltr;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	transition: bottom 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s ease !important;
}

.cr-chat-widget * {
	box-sizing: border-box !important;
}

.cr-chat-widget.bottom-right {
	bottom: 30px;
	right: 28px;
}

.cr-chat-widget.bottom-left {
	bottom: 30px;
	left: 28px;
}

/* Auto-elevate position when visitor scrolls down to avoid Back-To-Top button collision */
.cr-chat-widget.cr-scrolled.bottom-right,
.cr-chat-widget.cr-scrolled-up.bottom-right {
	bottom: 96px !important;
}

.cr-chat-widget.cr-scrolled.bottom-left,
.cr-chat-widget.cr-scrolled-up.bottom-left {
	bottom: 96px !important;
}

/* Tablet (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
	.cr-chat-widget.bottom-right {
		bottom: 32px !important;
		right: 24px !important;
	}
	.cr-chat-widget.bottom-left {
		bottom: 32px !important;
		left: 24px !important;
	}
	.cr-chat-widget.cr-scrolled.bottom-right,
	.cr-chat-widget.cr-scrolled-up.bottom-right,
	.cr-chat-widget.cr-scrolled.bottom-left,
	.cr-chat-widget.cr-scrolled-up.bottom-left {
		bottom: 96px !important;
	}
}

/* Floating Teaser / Greeting Bubble */
.cr-teaser-bubble {
	position: absolute;
	bottom: 66px;
	right: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	padding: 10px 14px;
	border-radius: 16px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
	border: 1px solid rgba(24, 172, 132, 0.25);
	white-space: nowrap;
	cursor: pointer;
	animation: cr-slide-up-fade 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	transform-origin: bottom right;
	transition: transform 0.2s, box-shadow 0.2s;
}

.cr-chat-widget.bottom-left .cr-teaser-bubble {
	right: auto;
	left: 0;
	transform-origin: bottom left;
}

.cr-teaser-bubble:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 28px -4px rgba(24, 172, 132, 0.22);
}

.cr-teaser-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--cr-primary-light);
	color: var(--cr-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cr-teaser-text {
	display: flex;
	flex-direction: column;
	font-size: 12px;
	line-height: 1.3;
}

.cr-teaser-text strong {
	color: var(--cr-text);
	font-size: 13px;
	font-weight: 600;
}

.cr-teaser-text span {
	color: var(--cr-text-muted);
	font-size: 11px;
}

.cr-teaser-close {
	background: transparent !important;
	border: none !important;
	color: #94a3b8 !important;
	font-size: 16px !important;
	line-height: 1 !important;
	padding: 2px 4px !important;
	cursor: pointer;
	border-radius: 4px;
	margin-left: 2px;
}
.cr-teaser-close:hover {
	color: #475569 !important;
	background: #f1f5f9 !important;
}

/* Compact Rounded Floating Launcher Button */
.cr-chat-launcher {
	width: 54px !important;
	height: 54px !important;
	border-radius: 9999px !important;
	background: linear-gradient(135deg, var(--cr-primary) 0%, #118a6a 100%) !important;
	color: #ffffff !important;
	border: 2px solid rgba(255, 255, 255, 0.25) !important;
	cursor: pointer;
	box-shadow: 0 8px 24px -4px rgba(24, 172, 132, 0.45), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
	position: relative !important;
	outline: none !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: visible !important;
}

.cr-chat-launcher:hover {
	transform: scale(1.08) translateY(-2px);
	box-shadow: 0 12px 28px -4px rgba(24, 172, 132, 0.55), 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

.cr-chat-launcher:active {
	transform: scale(0.96);
}

.cr-chat-launcher svg {
	display: block;
	stroke: #ffffff !important;
	transition: transform 0.2s ease;
}

.cr-chat-launcher .cr-icon-close {
	display: none;
}

.cr-chat-widget.open .cr-chat-launcher .cr-icon-chat {
	display: none;
}

.cr-chat-widget.open .cr-chat-launcher .cr-icon-close {
	display: block;
}

/* Green Live Online Dot with Pulse */
.cr-online-dot {
	position: absolute;
	top: 1px;
	right: 1px;
	width: 13px;
	height: 13px;
	background-color: #22c55e;
	border: 2px solid #ffffff;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
	animation: cr-pulse 2s infinite;
}

@keyframes cr-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
	}
}

/* Unread Badge */
.cr-chat-unread-badge {
	position: absolute;
	top: -4px;
	left: -4px;
	background: #ef4444;
	color: #ffffff;
	border: 2px solid #ffffff;
	min-width: 20px;
	height: 20px;
	padding: 0 4px;
	border-radius: 9999px;
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Compact Modern Rounded Chat & Contact Form Window Frames */
.cr-chat-window,
.cr-contact-form-window {
	position: absolute;
	bottom: 58px;
	width: 336px;
	max-width: calc(100vw - 28px);
	height: 480px;
	max-height: calc(100vh - 84px);
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06);
	display: none;
	flex-direction: column;
	overflow: hidden;
	animation: cr-slide-up-fade 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	transform-origin: bottom right;
	border: 1px solid #e2e8f0;
	z-index: 2147483647;
}

/* Strict Window Visibility Isolation - closed widget shows nothing except launcher */
.cr-chat-widget:not(.open) .cr-floating-menu,
.cr-chat-widget:not(.open) .cr-chat-window,
.cr-chat-widget:not(.open) .cr-contact-form-window {
	display: none !important;
	pointer-events: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
}

.cr-chat-widget.bottom-left .cr-chat-window,
.cr-chat-widget.bottom-left .cr-contact-form-window {
	transform-origin: bottom left;
	left: 0;
	right: auto;
}

.cr-chat-widget.bottom-right .cr-chat-window,
.cr-chat-widget.bottom-right .cr-contact-form-window {
	right: 0;
	left: auto;
}

.cr-chat-widget.open.view-chat .cr-chat-window,
.cr-chat-widget.open .cr-chat-window.cr-active-window {
	display: flex !important;
	pointer-events: auto !important;
	visibility: visible !important;
	opacity: 1 !important;
	z-index: 2147483647 !important;
}

.cr-chat-widget.open.view-cf .cr-contact-form-window,
.cr-chat-widget.open .cr-contact-form-window.cr-active-window {
	display: flex !important;
	pointer-events: auto !important;
	visibility: visible !important;
	opacity: 1 !important;
	z-index: 2147483647 !important;
}

@keyframes cr-slide-up-fade {
	0% {
		opacity: 0;
		transform: translateY(16px) scale(0.96);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Header */
.cr-chat-header {
	background: linear-gradient(135deg, var(--cr-primary) 0%, #118a6a 100%) !important;
	color: #ffffff !important;
	padding: 12px 16px !important;
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	flex-shrink: 0 !important;
}

.cr-header-avatar {
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.2) !important;
	backdrop-filter: blur(4px);
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: #ffffff !important;
	flex-shrink: 0;
	border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.cr-header-info {
	flex: 1;
	min-width: 0;
}

.cr-header-info h4 {
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cr-chat-status-text {
	font-size: 11px !important;
	color: rgba(255, 255, 255, 0.9) !important;
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 2px;
}

.cr-status-indicator {
	width: 6px;
	height: 6px;
	background-color: #4ade80;
	border-radius: 50%;
	display: inline-block;
}

.cr-header-actions {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
}

/* Specific button styling to prevent theme white override */
#cr-chat-widget .cr-chat-header button.cr-header-btn,
#cr-chat-widget .cr-header-btn {
	background: rgba(255, 255, 255, 0.2) !important;
	background-color: rgba(255, 255, 255, 0.2) !important;
	border: 1px solid rgba(255, 255, 255, 0.35) !important;
	color: #ffffff !important;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	min-height: 28px !important;
	border-radius: 50% !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.15s ease !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	text-indent: 0 !important;
}

#cr-chat-widget .cr-chat-header button.cr-header-btn:hover,
#cr-chat-widget .cr-header-btn:hover {
	background: rgba(255, 255, 255, 0.35) !important;
	background-color: rgba(255, 255, 255, 0.35) !important;
	transform: scale(1.06) !important;
}

#cr-chat-widget .cr-chat-header button.cr-header-btn:active,
#cr-chat-widget .cr-header-btn:active {
	transform: scale(0.92) !important;
}

#cr-chat-widget .cr-header-btn svg {
	stroke: #ffffff !important;
	display: block !important;
}

#cr-chat-widget .cr-header-ch-switch {
	position: relative !important;
}

#cr-chat-widget .cr-header-ch-badge {
	position: absolute !important;
	top: -4px !important;
	right: -4px !important;
	min-width: 15px !important;
	height: 15px !important;
	padding: 0 3px !important;
	border-radius: 999px !important;
	background: #0f172a !important;
	color: #ffffff !important;
	font-size: 9px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: 1.5px solid #ffffff !important;
	box-sizing: border-box !important;
}

/* Nav Switcher: Live Chat vs Instant FAQ Answers */
.cr-chat-nav-switcher {
	display: flex;
	background: #f1f5f9;
	padding: 4px;
	border-bottom: 1px solid var(--cr-border);
	gap: 4px;
}

.cr-nav-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 6px 10px;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	background: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.cr-nav-btn.active {
	background: #ffffff;
	color: var(--cr-primary);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cr-nav-btn svg {
	stroke: currentColor;
}

/* Screens Container */
.cr-chat-screen {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* Screen 1: Start Chat */
#cr-chat-start-screen {
	padding: 14px;
	overflow-y: auto;
}

.cr-welcome-callout {
	background: var(--cr-primary-light);
	border: 1px solid rgba(24, 172, 132, 0.3);
	padding: 10px 12px;
	border-radius: 12px;
	font-size: 12px;
	line-height: 1.4;
	color: #065f46;
	margin-bottom: 12px;
}

.cr-quick-chips {
	margin-bottom: 12px;
}

.cr-chips-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #94a3b8;
	margin-bottom: 6px;
}

.cr-chips-list {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.cr-chip-btn {
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	color: #334155 !important;
	font-size: 11px !important;
	font-weight: 500 !important;
	padding: 6px 10px !important;
	border-radius: 8px !important;
	text-align: left !important;
	cursor: pointer !important;
	transition: all 0.15s ease !important;
}

.cr-chip-btn:hover {
	background: var(--cr-primary-light) !important;
	border-color: var(--cr-primary) !important;
	color: var(--cr-primary) !important;
}

.cr-form-field {
	margin-bottom: 10px;
}

.cr-form-field label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 4px;
}

.cr-form-field input[type="text"],
.cr-form-field input[type="email"],
.cr-form-field textarea {
	width: 100% !important;
	background: #ffffff !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 10px !important;
	padding: 8px 10px !important;
	font-size: 12px !important;
	color: #0f172a !important;
	outline: none !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
	font-family: inherit !important;
}

.cr-form-field input:focus,
.cr-form-field textarea:focus {
	border-color: var(--cr-primary) !important;
	box-shadow: 0 0 0 3px rgba(24, 172, 132, 0.15) !important;
}

.cr-consent-wrap label {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-size: 10px;
	color: #64748b;
	font-weight: normal;
	cursor: pointer;
}

.cr-consent-wrap input[type="checkbox"] {
	margin-top: 2px;
	accent-color: var(--cr-primary);
}

.cr-form-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 11px;
	margin-bottom: 10px;
}

.cr-btn-submit {
	width: 100% !important;
	background: linear-gradient(135deg, var(--cr-primary) 0%, #118a6a 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: var(--cr-radius-btn) !important;
	padding: 10px 14px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	cursor: pointer !important;
	box-shadow: 0 4px 12px -2px rgba(24, 172, 132, 0.35) !important;
	transition: all 0.2s ease !important;
}

.cr-btn-submit:hover {
	background: linear-gradient(135deg, var(--cr-primary-hover) 0%, #0d7358 100%) !important;
	transform: translateY(-1px);
}

.cr-btn-submit:active {
	transform: scale(0.98);
}

/* Screen 2: Active Chat Messages */
.cr-chat-messages {
	flex: 1;
	padding: 14px;
	overflow-y: auto;
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cr-message-bubble {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 14px;
	font-size: 12.5px;
	line-height: 1.45;
	word-break: break-word;
	position: relative;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cr-message-customer {
	align-self: flex-end;
	background: linear-gradient(135deg, var(--cr-primary, #18ac84) 0%, var(--cr-primary-dark, #148e6d) 100%);
	color: #ffffff;
	border-bottom-right-radius: 3px;
}

.cr-message-admin {
	align-self: flex-start;
	background: #ffffff;
	color: #0f172a;
	border: 1px solid #e2e8f0;
	border-bottom-left-radius: 3px;
}

.cr-message-meta {
	font-size: 9.5px;
	color: #94a3b8;
	margin-top: 3px;
	display: flex;
	align-items: center;
	gap: 4px;
	user-select: none;
}

.cr-message-customer .cr-message-meta {
	justify-content: flex-end;
	color: rgba(255, 255, 255, 0.85) !important;
}

.cr-message-customer .cr-message-meta svg {
	stroke: rgba(255, 255, 255, 0.85) !important;
}

.cr-chat-input-bar {
	padding: 8px 10px !important;
	background: #ffffff !important;
	border-top: 1px solid var(--cr-border, #e2e8f0) !important;
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	position: relative !important;
	box-sizing: border-box !important;
	min-height: 54px !important;
	max-height: 92px !important;
	width: 100% !important;
}

/* WhatsApp-style dynamic auto-expanding input box (default compact 38px, max 76px) */
.cr-chat-input-bar textarea,
#cr-chat-widget textarea#cr-chat-input-text {
	flex: 1 1 auto !important;
	width: auto !important;
	border: 1.5px solid #cbd5e1 !important;
	border-radius: 20px !important;
	padding: 8px 14px !important;
	font-size: 13px !important;
	line-height: 20px !important;
	resize: none !important;
	outline: none !important;
	font-family: inherit !important;
	height: 38px !important;
	min-height: 38px !important;
	max-height: 76px !important;
	overflow-y: hidden !important;
	background: #f8fafc !important;
	box-sizing: border-box !important;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.03) !important;
	margin: 0 !important;
	transition: border-color 0.2s, background 0.2s !important;
}

.cr-chat-input-bar textarea:focus,
#cr-chat-widget textarea#cr-chat-input-text:focus {
	border-color: var(--cr-primary, #18ac84) !important;
	background: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(24, 172, 132, 0.15), inset 0 1px 2px rgba(0,0,0,0.02) !important;
}

/* Scrollbar when reaching max-height ~76px (approx 3 lines) */
.cr-chat-input-bar textarea::-webkit-scrollbar {
	width: 4px;
}
.cr-chat-input-bar textarea::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

/* Tool Buttons in Input Bar - perfectly centered vertically */
.cr-chat-tool-btn {
	background: transparent !important;
	border: none !important;
	color: #64748b !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	padding: 0 !important;
	cursor: pointer !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: background 0.15s, color 0.15s !important;
	outline: none !important;
	margin: 0 !important;
	align-self: center !important;
	flex-shrink: 0 !important;
}

.cr-chat-tool-btn:hover {
	background: #f1f5f9 !important;
	color: var(--cr-primary, #18ac84) !important;
}

.cr-chat-send-btn {
	background: linear-gradient(135deg, var(--cr-primary, #18ac84) 0%, #118a6a 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 50% !important;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.2s ease !important;
	flex-shrink: 0 !important;
	margin: 0 !important;
	align-self: center !important;
	box-shadow: 0 2px 6px rgba(24, 172, 132, 0.35) !important;
}

.cr-chat-send-btn:hover {
	transform: scale(1.05) !important;
	box-shadow: 0 4px 10px rgba(24, 172, 132, 0.45) !important;
}

.cr-chat-send-btn:active {
	transform: scale(0.95) !important;
}

/* Quick Replies Bar in Active Chat */
.cr-quick-replies-bar {
	display: flex;
	gap: 6px;
	padding: 8px 12px;
	background: #f8fafc;
	border-top: 1px solid #f1f5f9;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	white-space: nowrap;
}

.cr-quick-replies-bar::-webkit-scrollbar {
	display: none;
}

.cr-quick-reply-pill {
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	color: #334155 !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	padding: 5px 11px !important;
	border-radius: 999px !important;
	cursor: pointer !important;
	transition: all 0.15s ease !important;
	white-space: nowrap !important;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.cr-quick-reply-pill:hover {
	background: var(--cr-primary-light) !important;
	color: var(--cr-primary) !important;
	border-color: rgba(24, 172, 132, 0.3) !important;
	transform: translateY(-1px);
}

/* Quoted Reply Preview Bar above Input */
.cr-input-quote-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	background: #f1f5f9;
	border-left: 3px solid var(--cr-primary);
	border-top: 1px solid #e2e8f0;
	font-size: 11px;
}

.cr-quote-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cr-quote-author {
	font-weight: 700;
	color: var(--cr-primary);
	font-size: 10px;
}

.cr-quote-snippet {
	color: #475569;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cr-quote-cancel-btn {
	background: transparent;
	border: none;
	font-size: 18px;
	color: #94a3b8;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}

.cr-quote-cancel-btn:hover {
	color: #ef4444;
}

/* Voice Message Recording Active Bar */
.cr-voice-recording-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #fff;
	border-top: 1px solid var(--cr-border);
}

.cr-voice-rec-indicator {
	display: flex;
	align-items: center;
	gap: 6px;
}

.cr-voice-rec-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ef4444;
	animation: cr-pulse-red 1s infinite alternate;
}

@keyframes cr-pulse-red {
	0% { transform: scale(0.9); opacity: 0.6; }
	100% { transform: scale(1.2); opacity: 1; }
}

.cr-voice-rec-time {
	font-size: 12px;
	font-weight: 700;
	color: #ef4444;
	font-variant-numeric: tabular-nums;
}

.cr-voice-rec-waveform {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 3px;
	height: 24px;
}

.cr-rec-bar {
	flex: 1;
	background: #ef4444;
	height: 6px;
	border-radius: 3px;
	animation: cr-rec-wave 1s ease-in-out infinite alternate;
}

.cr-rec-bar:nth-child(2) { animation-delay: 0.15s; }
.cr-rec-bar:nth-child(3) { animation-delay: 0.3s; }
.cr-rec-bar:nth-child(4) { animation-delay: 0.45s; }
.cr-rec-bar:nth-child(5) { animation-delay: 0.6s; }
.cr-rec-bar:nth-child(6) { animation-delay: 0.75s; }
.cr-rec-bar:nth-child(7) { animation-delay: 0.9s; }

@keyframes cr-rec-wave {
	0% { height: 4px; }
	100% { height: 22px; }
}

.cr-voice-action-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.cr-voice-btn-cancel {
	background: #f1f5f9;
	color: #64748b;
}

.cr-voice-btn-cancel:hover {
	background: #fee2e2;
	color: #ef4444;
}

.cr-voice-btn-send {
	background: var(--cr-primary);
	color: #fff;
	box-shadow: 0 2px 6px rgba(24, 172, 132, 0.4);
}

.cr-voice-btn-send:hover {
	transform: scale(1.05);
}

/* File Staging Chip */
.cr-file-staging-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	font-size: 11px;
	color: #334155;
}

.cr-staged-name {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: 600;
}

.cr-staged-remove {
	background: transparent;
	border: none;
	color: #94a3b8;
	font-size: 16px;
	cursor: pointer;
}

/* Drag & Drop Overlay */
.cr-drop-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.94);
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(2px);
}

.cr-drop-box {
	border: 2px dashed var(--cr-primary);
	border-radius: 16px;
	padding: 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: var(--cr-primary);
	font-weight: 700;
	font-size: 13px;
}

/* Typing Indicator */
.cr-typing-indicator-row {
	padding: 4px 14px;
	display: flex;
	align-items: center;
}

.cr-typing-bubble {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #f1f5f9;
	padding: 6px 12px;
	border-radius: 14px;
	font-size: 11px;
	color: #64748b;
}

.cr-typing-dots {
	display: flex;
	gap: 3px;
}

.cr-typing-dot {
	width: 5px;
	height: 5px;
	background: #94a3b8;
	border-radius: 50%;
	animation: cr-typing-bounce 1.2s infinite ease-in-out both;
}

.cr-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.cr-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes cr-typing-bounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

/* Message Options & Actions on Message Bubble */
.cr-msg-options-wrap {
	position: absolute;
	top: 2px;
	opacity: 0;
	transition: opacity 0.15s ease;
	z-index: 10;
}

.cr-message-customer .cr-msg-options-wrap {
	left: -26px;
	right: auto;
}

.cr-message-admin .cr-msg-options-wrap {
	right: -26px;
	left: auto;
}

.cr-message-bubble:hover .cr-msg-options-wrap {
	opacity: 1;
}

.cr-msg-options-trigger {
	background: rgba(0, 0, 0, 0.06);
	border: none;
	color: #64748b;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: all 0.15s ease;
}

.cr-message-customer .cr-msg-options-trigger {
	background: rgba(0, 0, 0, 0.08);
	color: #475569;
}

.cr-msg-options-trigger:hover {
	background: rgba(0, 0, 0, 0.15);
	color: #0f172a;
	transform: scale(1.1);
}

.cr-msg-actions-menu {
	position: absolute;
	top: 24px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
	border: 1px solid #e2e8f0;
	padding: 6px;
	width: 150px;
	z-index: 50;
	animation: cr-fade-in 0.15s ease;
}

.cr-message-customer .cr-msg-actions-menu {
	left: 0;
	right: auto;
}

.cr-message-admin .cr-msg-actions-menu {
	right: 0;
	left: auto;
}

.cr-msg-reactions-row {
	display: flex;
	justify-content: space-between;
	padding: 4px 2px 6px;
	border-bottom: 1px solid #f1f5f9;
	margin-bottom: 4px;
}

.cr-reaction-emoji-btn {
	background: transparent;
	border: none;
	font-size: 15px;
	cursor: pointer;
	padding: 2px 4px;
	border-radius: 6px;
	transition: transform 0.1s;
}

.cr-reaction-emoji-btn:hover {
	transform: scale(1.25);
	background: #f8fafc;
}

.cr-msg-action-item {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 6px 8px;
	font-size: 11px;
	font-weight: 600;
	color: #334155;
	background: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-align: left;
	transition: background 0.1s;
}

.cr-msg-action-item:hover {
	background: #f1f5f9;
}

/* Voice Message Player in Bubble */
.cr-voice-message-player {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	min-width: 180px;
}

.cr-voice-play-toggle {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255,255,255,0.25);
	border: none;
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.15s;
}

.cr-message-admin .cr-voice-play-toggle {
	background: var(--cr-primary);
	color: #ffffff;
}

.cr-voice-play-toggle:hover {
	transform: scale(1.1);
}

.cr-voice-waveform {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 2px;
	height: 18px;
}

.cr-wave-bar {
	flex: 1;
	height: 6px;
	background: currentColor;
	opacity: 0.5;
	border-radius: 2px;
	transition: height 0.15s;
}

.cr-voice-waveform.playing .cr-wave-bar {
	animation: cr-wave-bounce 0.6s infinite alternate ease-in-out;
}

.cr-voice-waveform.playing .cr-wave-bar:nth-child(odd) {
	animation-duration: 0.4s;
}

@keyframes cr-wave-bounce {
	0% { height: 4px; opacity: 0.4; }
	100% { height: 16px; opacity: 1; }
}

.cr-voice-duration-tag {
	font-size: 10px;
	opacity: 0.8;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* Quotation snippet inside message bubble */
.cr-bubble-quote-snippet {
	font-size: 11px;
	padding: 4px 8px;
	margin-bottom: 6px;
	background: rgba(0,0,0,0.06);
	border-left: 3px solid currentColor;
	border-radius: 4px;
	opacity: 0.85;
}

.cr-message-customer .cr-bubble-quote-snippet {
	background: rgba(255,255,255,0.18);
}

/* Attachments inside bubble */
.cr-bubble-attachments {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 6px;
}

.cr-att-img-preview {
	display: block;
	max-width: 220px;
	border-radius: 8px;
	overflow: hidden;
}

.cr-att-img-preview img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.2s;
}

.cr-att-img-preview:hover img {
	transform: scale(1.03);
}

.cr-att-file-card {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	background: rgba(0,0,0,0.04);
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	border: 1px solid rgba(0,0,0,0.08);
}

.cr-message-customer .cr-att-file-card {
	background: rgba(255,255,255,0.15);
	border-color: rgba(255,255,255,0.25);
}

.cr-file-icon {
	display: flex;
	align-items: center;
}

.cr-file-info {
	display: flex;
	flex-direction: column;
	font-size: 11px;
	line-height: 1.2;
}

.cr-file-name {
	font-weight: 600;
}

.cr-file-size {
	font-size: 9px;
	opacity: 0.75;
}

/* Reaction Badge */
.cr-reaction-badge {
	position: absolute;
	bottom: -8px;
	right: 10px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.08);
	padding: 1px 5px;
	border-radius: 12px;
	font-size: 11px;
	color: #334155;
	display: flex;
	align-items: center;
	gap: 2px;
}

/* Floating Toast Notification */
.cr-chat-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(15, 23, 42, 0.9);
	color: #ffffff;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	z-index: 2147483647;
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
	display: none;
	backdrop-filter: blur(4px);
}

/* Modern Floating Support Channels Capsule Launcher */
.cr-capsule-launcher {
	width: auto !important;
	height: 42px !important;
	padding: 0 16px 0 13px !important;
	border-radius: 9999px !important;
	background: linear-gradient(135deg, var(--cr-primary-dark, #148e6d) 0%, var(--cr-primary, #18ac84) 100%) !important;
	color: #ffffff !important;
	border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
	box-shadow: 0 8px 24px -4px rgba(24, 172, 132, 0.45), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	cursor: pointer !important;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
	position: relative !important;
	outline: none !important;
	user-select: none !important;
	z-index: 2147483647 !important;
	line-height: 1 !important;
}

.cr-capsule-launcher:hover {
	transform: translateY(-2px) scale(1.02) !important;
	box-shadow: 0 12px 28px -4px rgba(24, 172, 132, 0.6), 0 4px 10px rgba(0, 0, 0, 0.12) !important;
}

.cr-capsule-launcher:active {
	transform: scale(0.97) !important;
}

.cr-capsule-launcher .cr-icon-chat {
	display: inline-flex !important;
	align-items: center !important;
	position: relative !important;
}

.cr-capsule-launcher .cr-icon-chat svg {
	width: 17px !important;
	height: 17px !important;
	stroke: #ffffff !important;
}

.cr-capsule-launcher .cr-capsule-label {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 12.5px !important;
	font-weight: 700 !important;
	letter-spacing: -0.2px !important;
	white-space: nowrap !important;
	color: #ffffff !important;
}

.cr-capsule-launcher .cr-capsule-badge {
	background: rgba(255, 255, 255, 0.25) !important;
	padding: 1.5px 6.5px !important;
	border-radius: 999px !important;
	font-size: 10px !important;
	font-weight: 800 !important;
	border: 1px solid rgba(255, 255, 255, 0.35) !important;
	line-height: 1.2 !important;
	color: #ffffff !important;
}

.cr-capsule-launcher .cr-capsule-chevron {
	display: inline-flex !important;
	align-items: center !important;
	color: rgba(255, 255, 255, 0.85) !important;
	transition: transform 0.2s ease !important;
}

.cr-capsule-launcher:hover .cr-capsule-chevron {
	transform: translateY(-1px) !important;
}

.cr-capsule-launcher .cr-icon-close {
	display: none !important;
}

/* Open state: cleanly transitions to a dark compact pill */
.cr-chat-widget.open .cr-capsule-launcher,
.cr-capsule-launcher.open {
	width: auto !important;
	height: 40px !important;
	padding: 0 14px 0 12px !important;
	border-radius: 9999px !important;
	background: #1e293b !important;
	border: 1px solid #334155 !important;
	box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.45) !important;
	color: #ffffff !important;
	gap: 6px !important;
}

.cr-chat-widget.open .cr-capsule-launcher:hover,
.cr-capsule-launcher.open:hover {
	background: #0f172a !important;
	border-color: #475569 !important;
	transform: translateY(-1px) scale(1.02) !important;
}

.cr-chat-widget.open .cr-capsule-launcher .cr-icon-chat,
.cr-chat-widget.open .cr-capsule-launcher .cr-capsule-label,
.cr-chat-widget.open .cr-capsule-launcher .cr-capsule-chevron,
.cr-capsule-launcher.open .cr-icon-chat,
.cr-capsule-launcher.open .cr-capsule-label,
.cr-capsule-launcher.open .cr-capsule-chevron {
	display: none !important;
}

.cr-chat-widget.open .cr-capsule-launcher .cr-icon-close,
.cr-capsule-launcher.open .cr-icon-close {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
}

.cr-chat-widget.open .cr-capsule-launcher .cr-icon-close svg,
.cr-capsule-launcher.open .cr-icon-close svg {
	width: 14px !important;
	height: 14px !important;
	stroke: #ffffff !important;
}

.cr-close-label {
	display: inline-block !important;
	line-height: 1 !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
}

/* Header Channels Capsule Button */
.cr-header-capsule-btn {
	background: rgba(255, 255, 255, 0.22) !important;
	border: 1px solid rgba(255, 255, 255, 0.35) !important;
	border-radius: 20px !important;
	padding: 3px 8px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	display: flex !important;
	align-items: center !important;
	gap: 4px !important;
	height: 26px !important;
	transition: all 0.2s ease !important;
}

.cr-header-capsule-btn:hover {
	background: rgba(255, 255, 255, 0.32) !important;
}

.cr-header-capsule-btn .cr-capsule-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #86efac;
}

.cr-header-capsule-btn .cr-capsule-count {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 999px;
	padding: 1px 5px;
	font-size: 10px;
}

/* Header Channels Dropdown in Chat Window */
.cr-header-channels-dropdown {
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	padding: 10px;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
	position: relative;
	z-index: 10;
}

.cr-channels-dropdown-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
	letter-spacing: 0.5px;
}

.cr-close-dropdown-btn {
	background: none;
	border: none;
	font-size: 16px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 0 4px;
}

.cr-channels-dropdown-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 6px;
}

.cr-dropdown-channel-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	color: #1e293b;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.15s ease;
}

.cr-dropdown-channel-item:hover {
	border-color: var(--cr-primary);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	transform: translateY(-1px);
}

.cr-dropdown-channel-item.active {
	background: rgba(24, 172, 132, 0.08);
	border-color: var(--cr-primary);
	color: var(--cr-primary);
}

.cr-channel-icon-mini {
	width: 24px;
	height: 24px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	flex-shrink: 0;
}

.cr-channel-icon-mini svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	fill: currentColor;
}

.cr-channel-title-mini {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cr-chat-attach-btn {
	color: #64748b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	border-radius: 8px;
	transition: background 0.15s;
}

.cr-chat-attach-btn:hover {
	background: #f1f5f9;
	color: var(--cr-primary);
}

.cr-chat-send-btn {
	background: var(--cr-primary) !important;
	border: none !important;
	color: #ffffff !important;
	width: 34px !important;
	height: 34px !important;
	border-radius: 10px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	transition: all 0.15s ease !important;
	flex-shrink: 0;
	padding: 0 !important;
}

.cr-chat-send-btn:hover {
	background: var(--cr-primary-hover) !important;
}

/* Screen 3: Instant Answers & FAQ Screen */
#cr-chat-faq-screen {
	padding: 12px;
	background: #f8fafc;
	overflow-y: auto;
}

.cr-faq-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
}

.cr-faq-search-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 6px 10px;
}

.cr-faq-search-wrap svg {
	color: #94a3b8;
	flex-shrink: 0;
}

.cr-faq-search-wrap input {
	flex: 1;
	border: none !important;
	outline: none !important;
	font-size: 12px !important;
	background: transparent !important;
	padding: 0 !important;
	box-shadow: none !important;
}

.cr-faq-categories {
	display: flex;
	gap: 5px;
	overflow-x: auto;
	padding-bottom: 2px;
}

.cr-faq-cat-pill {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 10px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 9999px;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.15s;
}

.cr-faq-cat-pill.active,
.cr-faq-cat-pill:hover {
	background: var(--cr-primary);
	color: #ffffff;
	border-color: var(--cr-primary);
}

.cr-faq-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	overflow-y: auto;
}

.cr-faq-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.cr-faq-card:hover {
	border-color: #cbd5e1;
}

.cr-faq-question-btn {
	width: 100%;
	background: transparent;
	border: none;
	padding: 10px 12px;
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	color: #1e293b;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
}

.cr-faq-question-btn svg {
	transition: transform 0.2s;
	color: #94a3b8;
	flex-shrink: 0;
}

.cr-faq-card.open .cr-faq-question-btn svg {
	transform: rotate(180deg);
	color: var(--cr-primary);
}

.cr-faq-answer-body {
	display: none;
	padding: 0 12px 10px;
	font-size: 11px;
	line-height: 1.45;
	color: #475569;
	border-top: 1px dashed #f1f5f9;
}

.cr-faq-card.open .cr-faq-answer-body {
	display: block;
	padding-top: 8px;
}

.cr-faq-footer-cta {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 10px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: auto;
}

.cr-faq-footer-cta span {
	font-size: 11px;
	color: #64748b;
}

.cr-faq-agent-btn {
	background: var(--cr-primary-light) !important;
	border: 1px solid var(--cr-primary) !important;
	color: var(--cr-primary) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	padding: 6px 12px !important;
	border-radius: 8px !important;
	cursor: pointer !important;
	transition: all 0.15s ease !important;
}

.cr-faq-agent-btn:hover {
	background: var(--cr-primary) !important;
	color: #ffffff !important;
}

/* Sleek Floating Omnichannel Quick Bar with Modern Chips */
.cr-omnichannel-bar {
	background: #f8fafc;
	border-bottom: 1px solid var(--cr-border);
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cr-omnichannel-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #64748b;
}

.cr-omnichannel-badges {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 2px;
	scrollbar-width: thin;
}

/* Modern Floating Chips / Pills */
.cr-channel-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 9999px;
	font-size: 11.5px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	border: 1px solid rgba(226, 232, 240, 0.9);
	background: #ffffff;
	color: #334155;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
}

.cr-channel-pill svg {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.cr-channel-pill:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.12);
}

.cr-channel-pill:hover svg {
	transform: scale(1.1);
}

.cr-pill-livechat {
	color: var(--cr-primary);
	border-color: rgba(24, 172, 132, 0.35);
	background: #ffffff;
}

.cr-pill-livechat.active,
.cr-pill-livechat:hover {
	background: var(--cr-primary-light);
	color: var(--cr-primary);
	border-color: var(--cr-primary);
	box-shadow: 0 2px 8px rgba(24, 172, 132, 0.2);
}

.cr-pill-whatsapp {
	color: #15803d;
	border-color: #bbf7d0;
	background: #ffffff;
}

.cr-pill-whatsapp:hover {
	background: #25D366;
	color: #ffffff;
	border-color: #25D366;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.cr-pill-telegram {
	color: #0369a1;
	border-color: #bae6fd;
	background: #ffffff;
}

.cr-pill-telegram:hover {
	background: #229ED9;
	color: #ffffff;
	border-color: #229ED9;
	box-shadow: 0 4px 12px rgba(34, 158, 217, 0.3);
}

.cr-pill-messenger {
	color: #1d4ed8;
	border-color: #bfdbfe;
	background: #ffffff;
}

.cr-pill-messenger:hover {
	background: #0084FF;
	color: #ffffff;
	border-color: #0084FF;
	box-shadow: 0 4px 12px rgba(0, 132, 255, 0.3);
}

.cr-pill-call {
	color: #047857;
	border-color: #a7f3d0;
	background: #ffffff;
}

.cr-pill-call:hover {
	background: #059669;
	color: #ffffff;
	border-color: #059669;
	box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* ==========================================================================
   Modern Floating Multi-Channel Support Menu Card
   ========================================================================== */

.cr-floating-menu {
	position: absolute;
	bottom: 58px;
	width: 320px;
	max-width: calc(100vw - 28px);
	background: #ffffff;
	border-radius: 22px;
	box-shadow: 0 20px 48px -6px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);
	overflow: hidden;
	z-index: 2147483647 !important;
	border: 1px solid #e2e8f0;
	display: none;
	animation: cr-menu-slide-up 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cr-chat-widget.open.view-menu .cr-floating-menu,
.cr-chat-widget.open .cr-floating-menu.cr-active-menu {
	display: block !important;
	pointer-events: auto !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.cr-chat-widget.bottom-right .cr-floating-menu {
	right: 0;
	left: auto;
	transform-origin: bottom right;
}

.cr-chat-widget.bottom-left .cr-floating-menu {
	left: 0;
	right: auto;
	transform-origin: bottom left;
}

@keyframes cr-menu-slide-up {
	0% {
		opacity: 0;
		transform: translateY(12px) scale(0.96);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.cr-menu-header {
	background: linear-gradient(135deg, var(--cr-primary-dark, #148e6d) 0%, var(--cr-primary, #18ac84) 100%);
	color: #ffffff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.cr-menu-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.cr-menu-header-avatar {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.22);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #ffffff;
	flex-shrink: 0;
}

.cr-menu-header-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cr-menu-title {
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cr-menu-subtitle {
	font-size: 11px !important;
	color: rgba(255, 255, 255, 0.9) !important;
	margin-top: 2px !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cr-menu-header-actions {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	flex-shrink: 0 !important;
}

.cr-menu-header-badge {
	font-size: 10px !important;
	font-weight: 700 !important;
	background: rgba(255, 255, 255, 0.24) !important;
	color: #ffffff !important;
	padding: 2px 8px !important;
	border-radius: 9999px !important;
	border: 1px solid rgba(255, 255, 255, 0.35) !important;
	white-space: nowrap !important;
	flex-shrink: 0 !important;
}

.cr-menu-close-btn {
	background: rgba(255, 255, 255, 0.2) !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	color: #ffffff !important;
	width: 26px !important;
	height: 26px !important;
	border-radius: 9999px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	transition: all 0.15s ease !important;
	padding: 0 !important;
	outline: none !important;
}

.cr-menu-close-btn:hover {
	background: rgba(255, 255, 255, 0.35) !important;
	transform: scale(1.06) !important;
}

.cr-menu-close-btn svg {
	width: 13px !important;
	height: 13px !important;
	stroke: #ffffff !important;
}

.cr-menu-channels-list {
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 380px;
	overflow-y: auto;
	background: #ffffff;
}

.cr-menu-item {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	padding: 10px 13px !important;
	border-radius: 15px !important;
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	cursor: pointer !important;
	text-decoration: none !important;
	color: #0f172a !important;
	transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
	user-select: none !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
	width: 100% !important;
	box-sizing: border-box !important;
	text-align: left !important;
	pointer-events: auto !important;
}

.cr-menu-item * {
	pointer-events: none !important;
}

.cr-menu-item:hover {
	background: #ffffff !important;
	border-color: #18ac84 !important;
	transform: translateY(-1.5px) !important;
	box-shadow: 0 6px 18px rgba(24, 172, 132, 0.16), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.cr-menu-item:active {
	transform: scale(0.98) !important;
}

.cr-menu-icon-btn {
	width: 38px !important;
	height: 38px !important;
	border-radius: 11px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: #ffffff !important;
	flex-shrink: 0 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
	border: none !important;
	transition: transform 0.18s ease !important;
}

.cr-menu-item:hover .cr-menu-icon-btn {
	transform: scale(1.06) !important;
}

.cr-menu-icon-btn svg {
	width: 20px !important;
	height: 20px !important;
	display: block !important;
}

.cr-menu-item-info {
	flex: 1 !important;
	min-width: 0 !important;
	display: flex !important;
	flex-direction: column !important;
}

.cr-menu-item-top {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
}

.cr-menu-item-title {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	transition: color 0.15s ease !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	line-height: 1.2 !important;
}

.cr-menu-item:hover .cr-menu-item-title {
	color: var(--cr-primary, #18ac84) !important;
}

.cr-menu-item-badge {
	font-size: 9.5px !important;
	font-weight: 700 !important;
	padding: 1.5px 6.5px !important;
	border-radius: 9999px !important;
	background: #f1f5f9 !important;
	color: #475569 !important;
	flex-shrink: 0 !important;
	line-height: 1.2 !important;
}

.cr-menu-item-badge.cr-badge-livechat {
	background: #e6fffa !important;
	color: #0d9488 !important;
	border: 1px solid #99f6e4 !important;
}

.cr-menu-item-badge.cr-badge-contact_form {
	background: #ffedd5 !important;
	color: #c2410c !important;
	border: 1px solid #fed7aa !important;
}

.cr-menu-item-badge.cr-badge-whatsapp {
	background: #dcfce7 !important;
	color: #15803d !important;
	border: 1px solid #bbf7d0 !important;
}

.cr-menu-item-badge.cr-badge-telegram {
	background: #e0f2fe !important;
	color: #0369a1 !important;
	border: 1px solid #bae6fd !important;
}

.cr-menu-item-badge.cr-badge-messenger {
	background: #eff6ff !important;
	color: #1d4ed8 !important;
	border: 1px solid #bfdbfe !important;
}

.cr-menu-item-badge.cr-badge-call {
	background: #ecfdf5 !important;
	color: #047857 !important;
	border: 1px solid #a7f3d0 !important;
}

.cr-menu-item-desc {
	font-size: 11px !important;
	color: #64748b !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	margin-top: 2px !important;
}

.cr-menu-item-arrow {
	color: #cbd5e1 !important;
	display: flex !important;
	align-items: center !important;
	transition: transform 0.15s ease, color 0.15s ease !important;
	flex-shrink: 0 !important;
}

.cr-menu-item:hover .cr-menu-item-arrow {
	color: var(--cr-primary, #18ac84) !important;
	transform: translateX(2px) !important;
}

/* Channel Specific Icon Colors */
.cr-btn-livechat {
	background: linear-gradient(135deg, var(--cr-primary, #18ac84) 0%, var(--cr-primary-dark, #148e6d) 100%) !important;
}

.cr-btn-contact_form {
	background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
}

.cr-btn-whatsapp {
	background: #25D366 !important;
}

.cr-btn-telegram {
	background: #229ED9 !important;
}

.cr-btn-call {
	background: #059669 !important;
}

.cr-btn-messenger {
	background: linear-gradient(135deg, #0084FF 0%, #A033FF 100%) !important;
}

/* Mobile Responsiveness & Safe Offset */
@media (max-width: 640px) {
	.cr-chat-widget.bottom-right {
		bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
		right: 18px !important;
	}

	.cr-chat-widget.bottom-left {
		bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
		left: 18px !important;
	}

	.cr-chat-widget.cr-scrolled.bottom-right,
	.cr-chat-widget.cr-scrolled-up.bottom-right,
	.cr-chat-widget.cr-scrolled.bottom-left,
	.cr-chat-widget.cr-scrolled-up.bottom-left {
		bottom: calc(142px + env(safe-area-inset-bottom, 0px)) !important;
	}

	.cr-chat-window,
	.cr-contact-form-window {
		width: calc(100vw - 28px) !important;
		bottom: 68px !important;
		height: 480px !important;
		max-height: calc(100vh - 100px) !important;
	}

	.cr-floating-menu {
		width: calc(100vw - 28px) !important;
		bottom: 68px !important;
	}
}
