.sneha-chat-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	opacity: 0;
	transition: opacity 0.15s ease;
	position: absolute;
	top: 0.3rem;
	right: 0.3rem;
	z-index: 3;
}

.sneha-chat-msg:hover .sneha-chat-actions,
.sneha-chat-bubble:hover .sneha-chat-actions,
.sneha-chat-msg.is-editing .sneha-chat-actions,
.sneha-chat-msg.is-menu-open .sneha-chat-actions {
	opacity: 1;
}

.sneha-chat-actions-btn {
	width: 1.4rem;
	height: 1.4rem;
	line-height: 1;
	padding: 0;
	font-size: 0.92rem;
	color: var(--sneha-text-primary);
}

.sneha-chat-menu {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	position: absolute;
	top: calc(100% + 0.35rem);
	right: 0;
	z-index: 50;
	min-width: 7rem;
	background: var(--sneha-surface);
	border: 1px solid var(--sneha-border);
	border-radius: 0.45rem;
	box-shadow: 0 10px 28px rgba(2, 6, 23, 0.15);
	overflow: hidden;
}

.sneha-chat-menu button {
	display: block;
	width: 100%;
	border: 0;
	background: transparent;
	padding: 0.45rem 0.55rem;
	font-size: 0.82rem;
	text-align: left;
	color: var(--sneha-text-body);
}

.sneha-chat-menu button:hover {
	background: var(--sneha-surface-muted);
}

.sneha-chat-edit {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: 0.35rem;
	width: 100%;
}

.sneha-chat-edit-input,
.sneha-chat-input,
.sneha-dm-picker-search {
	border: 1px solid var(--sneha-border);
	border-radius: 0.65rem;
	padding: 0.5rem 0.7rem;
	font-size: 0.86rem;
	background: var(--sneha-surface);
	color: var(--sneha-text-body);
}

.sneha-chat-edit-input {
	min-height: 2.4rem;
	max-height: 8rem;
	resize: none;
}

.sneha-chat-edit-actions {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.sneha-chat-edit-actions button {
	border: 0;
	padding: 0.28rem 0.55rem;
	border-radius: 0.4rem;
	font-size: 0.76rem;
	background: var(--sneha-accent);
	color: #fff;
}

.sneha-chat-edit-actions button.is-secondary {
	background: var(--sneha-surface-muted);
	color: var(--sneha-text-body);
}

.sneha-chat-input-error {
	padding: 0.4rem 1.05rem 0;
	font-size: 0.78rem;
	color: var(--sneha-text-primary);
}

.sneha-chat-input-bar {
	border-top: 1px solid var(--sneha-border);
	padding: 0.66rem 1rem;
	background: var(--sneha-surface);
}

.sneha-chat-composer {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
	min-width: 0;
}

.sneha-chat-input-row {
	display: flex;
	align-items: flex-end;
	gap: 0.5rem;
}

.sneha-chat-attach {
	border: 1px solid var(--sneha-border);
	background: var(--sneha-surface);
	color: var(--sneha-text-body);
	border-radius: 0.7rem;
	height: 2.35rem;
	padding: 0 0.8rem;
	font-size: 0.8rem;
	flex-shrink: 0;
}

.sneha-chat-input {
	flex: 1;
	line-height: 1.25;
	min-height: 2.35rem;
	max-height: 8rem;
	resize: none;
	overflow-y: hidden;
}

.sneha-chat-input:focus,
.sneha-chat-edit-input:focus,
.sneha-dm-picker-search:focus {
	outline: none;
	border-color: var(--sneha-border-strong);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sneha-accent) 16%, transparent);
}

.sneha-chat-send {
	width: 2.35rem;
	height: 2.35rem;
	border: 0;
	border-radius: 0.7rem;
	background: var(--sneha-accent);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.16s ease;
}

.sneha-chat-send:hover {
	opacity: 0.88;
}

.sneha-chat-send:disabled {
	opacity: 0.6;
	cursor: wait;
}

.sneha-chat-attachment-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.sneha-chat-attachment-preview[hidden] {
	display: none;
}

.sneha-chat-attachment-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.55rem;
	border-radius: 999px;
	background: var(--sneha-surface-muted);
	color: var(--sneha-text-body);
	font-size: 0.74rem;
}

.sneha-chat-attachment-chip-size {
	color: var(--sneha-text-primary);
}

.sneha-chat-attachment-chip-remove {
	border: 0;
	background: transparent;
	color: var(--sneha-text-primary);
	font-size: 0.95rem;
	line-height: 1;
	padding: 0;
}

.sneha-chat-mention-menu {
	position: absolute;
	left: 0;
	right: 2.85rem;
	bottom: calc(100% + 0.2rem);
	z-index: 12;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.3rem;
	max-height: 14rem;
	overflow-y: auto;
	background: var(--sneha-surface);
	border: 1px solid var(--sneha-border);
	border-radius: 0.75rem;
	box-shadow: 0 14px 34px rgba(2, 6, 23, 0.12);
}

.sneha-chat-mention-menu[hidden] {
	display: none;
}

.sneha-chat-mention-item {
	border: 0;
	background: transparent;
	padding: 0.5rem 0.6rem;
	border-radius: 0.55rem;
	text-align: left;
	color: var(--sneha-text-body);
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.sneha-chat-mention-item:hover,
.sneha-chat-mention-item.is-active {
	background: var(--sneha-accent-soft);
}

.sneha-chat-mention-item-name {
	font-size: 0.84rem;
	font-weight: 600;
}

.sneha-chat-mention-item-email {
	font-size: 0.72rem;
	color: var(--sneha-text-primary);
}

.sneha-chat-quote-preview {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.55rem 0.65rem;
	border-radius: 0.75rem;
	background: var(--sneha-accent-soft);
	border: 1px solid var(--sneha-border);
}

.sneha-chat-quote-preview[hidden] {
	display: none;
}

.sneha-chat-quote-preview-body {
	min-width: 0;
}

.sneha-chat-quote-preview-label {
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--sneha-text-body);
}

.sneha-chat-quote-preview-text {
	margin-top: 0.15rem;
	font-size: 0.8rem;
	color: var(--sneha-text-body);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sneha-chat-quote-preview-clear {
	border: 0;
	background: transparent;
	color: var(--sneha-text-primary);
	font-size: 1.05rem;
	line-height: 1;
	padding: 0.1rem;
}

.sneha-chat-quote-block {
	display: block;
	width: 100%;
	margin: 0 0 0.45rem;
	padding: 0.45rem 0.55rem;
	border-left: 3px solid var(--sneha-accent);
	border-radius: 0.55rem;
	background: color-mix(in srgb, var(--sneha-accent-soft) 70%, var(--sneha-surface));
	text-align: left;
}

.sneha-chat-msg--own .sneha-chat-quote-block {
	background: var(--bg-radio-group);
}

button.sneha-chat-quote-block {
	border: 0;
	cursor: pointer;
}

.sneha-chat-quote-author {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--sneha-text-body);
}

.sneha-chat-quote-text {
	margin-top: 0.12rem;
	font-size: 0.78rem;
	color: var(--sneha-text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sneha-chat-bubble--deleted {
	background: color-mix(in srgb, var(--sneha-surface-muted) 82%, var(--sneha-surface));
	border-color: var(--sneha-border);
	color: color-mix(in srgb, var(--sneha-text-primary) 84%, var(--sneha-surface));
	opacity: 0.92;
	font-style: italic;
}

.sneha-chat-attachments {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: 0.55rem;
}

.sneha-chat-attachment {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 0.4rem 0.55rem;
	border-radius: 0.65rem;
	background: var(--sneha-surface);
	color: var(--sneha-text-body);
	text-decoration: none;
}

.sneha-chat-attachment-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sneha-chat-msg.is-target .sneha-chat-bubble {
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--sneha-accent) 28%, transparent);
}
