.spai-widget {
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.spai-widget.spai-pos-right { right: 20px; }
.spai-widget.spai-pos-left { left: 20px; }

.spai-launcher {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--spai-color, #2563eb);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,.2);
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.spai-panel {
	display: none;
	flex-direction: column;
	width: 340px;
	max-height: 480px;
	position: absolute;
	bottom: 68px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0,0,0,.2);
	overflow: hidden;
}
.spai-pos-right .spai-panel { right: 0; }
.spai-pos-left .spai-panel { left: 0; }
.spai-widget.spai-open .spai-panel { display: flex; }

.spai-header {
	background: var(--spai-color, #2563eb);
	color: #fff;
	padding: 14px 16px;
	font-weight: 600;
}

.spai-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	background: #f7f7f8;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 220px;
}

.spai-msg {
	max-width: 85%;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.4;
}
.spai-msg-user {
	align-self: flex-end;
	background: var(--spai-color, #2563eb);
	color: #fff;
}
.spai-msg-bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e5e5e5;
	color: #222;
}

.spai-cta-row {
	padding: 8px 12px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	background: #f7f7f8;
	border-top: 1px solid #eee;
}
.spai-cta-btn {
	flex: 1;
	text-align: center;
	padding: 8px 10px;
	border-radius: 8px;
	background: var(--spai-color, #2563eb);
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

.spai-input-row {
	display: flex;
	border-top: 1px solid #eee;
	padding: 8px;
	gap: 6px;
}
.spai-input-row input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
}
.spai-input-row button {
	background: var(--spai-color, #2563eb);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0 14px;
	cursor: pointer;
}

.spai-typing {
	font-size: 13px;
	color: #888;
	font-style: italic;
	align-self: flex-start;
}
