#arcai-root {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.arcai-bubble {
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}

.arcai-bubble:hover {
	transform: scale(1.06);
}

.arcai-panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.arcai-header {
	color: #fff;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.arcai-title {
	font-weight: 600;
	font-size: 15px;
}

.arcai-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

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

.arcai-msg {
	display: flex;
	flex-direction: column;
	max-width: 85%;
}

.arcai-msg-user {
	align-self: flex-end;
	align-items: flex-end;
}

.arcai-msg-assistant {
	align-self: flex-start;
	align-items: flex-start;
}

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

.arcai-msg-user .arcai-msg-body {
	color: #fff;
	border-bottom-right-radius: 4px;
}

.arcai-msg-assistant .arcai-msg-body {
	background: #fff;
	color: #1a1a1a;
	border: 1px solid #e4e4e8;
	border-bottom-left-radius: 4px;
}

.arcai-sources {
	margin-top: 6px;
	font-size: 12px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.arcai-sources-label {
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	font-size: 10px;
	letter-spacing: 0.04em;
}

.arcai-sources a {
	color: #2256c9;
	text-decoration: none;
}

.arcai-sources a:hover {
	text-decoration: underline;
}

.arcai-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e4e4e8;
	background: #fff;
}

.arcai-input {
	flex: 1;
	border: 1px solid #d4d4d8;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 14px;
	outline: none;
}

.arcai-input:focus {
	border-color: #888;
}

.arcai-send {
	border: none;
	border-radius: 8px;
	color: #fff;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.arcai-typing .arcai-msg-body span {
	display: inline-block;
	width: 7px;
	height: 7px;
	margin: 0 2px;
	background: #bbb;
	border-radius: 50%;
	animation: arcai-blink 1.2s infinite both;
}

.arcai-typing .arcai-msg-body span:nth-child(2) {
	animation-delay: 0.2s;
}

.arcai-typing .arcai-msg-body span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes arcai-blink {
	0%, 80%, 100% { opacity: 0.25; }
	40% { opacity: 1; }
}

@media (max-width: 480px) {
	.arcai-panel {
		width: calc(100vw - 32px);
	}
}

.arcai-inline-host {
	margin: 1.5em 0;
}

.arcai-inline-host .arcai-panel-inline {
	position: static;
	width: 100%;
	max-width: 720px;
	height: 520px;
	margin: 0 auto;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
	border: 1px solid #e4e4e8;
}
