.orsc-chatbot {
	--orsc-primary: #2563eb;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.orsc-chatbot * {
	box-sizing: border-box;
}

.orsc-chatbot__toggle {
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	background: var(--orsc-primary);
	color: #fff;
	box-shadow: 0 12px 35px rgba(15, 23, 42, 0.28);
	cursor: pointer;
	font-weight: 700;
}

.orsc-chatbot__bubble-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.orsc-chatbot__panel {
	position: absolute;
	right: 0;
	bottom: 76px;
	display: none;
	width: min(380px, calc(100vw - 32px));
	height: min(620px, calc(100vh - 120px));
	overflow: hidden;
	border: 1px solid rgba(148, 163, 184, 0.35);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.orsc-chatbot[data-open="true"] .orsc-chatbot__panel {
	display: flex;
	flex-direction: column;
}

.orsc-chatbot__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--orsc-primary);
	color: #fff;
}

.orsc-chatbot__close {
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}

.orsc-chatbot__messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #f8fafc;
}

.orsc-chatbot__message {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}

.orsc-chatbot__message--user {
	align-items: flex-end;
}

.orsc-chatbot__message--assistant {
	align-items: flex-start;
}

.orsc-chatbot__bubble {
	max-width: 86%;
	padding: 10px 12px;
	border-radius: 8px;
	white-space: pre-wrap;
	word-wrap: break-word;
	font-size: 14px;
	line-height: 1.45;
}

.orsc-chatbot__message--user .orsc-chatbot__bubble {
	background: var(--orsc-primary);
	color: #fff;
}

.orsc-chatbot__message--assistant .orsc-chatbot__bubble {
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #111827;
}

.orsc-chatbot__bubble--loading {
	color: #64748b;
}

.orsc-chatbot__sources {
	display: flex;
	max-width: 86%;
	flex-wrap: wrap;
	gap: 6px;
}

.orsc-chatbot__sources a {
	padding: 4px 7px;
	border-radius: 8px;
	background: #e0f2fe;
	color: #075985;
	text-decoration: none;
	font-size: 12px;
}

.orsc-chatbot__form {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #e2e8f0;
	background: #fff;
}

.orsc-chatbot__input {
	flex: 1;
	min-height: 42px;
	max-height: 120px;
	resize: none;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 10px;
	font: inherit;
}

.orsc-chatbot__send {
	border: 0;
	border-radius: 8px;
	background: var(--orsc-primary);
	color: #fff;
	cursor: pointer;
	font-weight: 600;
	padding: 0 14px;
}

.orsc-chatbot__send:disabled {
	cursor: not-allowed;
	opacity: 0.65;
}

@media (max-width: 480px) {
	.orsc-chatbot {
		right: 12px;
		bottom: 12px;
	}

	.orsc-chatbot__panel {
		right: -4px;
		bottom: 70px;
		height: min(600px, calc(100vh - 96px));
	}
}

