.body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px 20px 20px;
	min-height: 360px;
}

.searchInputWrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	height: 40px;
	border-radius: 12px;
	background-color: var(--background-tertiary, rgba(255, 255, 255, 0.04));
	border: 1px solid var(--user-area-divider-color, rgba(255, 255, 255, 0.08));
}

.searchInputIcon {
	color: var(--text-tertiary);
	flex-shrink: 0;
}

.searchInput {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	outline: none;
	color: var(--text-primary);
	font: inherit;
	font-size: 0.9375rem;
}

.searchInput::placeholder {
	color: var(--text-tertiary);
}

.searchClearButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: transparent;
	border: none;
	border-radius: 50%;
	color: var(--text-secondary);
	cursor: pointer;
}

.searchClearButton:hover {
	background-color: var(--background-modifier-hover, rgba(255, 255, 255, 0.08));
	color: var(--text-primary);
}

.chipRow {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chip {
	padding: 6px 12px;
	border-radius: 9999px;
	background-color: var(--background-tertiary, rgba(255, 255, 255, 0.04));
	border: 1px solid var(--user-area-divider-color, rgba(255, 255, 255, 0.08));
	color: var(--text-primary);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.15s;
}

.chip:hover {
	background-color: var(--background-modifier-hover, rgba(255, 255, 255, 0.08));
}

.searchButton {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	margin-top: 4px;
	padding: 0 16px;
	background-color: var(--brand-primary, #5865f2);
	color: #ffffff;
	border: none;
	border-radius: 12px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s;
}

.searchButton:hover:not(:disabled) {
	filter: brightness(1.1);
}

.searchButton:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.results {
	display: flex;
	flex-direction: column;
	min-height: 200px;
}

.placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 40px 16px;
	color: var(--text-tertiary);
	text-align: center;
}

.placeholderTitle {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-primary);
	margin-top: 4px;
}

.placeholderSubtitle {
	font-size: 0.8125rem;
	color: var(--text-tertiary);
}

/* ── Mobile search result cards ──────────────────────────────────────── */

.resultsList {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-top: 4px;
}

.resultsCount {
	text-align: center;
	font-size: 0.875rem;
	color: var(--text-primary);
	font-weight: 500;
	padding: 4px 0 8px;
}

.resultsGroup {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.resultsGroupHeader {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--text-primary);
	font-size: 0.9375rem;
	font-weight: 600;
}

.resultsGroupHeader svg {
	color: var(--text-secondary);
	flex-shrink: 0;
}

.resultsGroupBody {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.resultCard {
	display: flex;
	gap: 12px;
	padding: 12px;
	background-color: var(--background-tertiary, rgba(255, 255, 255, 0.04));
	border: none;
	border-radius: 12px;
	color: var(--text-primary);
	text-align: left;
	cursor: pointer;
	font: inherit;
	transition: background-color 0.15s ease;
}

.resultCard:hover {
	background-color: var(--background-modifier-hover, rgba(255, 255, 255, 0.08));
}

.resultCardAvatar {
	flex-shrink: 0;
	line-height: 0;
}

.resultCardBody {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.resultCardHeader {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}

.resultCardAuthor {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.resultCardTimestamp {
	font-size: 0.75rem;
	color: var(--text-tertiary);
	font-weight: 400;
	flex-shrink: 0;
	white-space: nowrap;
}

.resultCardContent {
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--text-secondary);
	word-wrap: break-word;
	overflow-wrap: break-word;
	max-height: 5rem;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
}

/* Embed + attachment wrappers — render below the text preview in each
   result card. The embed block hides itself when LinkEmbeds renders
   nothing (no URLs in the message) so there's no phantom gap. */
.resultCardEmbeds {
	margin-top: 6px;
}

.resultCardEmbeds:empty {
	display: none;
}

.resultCardAttachments {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 6px;
}

.resultCardImage {
	max-width: 100%;
	max-height: 220px;
	border-radius: 8px;
	object-fit: cover;
	display: block;
}

.resultCardFile {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background-color: var(--background-secondary, rgba(255, 255, 255, 0.05));
	border-radius: 8px;
	color: var(--text-link, var(--brand-primary));
	font-size: 0.8125rem;
	text-decoration: none;
	word-break: break-all;
}

.resultCardFile:hover {
	text-decoration: underline;
}
