/* Allen Omnichannel AI Chat Widget Styles - Mobile & Desktop Optimized */
#allen-chat-root,
#allen-chat-root *,
#allen-chat-root *::before,
#allen-chat-root *::after {
	box-sizing: border-box !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

#allen-chat-root {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 999999;
	font-size: 13px;
	line-height: 1.45;
	color: #1e293b;
}

/* Floating Launcher Button (Hidden automatically when chat window is open!) */
#allen-chat-launcher {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 7px !important;
	background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 999px !important;
	padding: 11px 18px !important;
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
	box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.55) !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease !important;
	width: auto !important;
	min-width: 0 !important;
}

#allen-chat-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.7) !important;
}

/* Hide launcher & preview bubble when chat window is open */
#allen-chat-root.allen-is-open #allen-chat-launcher,
#allen-chat-root.allen-is-open #allen-chat-preview-bubble {
	display: none !important;
}

#allen-chat-launcher.allen-has-unread {
	animation: allenLauncherPulse 2s infinite !important;
}

@keyframes allenLauncherPulse {
	0% {
		box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.6), 0 0 0 0 rgba(239, 68, 68, 0.55);
	}
	70% {
		box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.6), 0 0 0 11px rgba(239, 68, 68, 0);
	}
	100% {
		box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.6), 0 0 0 0 rgba(239, 68, 68, 0);
	}
}

#allen-chat-unread {
	display: none;
	background: #ef4444 !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	padding: 1px 6px !important;
	border-radius: 999px !important;
	box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
}

/* Floating New-Reply Speech Bubble (Pops up when minimized) */
#allen-chat-preview-bubble {
	display: none;
	position: absolute;
	right: 0;
	bottom: calc(100% + 13px);
	width: 292px;
	max-width: calc(100vw - 28px);
	background: #ffffff !important;
	border: 1px solid rgba(203, 213, 225, 0.95) !important;
	border-left: 4px solid #2563eb !important;
	border-radius: 14px !important;
	padding: 11px 13px 10px !important;
	box-shadow: 0 14px 34px -6px rgba(15, 23, 42, 0.26), 0 4px 12px -2px rgba(37, 99, 235, 0.16) !important;
	cursor: pointer !important;
	z-index: 1000000;
	transform-origin: bottom right;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#allen-chat-preview-bubble.is-admin-reply {
	border-left-color: #f59e0b !important;
	box-shadow: 0 14px 34px -6px rgba(15, 23, 42, 0.28), 0 4px 14px -2px rgba(245, 158, 11, 0.24) !important;
}

#allen-chat-preview-bubble.allen-preview-visible {
	display: block !important;
	animation: allenBubblePop 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

#allen-chat-preview-bubble:hover {
	transform: translateY(-2px);
}

/* Speech-bubble pointer arrow pointing down to the launcher button */
#allen-chat-preview-bubble::after {
	content: "";
	position: absolute;
	right: 28px;
	bottom: -7px;
	width: 12px;
	height: 12px;
	background: #ffffff;
	border-right: 1px solid rgba(203, 213, 225, 0.95);
	border-bottom: 1px solid rgba(203, 213, 225, 0.95);
	transform: rotate(45deg);
}

@keyframes allenBubblePop {
	0% {
		opacity: 0;
		transform: translateY(12px) scale(0.9);
	}
	65% {
		opacity: 1;
		transform: translateY(-2px) scale(1.02);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.allen-preview-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 5px;
}

.allen-preview-sender-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.allen-preview-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	flex-shrink: 0;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

#allen-preview-sender {
	font-size: 12px;
	font-weight: 700;
	color: #1d4ed8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#allen-chat-preview-bubble.is-admin-reply #allen-preview-sender {
	color: #b45309;
}

#allen-chat-root .allen-preview-close {
	background: transparent !important;
	border: none !important;
	color: #94a3b8 !important;
	font-size: 13px !important;
	line-height: 1 !important;
	padding: 2px 5px !important;
	margin: -2px -4px 0 0 !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	min-width: 0 !important;
	width: auto !important;
	box-shadow: none !important;
}

#allen-chat-root .allen-preview-close:hover {
	background: #f1f5f9 !important;
	color: #475569 !important;
}

#allen-preview-body {
	font-size: 13px;
	font-weight: 500;
	color: #0f172a;
	line-height: 1.45;
	margin: 0 0 6px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.allen-preview-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11.5px;
	font-weight: 600;
	color: #2563eb;
}

#allen-chat-preview-bubble.is-admin-reply .allen-preview-cta {
	color: #d97706;
}

/* Main Chat Window (Desktop Default) */
#allen-chat-window {
	display: none;
	flex-direction: column;
	width: 368px;
	max-width: calc(100vw - 24px);
	height: 540px;
	max-height: calc(100vh - 48px);
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.32);
	border: 1px solid rgba(203, 213, 225, 0.9);
	margin: 0 !important;
}

#allen-chat-root.allen-is-open #allen-chat-window {
	display: flex !important;
	animation: allenSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes allenSlideUp {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Header */
.allen-chat-header {
	background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
	color: #ffffff;
	padding: 11px 12px 10px;
	flex-shrink: 0;
}

.allen-header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.allen-brand-info {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1;
}

.allen-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
	color: #fff;
}

.allen-brand-text {
	min-width: 0;
	flex: 1;
}

.allen-title-row {
	display: flex;
	align-items: center;
	gap: 5px;
	font-weight: 700;
	font-size: 13.5px;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.allen-subtitle {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: rgba(224, 231, 255, 0.95);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.allen-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #34d399;
	display: inline-block;
	flex-shrink: 0;
	box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.3);
}

.allen-status-dot.dot-human {
	background: #38bdf8;
}

.allen-status-dot.dot-pending {
	background: #fbbf24;
}

/* Header Action Buttons (Handoff + Prominent Close Button) */
.allen-header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

#allen-chat-root .allen-btn-handoff {
	background: rgba(255, 255, 255, 0.18) !important;
	color: #ffffff !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: 7px !important;
	padding: 5px 8px !important;
	margin: 0 !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
	white-space: nowrap !important;
}

#allen-chat-root .allen-btn-handoff:hover {
	background: rgba(255, 255, 255, 0.3) !important;
}

/* Prominent Close / Minimize Button */
#allen-chat-root .allen-btn-close {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 3px !important;
	background: rgba(15, 23, 42, 0.32) !important;
	color: #ffffff !important;
	border: 1px solid rgba(255, 255, 255, 0.35) !important;
	border-radius: 7px !important;
	padding: 5px 9px !important;
	margin: 0 !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
	white-space: nowrap !important;
}

#allen-chat-root .allen-btn-close:hover {
	background: rgba(239, 68, 68, 0.85) !important;
	border-color: rgba(255, 255, 255, 0.6) !important;
}

/* Channel Switcher Bar */
.allen-channel-tabs {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#allen-chat-root .allen-channel-tab {
	flex: 1 !important;
	text-align: center !important;
	padding: 4px 5px !important;
	margin: 0 !important;
	border-radius: 6px !important;
	font-size: 11.5px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	color: #e0e7ff !important;
	background: rgba(255, 255, 255, 0.12) !important;
	border: none !important;
	cursor: pointer !important;
	white-space: nowrap !important;
}

#allen-chat-root .allen-channel-tab.active {
	background: #ffffff !important;
	color: #1d4ed8 !important;
	font-weight: 700 !important;
}

/* Quick Action Bar */
.allen-quick-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	overflow-x: auto;
	flex-shrink: 0;
	-webkit-overflow-scrolling: touch;
}

.allen-quick-bar::-webkit-scrollbar {
	display: none;
	height: 0;
}

#allen-chat-root .allen-quick-pill {
	flex-shrink: 0 !important;
	font-size: 11.5px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	padding: 4px 9px !important;
	margin: 0 !important;
	border-radius: 999px !important;
	background: #ffffff !important;
	border: 1px solid #cbd5e1 !important;
	color: #334155 !important;
	cursor: pointer !important;
	white-space: nowrap !important;
}

#allen-chat-root .allen-quick-pill:hover {
	border-color: #2563eb !important;
	color: #2563eb !important;
}

/* Chat Messages Container */
.allen-messages-box {
	flex: 1;
	padding: 10px 12px;
	overflow-y: auto;
	background: #f1f5f9;
	display: flex;
	flex-direction: column;
	gap: 8px;
	-webkit-overflow-scrolling: touch;
}

.allen-msg-row {
	display: flex;
	align-items: flex-start;
	gap: 7px;
}

.allen-msg-row.allen-msg-user {
	justify-content: flex-end;
}

.allen-msg-icon {
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background: #2563eb;
	color: #fff;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 2px;
}

.allen-msg-icon.icon-admin {
	background: #f59e0b;
	font-weight: 700;
	font-size: 10px;
}

.allen-msg-bubble {
	max-width: 84%;
	padding: 8px 11px;
	border-radius: 12px;
	font-size: 12.5px;
	line-height: 1.5;
	word-break: break-word;
}

.allen-msg-ai .allen-msg-bubble {
	background: #ffffff;
	color: #1e293b;
	border: 1px solid #e2e8f0;
	border-top-left-radius: 4px;
}

.allen-msg-admin .allen-msg-bubble {
	background: #fffbeb;
	color: #1e293b;
	border: 1px solid #fcd34d;
	border-top-left-radius: 4px;
}

.allen-msg-user .allen-msg-bubble {
	background: #2563eb;
	color: #ffffff;
	border-top-right-radius: 4px;
}

.allen-msg-system {
	text-align: center;
	font-size: 11px;
	color: #64748b;
	background: rgba(226, 232, 240, 0.8);
	padding: 3px 10px;
	border-radius: 999px;
	align-self: center;
}

.allen-chat-link {
	color: #2563eb;
	text-decoration: underline;
	font-weight: 500;
}

.allen-msg-user .allen-chat-link {
	color: #bfdbfe;
}

.allen-chat-img {
	max-width: 100%;
	border-radius: 8px;
	margin-top: 5px;
	cursor: pointer;
	display: block;
}

.allen-order-status {
	color: #059669;
	font-weight: 700;
}

/* Drawers (Order Lookup / Contact) */
.allen-drawer {
	display: none;
	padding: 10px 12px;
	background: #eff6ff;
	border-top: 1px solid #bfdbfe;
	font-size: 12px;
	flex-shrink: 0;
}

.allen-drawer.active {
	display: block;
}

.allen-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 700;
	margin-bottom: 6px;
	color: #1e3a8a;
}

.allen-drawer-inputs {
	display: flex;
	gap: 6px;
	margin-bottom: 6px;
}

#allen-chat-root .allen-drawer-inputs input {
	flex: 1 !important;
	min-width: 0 !important;
	width: 100% !important;
	padding: 6px 8px !important;
	margin: 0 !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 6px !important;
	font-size: 12px !important;
	background: #fff !important;
	color: #1e293b !important;
}

#allen-chat-root .allen-drawer-btn {
	width: 100% !important;
	padding: 7px 10px !important;
	margin: 0 !important;
	background: #2563eb !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	font-size: 12px !important;
}

/* Channel Dedicated View (Telegram / WhatsApp Windows) */
.allen-channel-panel {
	display: none;
	flex: 1;
	padding: 16px;
	background: #f8fafc;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow-y: auto;
}

.allen-channel-panel.active {
	display: flex;
}

.allen-channel-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 18px 16px;
	width: 100%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.allen-channel-cta {
	display: inline-block;
	width: 100%;
	padding: 9px 12px;
	border-radius: 8px;
	color: #ffffff !important;
	font-weight: 600;
	text-decoration: none !important;
	margin-top: 10px;
	font-size: 13px;
}

/* Input Area - Strictly constrained so Send button never overflows on mobile */
.allen-input-bar {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 8px 10px !important;
	background: #ffffff !important;
	border-top: 1px solid #e2e8f0 !important;
	flex-shrink: 0 !important;
	width: 100% !important;
}

.allen-upload-btn,
#allen-chat-root .allen-emoji-btn {
	background: #f1f5f9 !important;
	border: 1px solid #cbd5e1 !important;
	color: #475569 !important;
	border-radius: 8px !important;
	width: 34px !important;
	height: 34px !important;
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	font-size: 15px !important;
	transition: background 0.15s ease;
}

.allen-upload-btn:hover,
#allen-chat-root .allen-emoji-btn:hover {
	background: #e2e8f0 !important;
}

.allen-emoji-picker {
	display: none;
	grid-template-columns: repeat(8, 1fr);
	gap: 4px;
	padding: 8px;
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
	max-height: 165px;
	overflow-y: auto;
	flex-shrink: 0;
}

.allen-emoji-picker.active {
	display: grid;
}

#allen-chat-root .allen-emoji-item {
	background: transparent !important;
	border: none !important;
	border-radius: 6px !important;
	font-size: 19px !important;
	line-height: 1 !important;
	padding: 5px 0 !important;
	margin: 0 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 0 !important;
	width: 100% !important;
	box-shadow: none !important;
	transition: background 0.12s ease, transform 0.12s ease;
}

#allen-chat-root .allen-emoji-item:hover {
	background: #eff6ff !important;
	transform: scale(1.15);
}

#allen-chat-root .allen-text-input {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	width: auto !important;
	height: 34px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	padding: 6px 10px !important;
	margin: 0 !important;
	font-size: 13px !important;
	line-height: 1.2 !important;
	outline: none !important;
	background: #f8fafc !important;
	color: #0f172a !important;
	box-shadow: none !important;
}

#allen-chat-root .allen-text-input:focus {
	border-color: #2563eb !important;
	background: #ffffff !important;
}

#allen-chat-root .allen-send-btn {
	background: #2563eb !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	height: 34px !important;
	padding: 0 13px !important;
	margin: 0 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 34px !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	white-space: nowrap !important;
}

#allen-chat-root .allen-send-btn:disabled {
	opacity: 0.6 !important;
	cursor: not-allowed !important;
}

/* Rich WooCommerce Product Card inside Chat Bubbles */
#allen-chat-root .allen-prod-card {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	padding: 9px;
	background: #ffffff;
	border: 1px solid #dbeafe;
	border-radius: 12px;
	box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
	text-align: left;
}

#allen-chat-root .allen-pcard-thumb-link {
	flex-shrink: 0;
	display: block;
	width: 62px;
	height: 62px;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
}

#allen-chat-root .allen-pcard-thumb {
	width: 62px !important;
	height: 62px !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 !important;
	border-radius: 8px !important;
}

#allen-chat-root .allen-pcard-info {
	flex: 1;
	min-width: 0;
}

#allen-chat-root .allen-pcard-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 12.5px;
	font-weight: 700;
	color: #0f172a !important;
	text-decoration: none !important;
	line-height: 1.35;
	margin-bottom: 4px;
}

#allen-chat-root .allen-pcard-title:hover {
	color: #2563eb !important;
}

#allen-chat-root .allen-pcard-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

#allen-chat-root .allen-pcard-price {
	font-size: 13px;
	font-weight: 800;
	color: #dc2626;
}

#allen-chat-root .allen-pcard-stock {
	font-size: 10px;
	font-weight: 600;
	padding: 1px 5px;
	border-radius: 4px;
}

#allen-chat-root .allen-pcard-stock.in-stock {
	background: #dcfce7;
	color: #15803d;
}

#allen-chat-root .allen-pcard-stock.out-stock {
	background: #fee2e2;
	color: #b91c1c;
}

#allen-chat-root .allen-pcard-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

#allen-chat-root .allen-pcard-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 4px 10px !important;
	border-radius: 999px !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	line-height: 1.3 !important;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

#allen-chat-root .allen-pcard-btn.primary {
	background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
	color: #ffffff !important;
}

#allen-chat-root .allen-pcard-btn.secondary {
	background: #f1f5f9 !important;
	color: #334155 !important;
	border: 1px solid #cbd5e1 !important;
}

#allen-chat-root .allen-pcard-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

/* Non-blocking Post-First-Message Email Capture Bar */
#allen-email-capture-bar {
	display: none;
	flex-direction: column;
	gap: 6px;
	padding: 8px 11px 9px;
	background: #eff6ff;
	border-top: 1px solid #bfdbfe;
	animation: allenSlideUp 0.22s ease;
}

#allen-email-capture-bar.active {
	display: flex !important;
}

#allen-email-capture-bar.is-saved {
	background: #f0fdf4;
	border-top-color: #bbf7d0;
}

.allen-email-cap-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	font-size: 11.5px;
	font-weight: 600;
	color: #1e40af;
	line-height: 1.35;
}

#allen-email-capture-bar.is-saved .allen-email-cap-top {
	color: #15803d;
}

#allen-chat-root .allen-email-cap-close {
	background: transparent !important;
	border: none !important;
	color: #64748b !important;
	font-size: 13px !important;
	line-height: 1 !important;
	padding: 1px 4px !important;
	margin: 0 !important;
	cursor: pointer !important;
	min-width: 0 !important;
	width: auto !important;
	box-shadow: none !important;
}

.allen-email-cap-form {
	display: flex;
	align-items: center;
	gap: 6px;
}

#allen-chat-root .allen-email-cap-input {
	flex: 1;
	min-width: 0;
	padding: 5px 9px !important;
	font-size: 12px !important;
	line-height: 1.3 !important;
	border: 1px solid #93c5fd !important;
	border-radius: 8px !important;
	background: #ffffff !important;
	color: #0f172a !important;
	outline: none !important;
	margin: 0 !important;
	height: auto !important;
}

#allen-chat-root .allen-email-cap-input:focus {
	border-color: #2563eb !important;
}

#allen-chat-root .allen-email-cap-btn {
	flex-shrink: 0;
	padding: 5px 12px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	border: none !important;
	border-radius: 8px !important;
	background: #2563eb !important;
	color: #ffffff !important;
	cursor: pointer !important;
	margin: 0 !important;
	width: auto !important;
	min-width: 0 !important;
}

#allen-chat-root .allen-email-cap-btn:hover {
	background: #1d4ed8 !important;
}

#allen-chat-root .allen-email-cap-btn:disabled {
	opacity: 0.6 !important;
	cursor: not-allowed !important;
}

/* ============================================================================
   MOBILE RESPONSIVE OPTIMIZATION (Bottom Sheet / Compact Card at Bottom)
   ============================================================================ */
@media (max-width: 640px) {
	#allen-chat-root {
		right: 12px;
		bottom: 14px;
		left: auto;
	}

	/* When open on mobile, dock neatly at the very bottom with rounded top corners */
	#allen-chat-root.allen-is-open {
		left: 8px;
		right: 8px;
		bottom: 8px;
	}

	#allen-chat-window {
		width: 100% !important;
		max-width: 100% !important;
		height: 62vh !important;
		height: 62dvh !important;
		max-height: 460px !important;
		min-height: 320px !important;
		border-radius: 16px !important;
		box-shadow: 0 -6px 32px rgba(15, 23, 42, 0.28), 0 12px 28px rgba(15, 23, 42, 0.25) !important;
	}

	.allen-chat-header {
		padding: 9px 10px 8px;
	}

	.allen-avatar {
		width: 28px;
		height: 28px;
		font-size: 12px;
	}

	.allen-title-row {
		font-size: 13px;
	}

	.allen-subtitle {
		font-size: 10.5px;
	}

	#allen-chat-root .allen-btn-handoff {
		padding: 4px 7px !important;
		font-size: 11px !important;
	}

	#allen-chat-root .allen-btn-close {
		padding: 4px 8px !important;
		font-size: 11.5px !important;
	}

	/* Prevent iOS Safari auto-zoom when focusing input while keeping compact visual look */
	#allen-chat-root .allen-text-input {
		font-size: 16px !important;
		transform: scale(0.875);
		transform-origin: left center;
		margin-right: -12% !important;
	}

	#allen-chat-preview-bubble {
		width: min(276px, calc(100vw - 24px));
		bottom: calc(100% + 11px);
		padding: 10px 12px 9px !important;
	}
}
