.sneha-chat-attachment-chip--media {
	position: relative;
	padding: 0;
	border-radius: 0.8rem;
	overflow: hidden;
	background: var(--sneha-surface);
	border: 1px solid var(--sneha-border);
	min-width: 8rem;
	max-width: 12rem;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.sneha-chat-attachment-chip-image,
.sneha-chat-attachment-chip-video {
	display: block;
	width: 100%;
	height: 7rem;
	object-fit: cover;
	background: rgba(15, 23, 42, 0.08);
}

.sneha-chat-attachment-chip-video-wrap,
.sneha-chat-attachment-video-wrap {
	position: relative;
}

.sneha-chat-attachment-chip-meta {
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
	padding: 0.45rem 0.55rem;
	min-width: 0;
}

.sneha-chat-attachment-chip--media .sneha-chat-attachment-chip-remove {
	position: absolute;
	top: 0.3rem;
	right: 0.3rem;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.7);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sneha-chat-attachment-video-badge {
	position: absolute;
	left: 0.6rem;
	bottom: 0.6rem;
	padding: 0.18rem 0.45rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	pointer-events: none;
}

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

.sneha-chat-attachment {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	max-width: min(22rem, 100%);
	padding: 0.4rem;
	border-radius: 0.85rem;
	background: var(--sneha-surface);
	border: 1px solid var(--sneha-border);
}

.sneha-chat-link-previews {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin-top: 0.55rem;
}

.sneha-chat-link-preview {
	display: block;
	max-width: min(22rem, 100%);
	padding: 0.4rem;
	border-radius: 0.85rem;
	background: var(--sneha-surface);
	border: 1px solid var(--sneha-border);
	text-decoration: none;
	color: var(--sneha-text-body);
}

.sneha-chat-msg--own .sneha-chat-attachment,
.sneha-chat-msg--own .sneha-chat-link-preview {
	border-color: var(--sneha-border-strong);
	background: var(--sneha-surface-own);
}

.sneha-chat-link-preview-media {
	position: relative;
}

.sneha-chat-link-preview-image {
	display: block;
	width: 100%;
	max-height: 18rem;
	border-radius: 0.65rem;
	object-fit: cover;
	background: rgba(15, 23, 42, 0.08);
}

.sneha-chat-link-preview-badge {
	position: absolute;
	left: 0.6rem;
	bottom: 0.6rem;
	padding: 0.18rem 0.45rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.sneha-chat-link-preview-meta {
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
	padding-top: 0.45rem;
	min-width: 0;
}

.sneha-chat-link-preview-source {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--sneha-accent);
}

.sneha-chat-link-preview-title {
	font-size: 0.82rem;
	color: var(--sneha-text-body);
}

.sneha-chat-attachment-preview-link {
	display: block;
	text-decoration: none;
	cursor: zoom-in;
}

.sneha-chat-attachment-image,
.sneha-chat-attachment-video {
	display: block;
	width: 100%;
	max-height: 18rem;
	border-radius: 0.65rem;
	background: rgba(15, 23, 42, 0.08);
}

.sneha-chat-attachment-meta {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	color: var(--sneha-text-primary);
	text-decoration: none;
}

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

.sneha-chat-input-bar.is-drop-active {
	position: relative;
	background: var(--sneha-accent-soft);
	box-shadow: inset 0 0 0 2px var(--sneha-border-strong);
}

.sneha-chat-input-bar.is-drop-active:after {
	content: "Drop files to attach";
	position: absolute;
	inset: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px dashed var(--sneha-border-strong);
	border-radius: 0.85rem;
	background: color-mix(in srgb, var(--sneha-surface) 82%, transparent);
	color: var(--sneha-text-body);
	font-size: 0.85rem;
	font-weight: 600;
	pointer-events: none;
}

body.sneha-chat-lightbox-open {
	overflow: hidden;
}

.sneha-chat-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

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

.sneha-chat-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.86);
}

.sneha-chat-lightbox-panel {
	position: relative;
	max-width: min(92vw, 72rem);
	max-height: min(90vh, 56rem);
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	z-index: 1;
}

.sneha-chat-lightbox-close {
	align-self: flex-end;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 1.3rem;
	line-height: 1;
}

.sneha-chat-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: calc(90vh - 4rem);
	border-radius: 0.9rem;
	background: #fff;
}

.sneha-chat-lightbox-caption {
	color: #fff;
	font-size: 0.82rem;
	text-align: center;
}
