/* ============================================================
   Solutit AI-bot — chat-widget (front-end)
   Huisstijl: accent #ff0060 (instelbaar via --sb-accent), Inter.
============================================================ */
#solutit-bot-root {
	--sb-accent: #ff0060;
	--sb-dark: #0a0a0a;
	--sb-text: #1a1a1a;
	--sb-muted: #8a8a8a;
	--sb-line: #ececec;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#solutit-bot-root *,
#solutit-bot-root *::before,
#solutit-bot-root *::after {
	box-sizing: border-box;
}

/* ---------- Launcher (de zwevende knop) ---------- */
.sb-launcher {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 13px 20px 13px 16px;
	border: none;
	border-radius: 999px;
	background: var(--sb-accent);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.sb-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}
.sb-launcher svg { width: 22px; height: 22px; flex: none; }
.sb-right .sb-launcher { right: 24px; }
.sb-left  .sb-launcher { left: 24px; }
.sb-open .sb-launcher { opacity: 0; pointer-events: none; transform: scale(0.6); }

/* ---------- Paneel ---------- */
.sb-panel {
	position: fixed;
	bottom: 24px;
	z-index: 99999;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 600px;
	max-height: calc(100vh - 48px);
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(20px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.22s ease, transform 0.22s ease;
}
.sb-right .sb-panel { right: 24px; }
.sb-left  .sb-panel { left: 24px; }
.sb-open .sb-panel { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Header ---------- */
.sb-header {
	background: var(--sb-dark);
	color: #fff;
	padding: 18px 18px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.sb-avatar {
	width: 40px; height: 40px; flex: none;
	border-radius: 50%;
	background: var(--sb-accent);
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 17px; color: #fff;
}
.sb-head-text { line-height: 1.25; }
.sb-head-text strong { font-size: 15px; font-weight: 700; display: block; }
.sb-head-text span { font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.sb-head-text span::before {
	content: ''; display: inline-block; width: 7px; height: 7px;
	border-radius: 50%; background: #2ecc71; margin-right: 6px; vertical-align: middle;
}
.sb-close {
	margin-left: auto; background: transparent; border: none; cursor: pointer;
	color: rgba(255, 255, 255, 0.7); padding: 4px; border-radius: 6px; line-height: 0;
}
.sb-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.sb-close svg { width: 20px; height: 20px; }

/* ---------- Berichten ---------- */
.sb-body {
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px;
	background: #fafafa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.sb-msg {
	max-width: 84%;
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.sb-msg.user {
	align-self: flex-end;
	background: var(--sb-accent);
	color: #fff;
	border-bottom-right-radius: 5px;
}
.sb-msg.bot {
	align-self: flex-start;
	background: #fff;
	color: var(--sb-text);
	border: 1px solid var(--sb-line);
	border-bottom-left-radius: 5px;
}

/* Typindicator */
.sb-typing { display: inline-flex; gap: 4px; align-items: center; }
.sb-typing i {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--sb-muted); display: inline-block;
	animation: sb-bounce 1.2s infinite ease-in-out;
}
.sb-typing i:nth-child(2) { animation-delay: 0.18s; }
.sb-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes sb-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-5px); opacity: 1; }
}

/* ---------- Footer / invoer ---------- */
.sb-footer {
	border-top: 1px solid var(--sb-line);
	padding: 12px;
	background: #fff;
}
.sb-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.sb-input {
	flex: 1;
	resize: none;
	border: 1px solid var(--sb-line);
	border-radius: 12px;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	max-height: 110px;
	outline: none;
}
.sb-input:focus { border-color: var(--sb-accent); }
.sb-send {
	flex: none;
	width: 42px; height: 42px;
	border: none; border-radius: 12px;
	background: var(--sb-accent); color: #fff;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: opacity 0.2s ease;
}
.sb-send:disabled { opacity: 0.45; cursor: default; }
.sb-send svg { width: 20px; height: 20px; }

.sb-leadlink {
	display: block; width: 100%; margin-top: 8px;
	padding: 9px 12px; text-align: center;
	font-size: 12.5px; font-weight: 600; font-family: inherit;
	color: var(--sb-accent); cursor: pointer;
	background: #fff; border: 1.5px solid var(--sb-accent); border-radius: 10px;
	transition: background 0.2s ease, color 0.2s ease;
}
.sb-leadlink:hover { background: var(--sb-accent); color: #fff; }

/* ---------- Toestemming & lead-formulier ---------- */
.sb-overlay {
	padding: 22px 20px;
	display: flex; flex-direction: column; gap: 12px;
	font-size: 14px; line-height: 1.55; color: var(--sb-text);
}
.sb-overlay h3 { margin: 0; font-size: 16px; font-weight: 700; }
.sb-overlay p { margin: 0; color: #555; }
.sb-field {
	width: 100%;
	border: 1px solid var(--sb-line);
	border-radius: 11px;
	padding: 11px 13px;
	font-family: inherit; font-size: 14px; outline: none;
}
.sb-field:focus { border-color: var(--sb-accent); }
.sb-btn {
	width: 100%;
	border: none; border-radius: 11px;
	padding: 12px 16px;
	background: var(--sb-accent); color: #fff;
	font-family: inherit; font-size: 14px; font-weight: 600;
	cursor: pointer;
}
.sb-btn:hover { filter: brightness(0.94); }
.sb-btn.ghost { background: #f0f0f1; color: #333; }
.sb-note { font-size: 12px; color: var(--sb-muted); text-align: center; }
.sb-error { color: #dc2626; font-size: 13px; }

/* ---------- Suggestie-chips ---------- */
.sb-chips {
	display: flex; flex-wrap: wrap; gap: 7px;
	align-self: flex-start; max-width: 100%;
	margin-top: 2px;
}
.sb-chip {
	border: 1.5px solid var(--sb-accent);
	background: #fff; color: var(--sb-accent);
	border-radius: 999px;
	padding: 7px 13px;
	font-family: inherit; font-size: 13px; font-weight: 600;
	cursor: pointer; line-height: 1.2;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.sb-chip:hover { background: var(--sb-accent); color: #fff; transform: translateY(-1px); }
.sb-chip.primary { background: var(--sb-accent); color: #fff; }
.sb-chip.primary:hover { filter: brightness(0.94); }

/* ---------- Scheidingslijn (modus-wissel) ---------- */
.sb-divider {
	align-self: center;
	font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--sb-muted);
	margin: 6px 0 2px;
}

/* ---------- Offerte-paneel ---------- */
.sb-offerte {
	border-top: 1px solid var(--sb-line);
	background: #fff;
	padding: 14px 16px;
	max-height: 46%;
	overflow-y: auto;
}
.sb-off-head {
	display: flex; align-items: center; justify-content: space-between;
	margin-bottom: 10px;
}
.sb-off-head strong { font-size: 13px; }
.sb-off-back {
	background: none; border: none; cursor: pointer;
	font-family: inherit; font-size: 12px; color: var(--sb-muted);
	padding: 2px 4px;
}
.sb-off-back:hover { color: var(--sb-text); }
.sb-off-empty { font-size: 13px; color: var(--sb-muted); line-height: 1.5; margin: 0 0 12px; }
.sb-off-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 10px; }
.sb-off-table td { padding: 6px 4px; border-bottom: 1px solid #f3f3f3; vertical-align: top; }
.sb-off-table td:last-child { text-align: right; white-space: nowrap; }
.sb-off-table small { color: var(--sb-muted); }
.sb-off-table tfoot td { border: 0; padding-top: 7px; color: #555; }
.sb-off-table tr.sb-off-total td { font-weight: 800; color: var(--sb-text); font-size: 14px; }
.sb-off-submit {
	width: 100%; border: none; border-radius: 11px;
	padding: 12px; margin-top: 4px;
	background: var(--sb-accent); color: #fff;
	font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.sb-off-submit:disabled { opacity: 0.45; cursor: default; }
.sb-off-note { font-size: 11px; color: var(--sb-muted); line-height: 1.45; margin: 8px 0 0; }
.sb-off-success { text-align: center; padding: 10px 4px; }
.sb-off-check {
	width: 46px; height: 46px; border-radius: 50%;
	background: #16a34a; color: #fff; font-size: 24px;
	display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
}
.sb-off-success p { color: #444; font-size: 13.5px; line-height: 1.5; margin: 0; }

@media (max-width: 480px) {
	.sb-panel { width: 100%; max-width: 100vw; height: 100%; max-height: 100vh; bottom: 0; border-radius: 0; }
	.sb-right .sb-panel, .sb-left .sb-panel { right: 0; left: 0; }
}
