.scis-assistant {
	position: fixed;
	inset-block-start: 50%;
	inset-inline-end: 0;
	z-index: 1030;
	font-family: inherit;
	color: #111827;
	pointer-events: none;
	transform: translateY(-50%);
}

.scis-assistant:not(.is-minimized) {
	inset-block-start: auto;
	inset-inline-end: 16px;
	bottom: 16px;
	transform: none;
}

.scis-assistant-pill,
.scis-assistant-panel {
	pointer-events: auto;
}

.scis-assistant-pill {
	display: none;
	align-items: center;
	gap: 8px;
	width: 44px;
	min-height: 116px;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-inline-end: 0;
	border-radius: 8px 0 0 8px;
	padding: 8px 6px;
	background: #ffffff;
	color: #0f766e;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
	cursor: pointer;
	writing-mode: vertical-rl;
}

[dir="rtl"] .scis-assistant-pill {
	border-inline-start: 0;
	border-inline-end: 1px solid rgba(17, 24, 39, 0.12);
	border-radius: 0 8px 8px 0;
}

.scis-assistant-pill:hover,
.scis-assistant-pill:focus-visible {
	background: #f0fdfa;
	outline: 0;
}

.scis-assistant-pill-mark {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: #0f766e;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0;
	writing-mode: horizontal-tb;
}

.scis-assistant-pill-text {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
}

.scis-assistant-panel {
	width: min(340px, calc(100vw - 24px));
	height: min(460px, calc(100vh - 72px));
	display: grid;
	grid-template-rows: auto 1fr auto;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.12);
	border-top: 3px solid #0f766e;
	border-radius: 8px;
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
	overflow: hidden;
}

.scis-assistant-head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 10px;
	padding: 10px 10px 9px;
	background: #ffffff;
	border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.scis-assistant-mark {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: #0f766e;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.scis-assistant-head strong {
	display: block;
	font-size: 13px;
	line-height: 1.2;
	color: #111827;
}

.scis-assistant-head span:not(.scis-assistant-mark) {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	line-height: 1.3;
	color: #6b7280;
}

.scis-assistant-minimize {
	width: 30px;
	height: 30px;
	border: 1px solid rgba(17, 24, 39, 0.1);
	border-radius: 8px;
	background: #f9fafb;
	color: #374151;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.scis-assistant-minimize:hover,
.scis-assistant-minimize:focus-visible {
	background: #eef2f7;
	outline: 0;
}

.scis-assistant-log {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	overflow: auto;
	background: #fafafa;
}

.scis-assistant-message {
	display: flex;
}

.scis-assistant-message.user {
	justify-content: flex-end;
}

.scis-assistant-bubble {
	max-width: 88%;
	padding: 9px 10px;
	border: 1px solid rgba(17, 24, 39, 0.08);
	border-radius: 8px;
	background: #ffffff;
	color: #111827;
}

.scis-assistant-message.user .scis-assistant-bubble {
	border-color: #0f766e;
	background: #0f766e;
	color: #ffffff;
}

.scis-assistant-message.thinking .scis-assistant-bubble {
	color: #6b7280;
}

.scis-assistant-bubble strong {
	display: block;
	margin-bottom: 5px;
	font-size: 10px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0;
	color: inherit;
	opacity: 0.7;
}

.scis-assistant-bubble p {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	white-space: normal;
}

.scis-assistant-bubble span {
	display: inline-block;
	margin-top: 7px;
	font-size: 10px;
	color: inherit;
	opacity: 0.68;
}

.scis-assistant-form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid rgba(17, 24, 39, 0.08);
	background: #ffffff;
}

.scis-assistant-input {
	min-height: 38px;
	max-height: 96px;
	resize: vertical;
	border: 1px solid rgba(17, 24, 39, 0.14);
	border-radius: 8px;
	padding: 8px 9px;
	font-size: 12px;
	line-height: 1.35;
	color: #111827;
	background: #ffffff;
}

.scis-assistant-input:focus {
	border-color: #0f766e;
	outline: 2px solid rgba(15, 118, 110, 0.14);
}

.scis-assistant-send {
	align-self: end;
	min-height: 38px;
	border: 0;
	border-radius: 8px;
	padding: 0 12px;
	background: #0f766e;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.scis-assistant-send:hover,
.scis-assistant-send:focus-visible {
	background: #115e59;
	outline: 0;
}

.scis-assistant-send:disabled,
.scis-assistant-input:disabled {
	opacity: 0.62;
	cursor: wait;
}

.scis-assistant.is-minimized .scis-assistant-panel {
	display: none;
}

.scis-assistant.is-minimized .scis-assistant-pill {
	display: inline-flex;
}

@media (max-width: 640px) {
	.scis-assistant {
		inset-block-start: auto;
		inset-inline: 10px;
		bottom: 10px;
		transform: none;
	}

	.scis-assistant.is-minimized {
		inset-inline: auto 0;
		bottom: 86px;
	}

	.scis-assistant-panel {
		width: auto;
		height: min(440px, calc(100vh - 88px));
	}
}
