/* ============================================================
   VERIDA CHATBOT — widget.css
   Consultant chat widget (floating bubble + inline).
   Colours reuse the theme's palette variables, with hard
   fallbacks so it still looks right without the theme.
   ============================================================ */

.verida-chat {
	--vc-navy: var(--wp--preset--color--navy, #003366);
	--vc-cyan: var(--wp--preset--color--cyan, #19e3ff);
	--vc-ink:  var(--wp--preset--color--ink, #050b14);
	--vc-ink2: var(--wp--preset--color--ink-2, #08121f);
	--vc-off:  var(--wp--preset--color--off-white, #f4f6fb);
	--vc-muted:var(--wp--preset--color--muted, #94a9c4);
	font-family: "Noto Sans Georgian", system-ui, sans-serif;
	box-sizing: border-box;
}
.verida-chat *,
.verida-chat *::before,
.verida-chat *::after { box-sizing: border-box; }

/* ---------- Floating bubble ---------- */
.verida-chat__bubble {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99998;
	width: 60px;
	height: 60px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background: linear-gradient(135deg, #19e3ff 0%, #38bdf8 100%);
	color: #04212e;
	box-shadow: 0 10px 30px rgba(25, 227, 255, 0.35);
	display: grid;
	place-items: center;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.verida-chat__bubble:hover { transform: translateY(-2px) scale(1.04); }
.verida-chat__bubble svg { width: 28px; height: 28px; }

/* ---------- Panel ---------- */
.verida-chat__panel {
	position: fixed;
	right: 22px;
	bottom: 96px;
	z-index: 99999;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 130px);
	display: none;
	flex-direction: column;
	overflow: hidden;
	border-radius: 18px;
	background: var(--vc-ink2, #08121f);
	border: 1px solid rgba(148, 169, 196, 0.18);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.verida-chat--open .verida-chat__panel {
	display: flex;
	opacity: 1;
	transform: translateY(0);
}

/* Inline variant (shortcode / block) — sits in the page, always open. */
.verida-chat--inline { position: relative; }
.verida-chat--inline .verida-chat__panel {
	position: relative;
	right: auto;
	bottom: auto;
	display: flex;
	opacity: 1;
	transform: none;
	width: 100%;
	max-width: 100%;
	height: 560px;
}

/* ---------- Header ---------- */
.verida-chat__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: var(--vc-navy, #003366);
	color: #fff;
	font-weight: 600;
	font-size: 0.98rem;
}
.verida-chat__header .verida-chat__dot {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--vc-cyan, #19e3ff);
	box-shadow: 0 0 10px var(--vc-cyan, #19e3ff);
}
.verida-chat__close {
	margin-left: auto;
	background: none; border: none; cursor: pointer;
	color: rgba(255,255,255,0.75); font-size: 22px; line-height: 1;
}
.verida-chat--inline .verida-chat__close { display: none; }

/* ---------- Messages ---------- */
.verida-chat__msgs {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--vc-ink, #050b14);
}
.verida-chat__msg {
	max-width: 82%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 0.92rem;
	line-height: 1.5;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.verida-chat__msg--user {
	align-self: flex-end;
	background: linear-gradient(135deg, #19e3ff 0%, #38bdf8 100%);
	color: #04212e;
	border-bottom-right-radius: 4px;
}
.verida-chat__msg--bot {
	align-self: flex-start;
	background: rgba(148, 169, 196, 0.12);
	color: var(--vc-off, #f4f6fb);
	border: 1px solid rgba(148, 169, 196, 0.16);
	border-bottom-left-radius: 4px;
}
.verida-chat__msg--typing { color: var(--vc-muted, #94a9c4); font-style: italic; }

/* ---------- Lead form ---------- */
.verida-chat__lead {
	display: none;
	padding: 12px 16px;
	background: rgba(25, 227, 255, 0.06);
	border-top: 1px solid rgba(25, 227, 255, 0.2);
}
.verida-chat__lead.is-visible { display: block; }
.verida-chat__lead p { margin: 0 0 8px; font-size: 0.85rem; color: var(--vc-muted, #94a9c4); }
.verida-chat__lead input {
	width: 100%;
	margin-bottom: 8px;
	padding: 9px 11px;
	border-radius: 10px;
	border: 1px solid rgba(148, 169, 196, 0.28);
	background: var(--vc-ink2, #08121f);
	color: var(--vc-off, #f4f6fb);
	font-size: 0.9rem;
}
.verida-chat__lead input:focus { outline: none; border-color: var(--vc-cyan, #19e3ff); }
.verida-chat__lead button {
	width: 100%;
	padding: 10px;
	border: none;
	border-radius: 10px;
	background: var(--vc-navy, #003366);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

/* ---------- Input row ---------- */
.verida-chat__form {
	display: flex;
	align-items: stretch;
	border-top: 1px solid rgba(148, 169, 196, 0.16);
	background: var(--vc-ink2, #08121f);
}
.verida-chat__form input {
	flex: 1;
	border: none;
	background: none;
	padding: 14px;
	color: var(--vc-off, #f4f6fb);
	font-size: 0.92rem;
}
.verida-chat__form input:focus { outline: none; }
.verida-chat__form button {
	border: none;
	background: linear-gradient(135deg, #19e3ff 0%, #38bdf8 100%);
	color: #04212e;
	font-weight: 700;
	padding: 0 18px;
	cursor: pointer;
}
.verida-chat__form button:disabled { opacity: 0.5; cursor: default; }

/* Scrollbar */
.verida-chat__msgs::-webkit-scrollbar { width: 8px; }
.verida-chat__msgs::-webkit-scrollbar-thumb {
	background: rgba(148, 169, 196, 0.3); border-radius: 4px;
}
