.jared-chat {
	--accent: var(--e-global-color-accent, #3b82f6);
	--secondary: var(--e-global-color-secondary, #3b82f6);
	--border: #e2e8f0;
	--text: #475569;
	--bg: #F2F8F9;
	--radius: 12px;

	display: flex;
	flex-direction: column;
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
	font-family: var(--e-global-typography-73d250c-font-family, inherit), sans-serif;
}

.jared-chat__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	background: #fff;
}

.jared-chat__avatar--header {
	position: relative;
	width: 34px;
	height: 34px;
	font-size: 13px;
}

.jared-chat__status-dot {
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #22c55e;
	border: 2px solid #fff;
	animation: jared-pulse 2.2s infinite;
}

@keyframes jared-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
	50% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0); }
}

.jared-chat__header-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start !important;
	line-height: 1.25;
	text-align: left !important;
}

.jared-chat__header-name {
	font-weight: 700;
	font-size: 0.92em;
	color: #1e293b;
	text-align: left !important;
	width: 100%;
}

.jared-chat__header-tag {
	font-size: 0.76em;
	color: #64748b;
	text-align: left !important;
	width: 100%;
}

.jared-chat__messages {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	height: 160px;
	overflow-y: auto;
	background: var(--bg);
}

.jared-chat__msg {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	width: 100%;
}

.jared-chat__msg--bot {
	justify-content: flex-start;
}

.jared-chat__msg--user {
	justify-content: flex-end;
}

.jared-chat__avatar {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--secondary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jared-chat__bubble {
	max-width: 78%;
	padding: 9px 13px;
	border-radius: var(--radius);
	font-size: 0.88em;
	line-height: 1.45;
	word-break: break-word;
	text-align: left;
}

.jared-chat__msg--bot .jared-chat__bubble {
	background: #fff;
	color: var(--text);
	border: 1px solid var(--border);
	border-bottom-left-radius: 4px;
}

.jared-chat__msg--user .jared-chat__bubble {
	background: var(--secondary);
	color: #fff;
	border-bottom-right-radius: 4px;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.jared-chat__typing {
	display: flex;
	gap: 4px;
	align-items: center;
	padding: 11px 14px;
}

.jared-chat__typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #94a3b8;
	animation: jared-typing 1.2s infinite ease-in-out;
}

.jared-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.jared-chat__typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes jared-typing {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.jared-chat__form {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid var(--border);
	background: #fff;
}

.jared-chat__input {
	flex: 1;
	height: 44px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius) !important;
	background: var(--bg);
	color: var(--text);
	font-size: 0.92em;
	outline: none;
	transition: all 0.2s ease;
}

.jared-chat__input::placeholder {
	color: #94a3b8;
}

.jared-chat__input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.jared-chat__input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

button.jared-chat__send {
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	max-width: 44px !important;
	padding: 0 !important;
	margin: 0 !important;
	flex-shrink: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: var(--secondary) !important;
	color: #fff !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 3px 10px rgba(59, 130, 246, 0.35) !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease !important;
	line-height: 1 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

button.jared-chat__send i {
	font-size: 15px !important;
	line-height: 1 !important;
	margin-left: -1px;
}

button.jared-chat__send:hover {
	transform: translateY(-1px) scale(1.04) !important;
	box-shadow: 0 5px 14px rgba(59, 130, 246, 0.45) !important;
}

button.jared-chat__send:active {
	transform: translateY(0) scale(0.97) !important;
}

button.jared-chat__send:disabled {
	opacity: 0.55 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

button.jared-chat__icon-btn {
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	padding: 0 !important;
	margin: 0 !important;
	flex-shrink: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #94a3b8 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 19px !important;
	transition: background 0.15s ease, color 0.15s ease !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

button.jared-chat__icon-btn:hover {
	background: var(--bg) !important;
	color: var(--secondary) !important;
}

.jared-chat__bubble--typewriter::after {
	content: '';
	display: inline-block;
	width: 2px;
	height: 0.9em;
	margin-left: 2px;
	background: currentColor;
	vertical-align: text-bottom;
	animation: jared-caret 0.8s infinite;
}

@keyframes jared-caret {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

.jared-chat__suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-left: 38px;
}

.jared-chat__chip {
	border: 1px solid var(--border) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--secondary) !important;
	font-size: 0.78em !important;
	padding: 6px 12px !important;
	cursor: pointer !important;
	transition: all 0.15s ease !important;
	white-space: nowrap;
}

.jared-chat__chip:hover {
	background: var(--secondary) !important;
	color: #fff !important;
	border-color: var(--secondary) !important;
}

.jared-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 2rem;
	color: #fff;
}

.jared-chat__fallback-results {
	padding: 0 14px 14px;
	background: #fff;
}

@media (max-width: 600px) {
	.jared-chat__messages {
		height: 140px;
	}
}
