/*
 * Цветове (поправено ное. 2026, клиентски репорт за несъвпадащо
 * оранжево из сайта): трите фона тук бяха хардкоднато #30343A — отделен
 * хекс, различен от брандовото --orange (#30343A, логото във футъра).
 * Мостнато към sitewide токъна, fallback-ът пази същото поведение, ако
 * някога се зареди извън контекст с :root --orange (homepage-handoff.css).
 */
.elc-chat-launcher {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--orange, #30343A);
	color: #FFFFFF;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.elc-chat-panel {
	position: fixed;
	bottom: 92px;
	right: 24px;
	z-index: 9999;
	width: min(360px, calc(100vw - 32px));
	/* height, not max-height: with no messages yet (before the first
	 * answer), .elc-chat-messages has zero content height, and this flex
	 * column panel has no explicit height of its own — it shrinks to fit
	 * just the empty messages area + input row, showing a tiny sliver
	 * instead of a normal-sized panel until an answer arrives. */
	height: min(520px, calc(100vh - 140px));
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.elc-chat-panel[hidden] {
	display: none;
}

.elc-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.elc-chat-message {
	padding: 8px 12px;
	border-radius: 8px;
	max-width: 85%;
	white-space: pre-wrap;
}

.elc-chat-message--user {
	align-self: flex-end;
	background: var(--orange, #30343A);
	color: #FFFFFF;
}

.elc-chat-message--assistant {
	align-self: flex-start;
	background: #F3F4F6;
	color: #30343A;
}

.elc-chat-header {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 8px 8px 14px;
	background: var(--orange, #30343A);
	color: #FFFFFF;
}

.elc-chat-title {
	flex: 1;
	font-size: 14px;
	font-weight: 600;
}

.elc-chat-header-btn {
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: #FFFFFF;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.elc-chat-header-btn:hover,
.elc-chat-header-btn:focus-visible {
	background: rgba(255, 255, 255, 0.2);
}

.elc-chat-message--assistant a {
	color: inherit;
	text-decoration: underline;
	word-break: break-word;
}

.elc-chat-notice {
	padding: 6px 12px;
	font-size: 11px;
	line-height: 1.4;
	color: #6B7280;
	border-top: 1px solid #F3F4F6;
}

.elc-chat-notice a {
	color: inherit;
	text-decoration: underline;
}

.elc-chat-form {
	display: flex;
	border-top: 1px solid #F3F4F6;
}

.elc-chat-input {
	flex: 1;
	border: none;
	padding: 12px;
	font-size: 14px;
}

.elc-chat-send {
	border: none;
	background: var(--orange, #30343A);
	color: #FFFFFF;
	padding: 0 16px;
	cursor: pointer;
}
