/**
 * FEF Chat — frontend styles.
 *
 * Theme is fully CSS-variable driven so the Elementor Style controls only
 * need to set a handful of custom properties. All motion uses GPU-accelerated
 * transform / opacity, and every animation is disabled under the widget's
 * reduced-motion class and the OS prefers-reduced-motion media query.
 */

.fef-chat {
	--fef-chat-z: 99990;
	--fef-chat-offset-x: 24px;
	--fef-chat-offset-y: 24px;
	--fef-chat-btn-size: 62px;
	--fef-chat-btn-icon: 28px;
	--fef-chat-btn-icon-color: #fff;
	--fef-chat-anim-speed: 2000ms;
	--fef-chat-anim-delay: 0ms;
	--fef-chat-accent: #25d366;
	--fef-chat-avatar: 52px;
	position: fixed;
	z-index: var(--fef-chat-z);
	font-family: inherit;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}

/* ── Positions ─────────────────────────────────────────────── */
.fef-chat-pos-bottom-right { right: var(--fef-chat-offset-x); bottom: var(--fef-chat-offset-y); }
.fef-chat-pos-bottom-left  { left: var(--fef-chat-offset-x);  bottom: var(--fef-chat-offset-y); }
.fef-chat-pos-top-right    { right: var(--fef-chat-offset-x); top: var(--fef-chat-offset-y); }
.fef-chat-pos-top-left     { left: var(--fef-chat-offset-x);  top: var(--fef-chat-offset-y); }
.fef-chat-pos-center-right { right: var(--fef-chat-offset-x); top: 50%; transform: translateY(-50%); }
.fef-chat-pos-center-left  { left: var(--fef-chat-offset-x);  top: 50%; transform: translateY(-50%); }

/* Safe-area (device notch) support. */
.fef-chat-safe.fef-chat-pos-bottom-right,
.fef-chat-safe.fef-chat-pos-bottom-left { bottom: calc(var(--fef-chat-offset-y) + env(safe-area-inset-bottom, 0px)); }
.fef-chat-safe.fef-chat-pos-bottom-right { right: calc(var(--fef-chat-offset-x) + env(safe-area-inset-right, 0px)); }
.fef-chat-safe.fef-chat-pos-bottom-left  { left: calc(var(--fef-chat-offset-x) + env(safe-area-inset-left, 0px)); }

/* ════════════════════════════════════════════════════════════
 * FLOATING BUTTON
 * ══════════════════════════════════════════════════════════ */
.fef-chat-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: var(--fef-chat-btn-size);
	height: var(--fef-chat-btn-size);
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--fef-chat-accent);
	color: var(--fef-chat-btn-icon-color);
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
	will-change: transform;
	-webkit-tap-highlight-color: transparent;
}
.fef-chat-btn:focus-visible { outline: 3px solid rgba(37, 211, 102, 0.5); outline-offset: 3px; }

.fef-chat-btn-icon { display: inline-flex; align-items: center; justify-content: center; }
.fef-chat-btn-icon svg { width: var(--fef-chat-btn-icon); height: var(--fef-chat-btn-icon); color: var(--fef-chat-btn-icon-color); }
.fef-chat-btn-icon i { font-size: var(--fef-chat-btn-icon); color: var(--fef-chat-btn-icon-color); }
.fef-chat-btn-img { width: var(--fef-chat-btn-icon); height: var(--fef-chat-btn-icon); object-fit: contain; }
.fef-chat-btn-label { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* Pill button when a label is present. */
.fef-chat-btn:has(.fef-chat-btn-label) { width: auto; border-radius: 40px; padding: 0 22px 0 18px; }

/* Open / close icon crossfade. */
.fef-chat-icon-close { position: absolute; opacity: 0; transform: scale(0.4) rotate(-90deg); transition: opacity 0.25s ease, transform 0.25s ease; }
.fef-chat-icon-open  { opacity: 1; transform: scale(1) rotate(0); transition: opacity 0.25s ease, transform 0.25s ease; }
.fef-chat-open .fef-chat-icon-open  { opacity: 0; transform: scale(0.4) rotate(90deg); }
.fef-chat-open .fef-chat-icon-close { opacity: 1; transform: scale(1) rotate(0); }

/* ── Button style presets ─────────────────────────────────── */
.fef-chat-style-rounded .fef-chat-btn,
.fef-chat-btn.fef-chat-style-rounded { border-radius: 18px; }
.fef-chat-style-square { border-radius: 8px; }
.fef-chat-style-glass,
.fef-chat-style-glassmorphism {
	background: rgba(255, 255, 255, 0.14);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.35);
}
.fef-chat-style-gradient { background: linear-gradient(135deg, #25d366, #128c7e); }
.fef-chat-style-material { box-shadow: 0 6px 10px rgba(0, 0, 0, 0.14), 0 1px 18px rgba(0, 0, 0, 0.12), 0 3px 5px rgba(0, 0, 0, 0.2); }
.fef-chat-style-minimal { background: transparent; color: var(--fef-chat-accent); box-shadow: none; border: 2px solid currentColor; }
.fef-chat-style-minimal svg { color: var(--fef-chat-accent); }
.fef-chat-style-corporate { border-radius: 12px; background: #1e3a8a; }
.fef-chat-style-modern { background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 20px; }
.fef-chat-style-neumorphism {
	background: #e0e5ec; color: #4b5563;
	box-shadow: 8px 8px 16px #b8bcc4, -8px -8px 16px #ffffff;
}
.fef-chat-style-neumorphism svg { color: #4b5563; }
.fef-chat-style-dark { background: #111827; }
.fef-chat-style-light { background: #ffffff; color: #111827; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.fef-chat-style-light svg { color: #111827; }

/* ── Idle animations ──────────────────────────────────────── */
.fef-chat-anim-pulse:not(.fef-chat-open)     { animation: fefChatPulse var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite; }
.fef-chat-anim-heartbeat:not(.fef-chat-open) { animation: fefChatHeart var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite; }
.fef-chat-anim-bounce:not(.fef-chat-open)    { animation: fefChatBounce var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite; }
.fef-chat-anim-shake:not(.fef-chat-open)     { animation: fefChatShake var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite; }
.fef-chat-anim-glow:not(.fef-chat-open)      { animation: fefChatGlow var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite; }
.fef-chat-anim-rotate:not(.fef-chat-open) .fef-chat-icon-open { animation: fefChatRotate var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite linear; }
.fef-chat-anim-float:not(.fef-chat-open)     { animation: fefChatFloat var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite ease-in-out; }
.fef-chat-anim-wave:not(.fef-chat-open) .fef-chat-icon-open { animation: fefChatWave var(--fef-chat-anim-speed) var(--fef-chat-anim-delay) infinite; transform-origin: 70% 70%; }

@keyframes fefChatPulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); } 70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
@keyframes fefChatHeart { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
@keyframes fefChatBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fefChatShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes fefChatGlow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(37, 211, 102, 0)); } 50% { filter: drop-shadow(0 0 14px rgba(37, 211, 102, 0.8)); } }
@keyframes fefChatRotate { to { transform: rotate(360deg); } }
@keyframes fefChatFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fefChatWave { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }

/* ── Hover animations ─────────────────────────────────────── */
.fef-chat-hover-grow:hover   { transform: scale(1.08); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24); }
.fef-chat-pos-center-right.fef-chat-hover-grow .fef-chat-btn:hover,
.fef-chat-hover-shrink:hover { transform: scale(0.92); }
.fef-chat-hover-spin:hover   { transform: rotate(15deg) scale(1.05); }
.fef-chat-hover-wobble:hover { animation: fefChatShake 0.5s; }

/* ════════════════════════════════════════════════════════════
 * NOTIFICATION BADGE
 * ══════════════════════════════════════════════════════════ */
.fef-chat-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #ff3b30;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	box-shadow: 0 0 0 2px #fff;
	pointer-events: none;
}
.fef-chat-pos-bottom-left .fef-chat-badge,
.fef-chat-pos-top-left .fef-chat-badge,
.fef-chat-pos-center-left .fef-chat-badge { right: auto; left: -2px; }
.fef-chat-badge-pulse  { animation: fefChatBadgePulse 1.6s infinite; }
.fef-chat-badge-blink  { animation: fefChatBlink 1s steps(2, start) infinite; }
.fef-chat-badge-bounce { animation: fefChatBounce 1.2s infinite; }
@keyframes fefChatBadgePulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.6), 0 0 0 2px #fff; } 70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0), 0 0 0 2px #fff; } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0), 0 0 0 2px #fff; } }
@keyframes fefChatBlink { 50% { opacity: 0.25; } }

/* ════════════════════════════════════════════════════════════
 * TOOLTIP
 * ══════════════════════════════════════════════════════════ */
.fef-chat-tip {
	position: absolute;
	bottom: calc(var(--fef-chat-btn-size) + 14px);
	right: 0;
	max-width: 220px;
	padding: 10px 14px;
	background: #1e293b;
	color: #fff;
	font-size: 13px;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}
.fef-chat-pos-bottom-left .fef-chat-tip,
.fef-chat-pos-top-left .fef-chat-tip,
.fef-chat-pos-center-left .fef-chat-tip { right: auto; left: 0; }
.fef-chat-pos-top-right .fef-chat-tip,
.fef-chat-pos-top-left .fef-chat-tip { bottom: auto; top: calc(var(--fef-chat-btn-size) + 14px); }
.fef-chat-tip::after {
	content: ''; position: absolute; top: 100%; right: 22px;
	border: 7px solid transparent; border-top-color: #1e293b;
}
.fef-chat-pos-top-right .fef-chat-tip::after,
.fef-chat-pos-top-left .fef-chat-tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #1e293b; }
.fef-chat-tip-show { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
 * POPUP PANEL
 * ══════════════════════════════════════════════════════════ */
.fef-chat-overlay {
	position: fixed; inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: calc(var(--fef-chat-z) - 1);
	opacity: 0; transition: opacity 0.3s ease;
	display: none; /* desktop: the panel floats, no full-page dim */
}
.fef-chat-open .fef-chat-overlay { opacity: 1; }
@media (max-width: 767px) {
	/* Mobile bottom-sheet: dim the page behind the sheet. */
	.fef-chat-overlay:not([hidden]) { display: block; }
}

.fef-chat-panel {
	position: absolute;
	bottom: calc(var(--fef-chat-btn-size) + 18px);
	right: 0;
	width: 360px;
	max-width: 92vw;
	max-height: 78vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
	transform-origin: bottom right;
	opacity: 0;
	transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.34, 1.4, 0.5, 1);
	will-change: transform, opacity;
}
.fef-chat-pos-bottom-left .fef-chat-panel,
.fef-chat-pos-top-left .fef-chat-panel,
.fef-chat-pos-center-left .fef-chat-panel { right: auto; left: 0; transform-origin: bottom left; }
.fef-chat-pos-top-right .fef-chat-panel,
.fef-chat-pos-top-left .fef-chat-panel { bottom: auto; top: calc(var(--fef-chat-btn-size) + 18px); transform-origin: top right; }
.fef-chat-pos-center-right .fef-chat-panel,
.fef-chat-pos-center-left .fef-chat-panel { bottom: auto; top: 50%; }

/* Open-animation start states. */
.fef-chat-panel-anim-fade    { transform: none; }
.fef-chat-panel-anim-slide   { transform: translateY(20px); }
.fef-chat-panel-anim-zoom    { transform: scale(0.85); }
.fef-chat-panel-anim-flip    { transform: perspective(800px) rotateX(-14deg); }
.fef-chat-panel-anim-rotate  { transform: rotate(-6deg) scale(0.9); }
.fef-chat-panel-anim-scale   { transform: scale(0.6); }
.fef-chat-panel-anim-elastic { transform: scale(0.7); transition-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55); }
.fef-chat-panel-anim-bounce  { transform: translateY(30px); transition-timing-function: cubic-bezier(0.68, -0.6, 0.32, 1.6); }
.fef-chat-panel-anim-grow    { transform: scale(0.4); transform-origin: bottom right; }
.fef-chat-panel-anim-shrink  { transform: scale(1.3); }
.fef-chat-panel-anim-material{ transform: translateY(24px) scale(0.96); transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.fef-chat-panel-anim-none    { transition: none; transform: none; }

/* Open state — everything resolves to identity + full opacity. */
.fef-chat-open .fef-chat-panel { opacity: 1; transform: none; }
.fef-chat-open .fef-chat-panel-anim-flip { transform: perspective(800px) rotateX(0); }

/* ── Header ───────────────────────────────────────────────── */
.fef-chat-header {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 18px;
	background: linear-gradient(135deg, #25d366, #128c7e);
	color: #fff;
	flex-shrink: 0;
}
.fef-chat-header-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fef-chat-header-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, 0.2); }
.fef-chat-header-text { min-width: 0; }
.fef-chat-header-title { font-size: 16px; font-weight: 700; color: #fff; }
.fef-chat-header-sub { font-size: 12px; color: rgba(255, 255, 255, 0.85); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.fef-chat-close {
	flex-shrink: 0; width: 32px; height: 32px; border: none; border-radius: 50%;
	background: rgba(255, 255, 255, 0.18); color: #fff; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	transition: background 0.2s ease;
}
.fef-chat-close:hover { background: rgba(255, 255, 255, 0.32); }
.fef-chat-close svg { width: 18px; height: 18px; }

/* Status dots. */
.fef-chat-status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.fef-chat-status-online   { background: #22c55e; }
.fef-chat-status-offline  { background: #94a3b8; }
.fef-chat-status-busy     { background: #ef4444; }
.fef-chat-status-away     { background: #f59e0b; }
.fef-chat-status-vacation { background: #8b5cf6; }

/* ── Body ─────────────────────────────────────────────────── */
.fef-chat-body { padding: 16px; overflow-y: auto; flex: 1; background: #fff; -webkit-overflow-scrolling: touch; }
.fef-chat-offline {
	background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa;
	padding: 10px 12px; border-radius: 12px; font-size: 13px; margin-bottom: 12px;
}

/* ── Greeting ─────────────────────────────────────────────── */
.fef-chat-greet-bubble {
	background: #f1f5f9; border-radius: 4px 16px 16px 16px;
	padding: 14px 16px; margin-bottom: 16px;
	animation: fefChatGreetIn 0.4s ease both;
}
.fef-chat-greet-title { font-size: 15px; font-weight: 700; color: #111827; }
.fef-chat-greet-sub { font-size: 13px; color: #475569; margin-top: 2px; }
.fef-chat-greet-msg { font-size: 13px; color: #374151; margin-top: 6px; }
@keyframes fefChatGreetIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fef-chat-greet-typing .fef-chat-greet-msg::after {
	content: '●●●'; display: inline-block; margin-left: 6px; letter-spacing: 2px;
	color: #94a3b8; animation: fefChatTyping 1.4s infinite;
}
@keyframes fefChatTyping { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }

/* ════════════════════════════════════════════════════════════
 * TEAM MEMBERS
 * ══════════════════════════════════════════════════════════ */
.fef-chat-team { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.fef-chat-member {
	display: flex; align-items: center; gap: 12px; width: 100%;
	padding: 10px 12px; border: none; border-radius: 14px;
	background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	cursor: pointer; text-align: left;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.fef-chat-member:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); }
.fef-chat-member:focus-visible { outline: 2px solid var(--fef-chat-accent); outline-offset: 2px; }
.fef-chat-member-avatar {
	position: relative; flex-shrink: 0;
	width: var(--fef-chat-avatar); height: var(--fef-chat-avatar);
	border-radius: 50%; overflow: visible;
}
.fef-chat-member-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fef-chat-member-initial {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%; border-radius: 50%;
	background: linear-gradient(135deg, #667eea, #764ba2); color: #fff;
	font-weight: 700; font-size: calc(var(--fef-chat-avatar) * 0.4);
}
.fef-chat-member-dot {
	position: absolute; bottom: 1px; right: 1px;
	width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff;
}
.fef-chat-member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fef-chat-member-name { font-size: 14px; font-weight: 700; color: #111827; display: flex; align-items: center; gap: 5px; }
.fef-chat-member-verified svg { width: 15px; height: 15px; color: #3b82f6; }
.fef-chat-member-role { font-size: 12px; color: #6b7280; }
.fef-chat-member-resp { font-size: 11px; color: #94a3b8; }
.fef-chat-member-go { flex-shrink: 0; color: var(--fef-chat-accent); }
.fef-chat-member-go svg { width: 22px; height: 22px; }

/* Layout variants. */
.fef-chat-team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fef-chat-team-grid .fef-chat-member { flex-direction: column; text-align: center; }
.fef-chat-team-grid .fef-chat-member-info { align-items: center; }
.fef-chat-team-grid .fef-chat-member-go { display: none; }
.fef-chat-team-compact .fef-chat-member { padding: 6px 10px; }
.fef-chat-team-compact { --fef-chat-avatar: 38px; }
.fef-chat-team-cards .fef-chat-member { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); padding: 14px; }
.fef-chat-team-glass .fef-chat-member { background: rgba(255, 255, 255, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.6); }
.fef-chat-team-modern .fef-chat-member { border-radius: 18px; background: linear-gradient(135deg, #ffffff, #f8fafc); }
.fef-chat-team-carousel { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.fef-chat-team-carousel .fef-chat-member { flex: 0 0 78%; scroll-snap-align: start; }

/* ════════════════════════════════════════════════════════════
 * CHANNELS
 * ══════════════════════════════════════════════════════════ */
.fef-chat-channels { display: flex; flex-direction: column; gap: 10px; }
.fef-chat-ch {
	--fef-chat-ch-color: #25d366;
	display: flex; align-items: center; gap: 12px; width: 100%;
	padding: 12px 14px; border: 1px solid #f1f5f9; border-radius: 14px;
	background: #fff; cursor: pointer; text-align: left;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.fef-chat-ch:hover { background: #f8fafc; transform: translateX(2px); border-color: var(--fef-chat-ch-color); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06); }
.fef-chat-ch:focus-visible { outline: 2px solid var(--fef-chat-ch-color); outline-offset: 2px; }
.fef-chat-ch-icon {
	flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--fef-chat-ch-color); color: #fff;
}
.fef-chat-ch-icon svg { width: 24px; height: 24px; }
.fef-chat-ch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fef-chat-ch-name { font-size: 14px; font-weight: 700; color: #111827; }
.fef-chat-ch-desc { font-size: 12px; color: #6b7280; }
.fef-chat-ch-arrow { flex-shrink: 0; color: #cbd5e1; font-size: 22px; line-height: 1; }

/* ════════════════════════════════════════════════════════════
 * LEAD FORM
 * ══════════════════════════════════════════════════════════ */
.fef-chat-lead { display: flex; flex-direction: column; gap: 12px; animation: fefChatGreetIn 0.3s ease both; }
.fef-chat-lead-title { font-size: 15px; font-weight: 700; color: #111827; }
.fef-chat-lead-field { display: flex; flex-direction: column; gap: 4px; }
.fef-chat-lead-label { font-size: 12px; font-weight: 600; color: #475569; }
.fef-chat-req { color: #ef4444; }
.fef-chat-lead input,
.fef-chat-lead textarea {
	width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px;
	background: #f8fafc; color: #111827; font-size: 14px; font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fef-chat-lead input:focus,
.fef-chat-lead textarea:focus { outline: none; border-color: var(--fef-chat-accent); box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15); }
.fef-chat-lead-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #475569; }
.fef-chat-lead-consent input { width: auto; margin-top: 2px; }
.fef-chat-lead-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.fef-chat-lead-submit {
	padding: 12px; border: none; border-radius: 12px;
	background: var(--fef-chat-accent); color: #fff; font-size: 15px; font-weight: 700;
	cursor: pointer; transition: filter 0.2s ease, transform 0.2s ease;
}
.fef-chat-lead-submit:hover { filter: brightness(1.05); }
.fef-chat-lead-submit:active { transform: scale(0.98); }
.fef-chat-lead-submit.fef-chat-loading { opacity: 0.7; pointer-events: none; }
.fef-chat-lead-submit.fef-chat-loading::after {
	content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%;
	vertical-align: middle; animation: fefChatSpin 0.7s linear infinite;
}
@keyframes fefChatSpin { to { transform: rotate(360deg); } }

/* ── Footer ───────────────────────────────────────────────── */
.fef-chat-footer { padding: 10px 16px; text-align: center; font-size: 11px; color: #9ca3af; background: #fff; border-top: 1px solid #f1f5f9; flex-shrink: 0; }
.fef-chat-footer a { color: inherit; text-decoration: none; }
.fef-chat-footer a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
 * RESPONSIVE — mobile bottom sheet
 * ══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
	.fef-chat-panel {
		position: fixed;
		left: 0; right: 0; bottom: 0; top: auto;
		width: 100%; max-width: 100%;
		max-height: 88vh;
		border-radius: 22px 22px 0 0;
		transform-origin: bottom center !important;
	}
	.fef-chat-panel[class*="fef-chat-panel-anim-"] { transform: translateY(100%); }
	.fef-chat-open .fef-chat-panel { transform: none; }
	.fef-chat-tip { display: none; }
}

/* ════════════════════════════════════════════════════════════
 * ACCESSIBILITY — reduced motion + high contrast
 * ══════════════════════════════════════════════════════════ */
.fef-chat-reduced,
.fef-chat-reduced * { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
	.fef-chat *,
	.fef-chat *::before,
	.fef-chat *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

@media (prefers-contrast: more) {
	.fef-chat-btn { border: 2px solid #000; }
	.fef-chat-ch, .fef-chat-member { border: 1px solid #000; }
	.fef-chat-ch-desc, .fef-chat-member-role { color: #1f2937; }
}

/* Elementor editor safety — never let the invisible class hide us. */
.elementor-widget-fef_chat .elementor-invisible { visibility: visible !important; opacity: 1 !important; }

/* ════════════════════════════════════════════════════════════
 * DESIGN PRESETS (coordinated palettes; Style-tab controls win)
 * ══════════════════════════════════════════════════════════ */
.fef-chat-preset-modern    { --fef-chat-accent: #6366f1; }
.fef-chat-preset-modern .fef-chat-btn { background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 20px; }
.fef-chat-preset-modern .fef-chat-header { background: linear-gradient(135deg, #667eea, #764ba2); }

.fef-chat-preset-minimal   { --fef-chat-accent: #111827; }
.fef-chat-preset-minimal .fef-chat-btn { background: #111827; box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.fef-chat-preset-minimal .fef-chat-header { background: #111827; }
.fef-chat-preset-minimal .fef-chat-ch-icon { border-radius: 8px; }

.fef-chat-preset-business  { --fef-chat-accent: #0ea5e9; }
.fef-chat-preset-business .fef-chat-btn { background: #0369a1; }
.fef-chat-preset-business .fef-chat-header { background: linear-gradient(135deg, #0ea5e9, #0369a1); }

.fef-chat-preset-dark      { --fef-chat-accent: #22c55e; }
.fef-chat-preset-dark .fef-chat-btn { background: #16a34a; }
.fef-chat-preset-dark .fef-chat-panel { background: #0f172a; }
.fef-chat-preset-dark .fef-chat-body,
.fef-chat-preset-dark .fef-chat-footer { background: #0f172a; }
.fef-chat-preset-dark .fef-chat-header { background: #111827; }
.fef-chat-preset-dark .fef-chat-ch,
.fef-chat-preset-dark .fef-chat-member { background: #1e293b; border-color: #1e293b; }
.fef-chat-preset-dark .fef-chat-ch-name,
.fef-chat-preset-dark .fef-chat-member-name,
.fef-chat-preset-dark .fef-chat-greet-title { color: #f1f5f9; }
.fef-chat-preset-dark .fef-chat-ch-desc,
.fef-chat-preset-dark .fef-chat-member-role,
.fef-chat-preset-dark .fef-chat-greet-msg { color: #94a3b8; }
.fef-chat-preset-dark .fef-chat-greet-bubble { background: #1e293b; }
.fef-chat-preset-dark .fef-chat-footer { border-top-color: #1e293b; }

.fef-chat-preset-corporate { --fef-chat-accent: #1e3a8a; }
.fef-chat-preset-corporate .fef-chat-btn { background: #1e3a8a; border-radius: 12px; }
.fef-chat-preset-corporate .fef-chat-header { background: #1e3a8a; }
.fef-chat-preset-corporate .fef-chat-panel { border-radius: 12px; }

.fef-chat-preset-glass     { --fef-chat-accent: #0ea5e9; }
.fef-chat-preset-glass .fef-chat-btn { background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.4); }
.fef-chat-preset-glass .fef-chat-panel { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.fef-chat-preset-glass .fef-chat-body,
.fef-chat-preset-glass .fef-chat-footer { background: transparent; }
.fef-chat-preset-glass .fef-chat-header { background: rgba(14,165,233,.85); }

.fef-chat-preset-gradient  { --fef-chat-accent: #ec4899; }
.fef-chat-preset-gradient .fef-chat-btn { background: linear-gradient(135deg, #f093fb, #f5576c); }
.fef-chat-preset-gradient .fef-chat-header { background: linear-gradient(135deg, #f093fb, #f5576c); }

.fef-chat-preset-material  { --fef-chat-accent: #009688; }
.fef-chat-preset-material .fef-chat-btn { background: #009688; box-shadow: 0 6px 10px rgba(0,0,0,.14), 0 3px 5px rgba(0,0,0,.2); }
.fef-chat-preset-material .fef-chat-header { background: #009688; }
.fef-chat-preset-material .fef-chat-panel { border-radius: 8px; }

.fef-chat-preset-rounded   { --fef-chat-accent: #f59e0b; }
.fef-chat-preset-rounded .fef-chat-btn { background: #f59e0b; border-radius: 24px; }
.fef-chat-preset-rounded .fef-chat-panel { border-radius: 28px; }
.fef-chat-preset-rounded .fef-chat-header { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.fef-chat-preset-rounded .fef-chat-ch,
.fef-chat-preset-rounded .fef-chat-member { border-radius: 20px; }

.fef-chat-preset-neon      { --fef-chat-accent: #22d3ee; }
.fef-chat-preset-neon .fef-chat-btn { background: #0b1020; border: 1px solid #22d3ee; box-shadow: 0 0 18px rgba(34,211,238,.7); }
.fef-chat-preset-neon .fef-chat-btn svg { color: #22d3ee; }
.fef-chat-preset-neon .fef-chat-panel { background: #0b1020; }
.fef-chat-preset-neon .fef-chat-body,
.fef-chat-preset-neon .fef-chat-footer { background: #0b1020; }
.fef-chat-preset-neon .fef-chat-header { background: #0b1020; border-bottom: 1px solid rgba(34,211,238,.4); }
.fef-chat-preset-neon .fef-chat-ch,
.fef-chat-preset-neon .fef-chat-member { background: #131a2e; border-color: rgba(34,211,238,.25); }
.fef-chat-preset-neon .fef-chat-ch-name,
.fef-chat-preset-neon .fef-chat-member-name,
.fef-chat-preset-neon .fef-chat-header-title,
.fef-chat-preset-neon .fef-chat-greet-title { color: #e0f2fe; }
.fef-chat-preset-neon .fef-chat-greet-bubble { background: #131a2e; }

.fef-chat-preset-clean     { --fef-chat-accent: #10b981; }
.fef-chat-preset-clean .fef-chat-btn { background: #10b981; box-shadow: 0 4px 14px rgba(16,185,129,.3); }
.fef-chat-preset-clean .fef-chat-header { background: #fff; color: #111827; border-bottom: 1px solid #f1f5f9; }
.fef-chat-preset-clean .fef-chat-header-title { color: #111827; }
.fef-chat-preset-clean .fef-chat-header-sub { color: #6b7280; }
.fef-chat-preset-clean .fef-chat-close { background: #f1f5f9; color: #111827; }
.fef-chat-preset-clean .fef-chat-ch { border-color: #eef2f7; }

.fef-chat-preset-elegant   { --fef-chat-accent: #a16207; }
.fef-chat-preset-elegant .fef-chat-btn { background: #1c1917; border: 1px solid #a16207; }
.fef-chat-preset-elegant .fef-chat-btn svg { color: #d4af37; }
.fef-chat-preset-elegant .fef-chat-header { background: #1c1917; }
.fef-chat-preset-elegant .fef-chat-header-title { color: #d4af37; }
.fef-chat-preset-elegant .fef-chat-panel { border-radius: 6px; }

/* ════════════════════════════════════════════════════════════
 * EXTRA TEAM LAYOUTS
 * ══════════════════════════════════════════════════════════ */
/* Horizontal: avatars in a scrolling row, name under each. */
.fef-chat-team-horizontal { flex-direction: row; overflow-x: auto; gap: 14px; padding-bottom: 6px; }
.fef-chat-team-horizontal .fef-chat-member { flex: 0 0 auto; flex-direction: column; width: 92px; text-align: center; box-shadow: none; background: transparent; padding: 4px; }
.fef-chat-team-horizontal .fef-chat-member-info { align-items: center; }
.fef-chat-team-horizontal .fef-chat-member-role,
.fef-chat-team-horizontal .fef-chat-member-resp,
.fef-chat-team-horizontal .fef-chat-member-go { display: none; }

/* Timeline: vertical connector line down the left of each member. */
.fef-chat-team-timeline { position: relative; padding-left: 14px; }
.fef-chat-team-timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #e2e8f0; }
.fef-chat-team-timeline .fef-chat-member { background: transparent; box-shadow: none; border-radius: 10px; }
.fef-chat-team-timeline .fef-chat-member::before { content: ''; position: absolute; left: -12px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--fef-chat-accent); transform: translateY(-50%); }
.fef-chat-team-timeline .fef-chat-member { position: relative; }

/* Accordion: compact rows that reveal the bio on hover/focus. */
.fef-chat-team-accordion .fef-chat-member { flex-wrap: wrap; }
.fef-chat-team-accordion .fef-chat-member-info { flex: 1 1 auto; }
.fef-chat-team-accordion .fef-chat-member-resp { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.fef-chat-team-accordion .fef-chat-member:hover .fef-chat-member-resp,
.fef-chat-team-accordion .fef-chat-member:focus-within .fef-chat-member-resp { max-height: 40px; }

/* Lottie icon holder — fills the button icon box; SVG fallback inherits size. */
.fef-chat-lottie { display: inline-flex; align-items: center; justify-content: center; width: var(--fef-chat-btn-icon); height: var(--fef-chat-btn-icon); }
.fef-chat-lottie svg { width: 100%; height: 100%; }
.fef-chat-lottie lottie-player { width: 100%; height: 100%; }

/* ════════════════════════════════════════════════════════════
 * THEME HARDENING
 *
 * This is a portable floating widget that must look identical on every
 * theme. Many themes ship high-specificity resets on button / span / img /
 * flex that collapse the widget's internal layout (the classic symptom:
 * member avatars stretch into full-width ovals because the row flex was
 * overridden to a block). The rules below re-assert only the STRUCTURAL
 * properties themes commonly clobber — never colour/typography, which stay
 * overridable by the Elementor Style controls.
 * ══════════════════════════════════════════════════════════ */
.fef-chat, .fef-chat *, .fef-chat *::before, .fef-chat *::after { box-sizing: border-box !important; }

/* Neutralise theme button resets without killing our own backgrounds. */
.fef-chat button {
	margin: 0 !important;
	font-family: inherit;
	line-height: normal;
	text-transform: none !important;
	letter-spacing: normal !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	min-height: 0 !important;
	width: auto;
}
.fef-chat img { max-width: 100%; height: auto; }

/* Member row must stay horizontal (grid/horizontal variants override below). */
.fef-chat .fef-chat-member {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	width: 100% !important;
	text-align: left;
}
.fef-chat .fef-chat-team-grid .fef-chat-member,
.fef-chat .fef-chat-team-horizontal .fef-chat-member {
	flex-direction: column !important;
	align-items: center !important;
	text-align: center;
}

/* Avatar is always a fixed circle, whatever the theme does to spans. */
.fef-chat .fef-chat-member-avatar {
	display: inline-flex !important;
	flex: 0 0 auto !important;
	width: var(--fef-chat-avatar) !important;
	height: var(--fef-chat-avatar) !important;
	aspect-ratio: 1 / 1 !important;
	border-radius: 50% !important;
	overflow: visible !important;
	padding: 0 !important;
	background: none !important;
}
.fef-chat .fef-chat-member-initial,
.fef-chat .fef-chat-member-avatar img {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 1 / 1 !important;
	border-radius: 50% !important;
	margin: 0 !important;
}
.fef-chat .fef-chat-member-dot {
	position: absolute !important;
	width: 13px !important;
	height: 13px !important;
	flex: 0 0 auto !important;
	padding: 0 !important;
}
.fef-chat .fef-chat-member-info { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; min-width: 0 !important; }

/* Channel row must stay horizontal, icon a fixed square. */
.fef-chat .fef-chat-ch {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	width: 100% !important;
	text-align: left;
}
.fef-chat .fef-chat-ch-icon {
	display: inline-flex !important;
	flex: 0 0 auto !important;
	width: 42px !important;
	height: 42px !important;
	padding: 0 !important;
}
.fef-chat .fef-chat-ch-text { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; min-width: 0 !important; }

/* Panel + button must not be shrunk or floated by theme rules. */
.fef-chat .fef-chat-panel { display: flex !important; flex-direction: column !important; float: none !important; }
.fef-chat .fef-chat-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	float: none !important;
	max-width: none !important;
}
.fef-chat .fef-chat-header { display: flex !important; flex-direction: row !important; align-items: center !important; }

/* Icons keep their intended size even if the theme sizes svg/img globally. */
.fef-chat .fef-chat-btn-icon svg { width: var(--fef-chat-btn-icon) !important; height: var(--fef-chat-btn-icon) !important; }
.fef-chat .fef-chat-ch-icon svg { width: 24px !important; height: 24px !important; }
.fef-chat .fef-chat-member-go svg { width: 22px !important; height: 22px !important; }