/* LSF Claude Bot — chat widget v0.5.4 */

#lsf-bot-widget {
	position: fixed;
	left: 24px;
	bottom: 32px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== PEEK STATE — links onder ========== */
#lsf-bot-peek {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	animation: lsf-peek-in 0.3s ease;
}

@keyframes lsf-peek-in {
	from { opacity: 0; transform: translateY( 10px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

#lsf-bot-peek-bubble {
	background: #fff;
	color: #1a1a1a;
	padding: 9px 14px;
	border-radius: 20px;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.12 );
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	animation: lsf-peek-pulse 3s ease-in-out infinite;
}

@keyframes lsf-peek-pulse {
	0%, 100% { transform: translateX( 0 ); }
	50%      { transform: translateX( 2px ); }
}

#lsf-bot-peek-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #1a73e8;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.2 );
	transition: transform 0.15s ease;
	flex-shrink: 0;
	overflow: hidden;
}

#lsf-bot-peek-avatar svg {
	width: 100%;
	height: 100%;
	display: block;
}

#lsf-bot-peek:hover #lsf-bot-peek-avatar {
	transform: scale( 1.05 );
}

/* ========== PANEEL ========== */
#lsf-bot-panel {
	width: 380px;
	max-width: calc( 100vw - 40px );
	height: 580px;
	max-height: calc( 100vh - 40px );
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.18 );
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: lsf-panel-in 0.2s ease;
}

@keyframes lsf-panel-in {
	from { opacity: 0; transform: translateY( 10px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

#lsf-bot-header {
	background: #1a73e8;
	color: #fff;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	flex-shrink: 0;
	min-height: 40px;
}

#lsf-bot-header-avatar {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

#lsf-bot-header-avatar svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
	background: #fff;
}

#lsf-bot-header-text {
	flex: 1;
	min-width: 0;
}

#lsf-bot-header strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#lsf-bot-header small {
	font-size: 11px;
	opacity: 0.9;
	display: block;
}

#lsf-bot-close,
#lsf-bot-minimize {
	background: rgba( 255, 255, 255, 0.15 );
	border: none;
	color: #fff;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

#lsf-bot-close:hover,
#lsf-bot-minimize:hover {
	background: rgba( 255, 255, 255, 0.3 );
}

#lsf-bot-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

#lsf-bot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f6f8fb;
}

.lsf-bot-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 12px;
}

.lsf-bot-row.user {
	justify-content: flex-end;
}

.lsf-bot-avatar-mini {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

.lsf-bot-avatar-mini svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #e1e5eb;
}

.lsf-bot-bubble {
	max-width: 80%;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lsf-bot-bubble.user {
	align-items: flex-end;
}

.lsf-bot-msg {
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	word-wrap: break-word;
	white-space: pre-wrap;
}

.lsf-bot-msg.bot {
	background: #fff;
	border: 1px solid #e1e5eb;
	border-bottom-left-radius: 4px;
}

.lsf-bot-msg.user {
	background: #1a73e8;
	color: #fff;
	border-bottom-right-radius: 4px;
}

/* ========== PRODUCTKAARTEN ========== */
.lsf-bot-product {
	display: flex;
	align-items: stretch;
	background: #fff;
	border: 1px solid #e1e5eb;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lsf-bot-product:hover {
	transform: translateY( -1px );
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.08 );
}

.lsf-bot-product-img {
	width: 80px;
	min-height: 80px;
	flex-shrink: 0;
	background-color: #f0f2f5;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
}

.lsf-bot-product-info {
	flex: 1;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
	min-width: 0;
}

.lsf-bot-product-name {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.3;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.lsf-bot-product-price {
	font-size: 14px;
	font-weight: 700;
	color: #1a73e8;
}

.lsf-bot-product-stock {
	font-size: 11px;
	font-weight: 500;
}

.lsf-bot-product-stock.in {
	color: #1a8754;
}

.lsf-bot-product-stock.out {
	color: #b94a48;
}

.lsf-bot-product-cta {
	display: flex;
	align-items: center;
	padding: 0 14px;
	background: #f6f8fb;
	font-size: 12px;
	font-weight: 600;
	color: #1a73e8;
	border-left: 1px solid #e1e5eb;
}

/* ========== HAND-OFF (WhatsApp / callback) ========== */
.lsf-bot-handoff {
	margin-top: 2px;
}

.lsf-bot-handoff-btn {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border-radius: 10px;
	border: none;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lsf-bot-handoff-btn.whatsapp {
	background: #25d366;
	color: #fff;
}

.lsf-bot-handoff-btn.whatsapp:hover {
	background: #1da851;
}

.lsf-bot-handoff-btn.callback {
	background: #1a73e8;
	color: #fff;
}

.lsf-bot-handoff-btn.callback:hover {
	background: #1558b8;
}

.lsf-bot-handoff-btn:hover {
	transform: translateY( -1px );
	box-shadow: 0 4px 10px rgba( 0, 0, 0, 0.12 );
}

/* ========== CALLBACK FORM ========== */
.lsf-bot-callback-form {
	background: #fff;
	border: 1px solid #e1e5eb;
	border-radius: 12px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lsf-bot-cb-title {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 2px;
}

.lsf-bot-callback-form input {
	padding: 9px 11px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	outline: none;
}

.lsf-bot-callback-form input:focus {
	border-color: #1a73e8;
}

.lsf-bot-callback-form button {
	background: #1a73e8;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.lsf-bot-callback-form button:hover {
	background: #1558b8;
}

.lsf-bot-cb-status {
	font-size: 12px;
	color: #b94a48;
	min-height: 14px;
}

.lsf-bot-cb-success {
	background: #d4edda;
	color: #155724;
	padding: 12px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
}

/* ========== TYPING INDICATOR ========== */
.lsf-bot-typing {
	display: inline-flex;
	gap: 4px;
	padding: 12px 14px;
}

.lsf-bot-typing span {
	width: 6px;
	height: 6px;
	background: #888;
	border-radius: 50%;
	animation: lsf-bounce 1.2s infinite ease-in-out;
}

.lsf-bot-typing span:nth-child( 2 ) { animation-delay: 0.15s; }
.lsf-bot-typing span:nth-child( 3 ) { animation-delay: 0.3s; }

@keyframes lsf-bounce {
	0%, 60%, 100% { transform: translateY( 0 ); opacity: 0.4; }
	30%           { transform: translateY( -6px ); opacity: 1; }
}

/* ========== INPUT FORM ========== */
#lsf-bot-form {
	display: flex;
	border-top: 1px solid #e1e5eb;
	padding: 10px;
	background: #fff;
	flex-shrink: 0;
}

#lsf-bot-input {
	flex: 1;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 14px;
	outline: none;
}

#lsf-bot-input:focus {
	border-color: #1a73e8;
}

#lsf-bot-send {
	margin-left: 8px;
	background: #1a73e8;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0 16px;
	font-size: 14px;
	cursor: pointer;
	font-weight: 500;
}

#lsf-bot-send:hover {
	background: #1558b8;
}

/* ========== MOBIEL ========== */
@media ( max-width: 600px ) {
	#lsf-bot-widget {
		left: 16px;
		bottom: calc( 90px + env( safe-area-inset-bottom, 0px ) ); /* boven footer-nav, gelijk met Futy */
	}
	#lsf-bot-peek-bubble {
		display: none;
	}
	#lsf-bot-peek-avatar {
		width: 52px;
		height: 52px;
	}
	#lsf-bot-panel {
		width: min( 340px, calc( 100vw - 32px ) );
		height: min( 520px, calc( 100vh - 180px ) );
		max-height: calc( 100vh - 180px );
	}
}
