/* TC Engage — asistentul AI. Culorile site-ului; fără grid minmax() (LiteSpeed). */
.tce-chat {
	--c-navy: #00092A; --c-blue: #004BA8; --c-blue-h: #0058C6; --c-text: #3E4459;
	--c-muted: #7A7F93; --c-line: #E6EAF2; --c-soft: #F4F7FC;
	font-family: "Poppins", system-ui, sans-serif;
	position: fixed; right: 20px; bottom: 20px; z-index: 9985;
	transition: bottom .3s;
}
.tce-chat *, .tce-chat *::before { box-sizing: border-box; }
html.tce-chat-on .wpr-stt-btn { bottom: 92px !important; }

.tce-chat .tce-chat__launcher {
	display: flex; align-items: center; gap: 10px; margin: 0;
	height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 999px;
	background: var(--c-navy); color: #fff; cursor: pointer;
	font: inherit; font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: 0; text-transform: none;
	box-shadow: 0 12px 30px rgba(0, 9, 42, .28);
	transition: transform .2s, background .2s;
}
.tce-chat .tce-chat__launcher:hover { background: var(--c-blue); color: #fff; transform: translateY(-2px); }
.tce-chat.is-open .tce-chat__launcher { display: none; }

.tce-chat__panel {
	position: absolute; right: 0; bottom: 0;
	width: 390px; height: min(620px, calc(100vh - 40px));
	display: flex; flex-direction: column;
	background: #fff; border-radius: 20px; overflow: hidden;
	box-shadow: 0 24px 70px rgba(0, 9, 42, .30);
	animation: tce-chat-in .22s ease-out;
}
.tce-chat__panel[hidden] { display: none; }
@keyframes tce-chat-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.tce-chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: var(--c-navy); color: #fff; }
.tce-chat__avatar { flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--c-blue); display: flex; align-items: center; justify-content: center; }
.tce-chat__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.tce-chat__who strong { font-family: "Kanit", "Poppins", sans-serif; font-weight: 600; font-size: 17px; color: #fff; }
.tce-chat__who span { font-size: 12.5px; color: #B9C3DB; }
.tce-chat .tce-chat__icon {
	flex: 0 0 36px; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: #fff; font-size: 24px; line-height: 36px; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.tce-chat .tce-chat__icon:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.tce-chat__log { flex: 1 1 auto; overflow-y: auto; padding: 18px 16px 8px; background: var(--c-soft); display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.tce-msg { max-width: 88%; padding: 12px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.6; color: var(--c-text); word-wrap: break-word; }
.tce-msg p { margin: 0 0 8px; font-size: inherit; line-height: inherit; color: inherit; }
.tce-msg p:last-child { margin-bottom: 0; }
.tce-msg ul { margin: 4px 0 8px; padding-left: 18px; }
.tce-msg li { margin: 0 0 4px; font-size: inherit; line-height: inherit; color: inherit; }
.tce-msg strong { color: var(--c-navy); font-weight: 600; }
.tce-msg a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 2px; }
.tce-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--c-line); border-bottom-left-radius: 6px; }
.tce-msg--user { align-self: flex-end; background: var(--c-blue); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }
.tce-msg--error { border-color: #F2C6C0; background: #FDF3F2; color: #9B2C20; }
.tce-msg--cta { border-color: #BFE7DA; background: #EAF7F3; }
.tce-chat .tce-chat__cta {
	margin: 10px 0 0; height: 38px; padding: 0 16px; border: 0; border-radius: 999px;
	background: var(--c-blue); color: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.tce-chat .tce-chat__cta:hover { background: var(--c-blue-h); color: #fff; }

.tce-msg__sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-line); }
.tce-msg__sources a {
	display: inline-block; font-size: 12.5px; line-height: 1.3; padding: 6px 10px; border-radius: 999px;
	background: var(--c-soft); color: var(--c-blue); text-decoration: none; border: 1px solid var(--c-line);
}
.tce-msg__sources a::before { content: "📄 "; }
.tce-msg__sources a:hover { border-color: var(--c-blue); }

.tce-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.tce-dots i { width: 7px; height: 7px; border-radius: 50%; background: #A7B0C6; animation: tce-dot 1.2s infinite ease-in-out; }
.tce-dots i:nth-child(2) { animation-delay: .15s; }
.tce-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tce-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.tce-chat__sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: var(--c-soft); }
.tce-chat__sugg:empty { display: none; }
.tce-chat .tce-chip {
	margin: 0; padding: 8px 12px; border: 1px solid #C9D4EA; border-radius: 999px; background: #fff;
	color: var(--c-blue); font: inherit; font-size: 13px; line-height: 1.3; text-align: left; cursor: pointer;
}
.tce-chat .tce-chip:hover { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }

.tce-chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--c-line); background: #fff; margin: 0; }
.tce-chat .tce-chat__form textarea {
	flex: 1 1 auto; min-width: 0; height: 44px; min-height: 44px; max-height: 120px; margin: 0; padding: 11px 14px; overflow-y: auto;
	border: 1px solid #CBD3E3; border-radius: 12px; resize: none; background: #fff;
	font: inherit; font-size: 15px; line-height: 1.4; color: var(--c-navy); box-shadow: none;
}
.tce-chat .tce-chat__form textarea:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(0, 75, 168, .15); }
.tce-chat .tce-chat__send {
	flex: 0 0 44px; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 12px;
	background: var(--c-blue); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tce-chat .tce-chat__send:hover { background: var(--c-blue-h); color: #fff; }
.tce-chat .tce-chat__send:disabled { opacity: .5; cursor: wait; }
.tce-chat .tce-chat__note { margin: 0; padding: 0 14px 12px; background: #fff; font-size: 11.5px; line-height: 1.4; color: var(--c-muted); text-align: center; }
.tce-chat .tce-chat__note a { color: var(--c-blue); }

@media (max-width: 767px) {
	.tce-chat { right: 14px; bottom: 14px; }
	html.tce-mbar-on .tce-chat { bottom: 78px; }
	html.tce-mbar-on.tce-chat-on .wpr-stt-btn { bottom: 146px !important; }
	.tce-chat .tce-chat__launcher { width: 54px; height: 54px; padding: 0; justify-content: center; }
	.tce-chat .tce-chat__launcher span { display: none; }
	.tce-chat__panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
	html.tce-chat-open { overflow: hidden; }
	.tce-msg { max-width: 92%; }
	.tce-chat .tce-chat__form textarea { font-size: 16px; } /* iOS nu mai face zoom */
}
@media (prefers-reduced-motion: reduce) {
	.tce-chat__panel, .tce-dots i { animation: none; }
}
