Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

7.9 KB
Raw Blame
@use '../../_scrollbar' as *;

.input {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--l1-background);
	border-radius: var(--radius-2);
	padding: 8px;
	border: 1px solid var(--l1-border);
	position: relative;
}

.attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.contextTags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.contextTag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	background: var(--l2-background);
	border: 1px solid var(--l1-border);
	border-radius: var(--radius-2);
	padding: 4px 6px 4px 8px;
	color: var(--l1-foreground);

	button {
		height: auto !important;
		min-height: 0 !important;
		width: auto !important;
	}

	// `auto` chips are derived from the URL (current page) — visually
	// distinguished by a dashed border + slightly muted text so the user
	// can tell them apart from explicit @-mentions. Tighter padding /
	// font-size keeps them visually subordinate to user `@`-picks.
	&.auto {
		border-style: dashed;
		color: var(--l2-foreground);
		background: transparent;
		font-size: 10px;
		padding: 2px 4px 2px 6px;
		gap: 3px;
	}
}

.contextTagContent {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 220px;

	.contextTagLabel {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

.contextTagLabel {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.attachmentChip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	background: var(--l3-background);
	border-radius: var(--radius-2);
	padding: 2px 6px 2px 8px;
	color: var(--l2-foreground);
	max-width: 180px;
}

.attachmentName {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.composer {
	background: var(--l2-background);
	border: 1px solid var(--l2-border);
	border-radius: var(--radius-2);
	padding: 4px;
	transition:
		border-color 0.15s,
		box-shadow 0.15s;

	// Scope the focus ring to the textarea row only — the surrounding
	// chrome (context chips, "Add Context", mic, send) sits outside this
	// element and stays unaffected when the cursor enters the textarea.
	&:focus-within {
		border-color: var(--accent-primary);
		box-shadow: 0 0 0 1px
			color-mix(in srgb, var(--accent-primary), transparent 70%);
	}
}

.footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.leftActions,
.rightActions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.attachBtn {
	color: var(--l3-foreground);
}

.contextBtn {
	flex-shrink: 0;
	gap: 6px;
	border-style: dashed !important;
	padding-inline: 12px !important;
}

.textarea {
	display: block;
	width: 100%;
	background: transparent;
	border: none;
	outline: none;
	resize: none;
	color: var(--l1-foreground);
	font-size: 12px;
	line-height: 1.5;
	overflow-y: auto;
	font-family: inherit;
	@include scrollbar(0.2rem);

	&::placeholder {
		color: var(--l3-foreground);
		opacity: 0.6;
	}

	&:disabled {
		opacity: 0.2;
		cursor: not-allowed;
	}
}

.charWarning {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 6px 8px;
	font-size: 11px;
	font-weight: 500;
	color: var(--accent-sienna);
	background: color-mix(in srgb, var(--accent-sienna), transparent 90%);
	border: 1px solid color-mix(in srgb, var(--accent-sienna), transparent 65%);
	border-radius: var(--radius-2);
}

.sendBtn {
	flex-shrink: 0;
	border-radius: var(--radius-2);

	&.stop {
		background: var(--accent-cherry) !important;
		border-color: var(--accent-cherry) !important;

		&:hover {
			opacity: 0.85;
		}
	}
}

.contextPopover {
	width: 480px !important;
	max-width: min(92vw, 480px);
	margin-left: 16px;
	border: 1px solid var(--l2-border);
	border-radius: var(--radius-2);
	background: var(--l1-background);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
	padding: 8px;
	// Clip horizontal overflow so long entity titles can't poke past the
	// popover's right edge. Vertical overflow is handled inside
	// `.contextPopoverEntities`.
	overflow-x: hidden;

	--popover-padding: 0;

	z-index: 1000;
}

.contextPopoverContent {
	display: grid;
	grid-template-columns: 180px 1fr;
	min-height: 250px;
	min-width: 0;
}

.contextPopoverCategories {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px;
	border-right: 1px solid var(--l2-border);
	--button-justify-content: flex-start;

	> [data-slot='button'][aria-selected='true'] {
		--button-variant-ghost-background-color: color-mix(
			in srgb,
			var(--accent-primary),
			transparent 86%
		);
		--button-variant-ghost-color: var(--l1-foreground);
	}
}

.contextPopoverRight {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	// Match the previous fixed entity-list height so the inner search +
	// scrolling list have a definite container to size against.
	height: 320px;
}

.contextPopoverSearch {
	padding: 8px;
	flex-shrink: 0;
	position: relative;
	width: 90%;
}

.contextPopoverSearchInput {
	width: 100%;
	box-sizing: border-box;
}

.contextPopoverEntities {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 8px;
	min-width: 0;
	@include scrollbar(0.2rem);
	--button-justify-content: flex-start;

	> [data-slot='button'][aria-pressed='true'] {
		--button-variant-ghost-background-color: color-mix(
			in srgb,
			var(--accent-primary),
			transparent 86%
		);
		--button-variant-ghost-color: var(--l1-foreground);
	}
}

.contextPopoverEmpty {
	// Fill the entity panel so the state sits centred in the dead space rather
	// than clinging to the top-left corner.
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 24px 20px;
	text-align: center;
	font-size: 12px;
	color: var(--l3-foreground);
}

.contextPopoverEmptyIcon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	// `--empty-accent` is set per category on the root (robin/cherry/forest).
	color: var(--empty-accent);
	background: color-mix(in srgb, var(--empty-accent), transparent 88%);
	border-radius: var(--radius-2);
}

.contextPopoverEmptyTitle {
	margin: 0;
	max-width: 280px;
	color: var(--l2-foreground);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	// Clamp to 2 lines with an ellipsis so a long query can't blow out the
	// popover height. The CTA below is a stock DS link button, so the query is
	// kept readable here rather than forcing the button to wrap.
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	overflow-wrap: anywhere;
}

.contextPopoverEmptyCtaLabel {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	overflow-wrap: anywhere;
	text-align: center;
}

.micRecording {
	display: flex;
	align-items: center;
	background: var(--l2-background);
	border-radius: 999px;
	padding: 2px;
	gap: 0;
	flex-shrink: 0;
	overflow: hidden;
	--button-icon-size: 12px;

	> :last-child {
		--button-icon-size: 9px;
		--button-variant-ghost-color: var(--accent-cherry);
		--button-variant-ghost-hover-color: var(--accent-cherry);
	}
}

.micWaves {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	height: 20px;
	padding: 0 6px;

	span {
		display: block;
		width: 2px;
		border-radius: 2px;
		background: var(--l1-foreground);
		animation: voiceWave 0.9s ease-in-out infinite;

		&:nth-child(1) {
			animation-delay: 0s;
		}
		&:nth-child(2) {
			animation-delay: 0.1s;
		}
		&:nth-child(3) {
			animation-delay: 0.2s;
		}
		&:nth-child(4) {
			animation-delay: 0.3s;
		}
		&:nth-child(5) {
			animation-delay: 0.4s;
		}
		&:nth-child(6) {
			animation-delay: 0.3s;
		}
		&:nth-child(7) {
			animation-delay: 0.2s;
		}
		&:nth-child(8) {
			animation-delay: 0.1s;
		}
	}
}

@keyframes voiceWave {
	0%,
	100% {
		height: 2px;
		opacity: 0.4;
	}
	50% {
		height: 12px;
		opacity: 1;
	}
}