#ssc-chatbot-root {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.aisc-bubble {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--aisc-accent, #2563eb);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
	border: none;
	transition: transform 0.15s ease;
}
.aisc-bubble:hover {
	transform: scale(1.06);
}
.aisc-bubble svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}

.aisc-window {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}
.aisc-window.aisc-open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.aisc-header {
	background: var(--aisc-accent, #2563eb);
	color: #fff;
	padding: 14px 16px;
	font-weight: 600;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.aisc-header button {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	opacity: 0.85;
}
.aisc-header button:hover { opacity: 1; }

.aisc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f7f8fa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aisc-msg {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.aisc-msg.aisc-user {
	align-self: flex-end;
	background: var(--aisc-accent, #2563eb);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.aisc-msg.aisc-bot {
	align-self: flex-start;
	background: #fff;
	color: #1f2937;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}
.aisc-msg.aisc-typing {
	font-style: italic;
	color: #9ca3af;
}

.aisc-msg a {
	color: var(--aisc-accent, #2563eb);
	font-weight: 600;
	text-decoration: none;
}
.aisc-msg a:hover {
	text-decoration: underline;
}
.aisc-source {
	display: block;
	margin-top: 6px;
	font-size: 12px;
}

.aisc-related {
	align-self: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: 90%;
}
.aisc-chip {
	background: #fff;
	border: 1px solid var(--aisc-accent, #2563eb);
	color: var(--aisc-accent, #2563eb);
	border-radius: 14px;
	padding: 5px 11px;
	font-size: 12.5px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.aisc-chip:hover {
	background: var(--aisc-accent, #2563eb);
	color: #fff;
}

.aisc-bubble-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #ef4444;
	color: #fff;
	border-radius: 50%;
	width: 12px;
	height: 12px;
	border: 2px solid #fff;
}

.aisc-input-row {
	display: flex;
	border-top: 1px solid #e5e7eb;
	padding: 8px;
	gap: 8px;
	background: #fff;
}
.aisc-input-row input {
	flex: 1;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 14px;
	outline: none;
}
.aisc-input-row input:focus {
	border-color: var(--aisc-accent, #2563eb);
}
.aisc-input-row button {
	background: var(--aisc-accent, #2563eb);
	border: none;
	color: #fff;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.aisc-input-row button:disabled {
	opacity: 0.6;
	cursor: default;
}
.aisc-input-row button svg {
	width: 16px;
	height: 16px;
	fill: #fff;
}

@media (max-width: 480px) {
	.aisc-window {
		width: calc(100vw - 32px);
		right: 0;
	}
}
