.content {
	word-wrap: break-word;
	white-space: pre-wrap;
}

.emoji {
	width: 1.375em;
	height: 1.375em;
	vertical-align: -0.3em;
	display: inline;
	object-fit: contain;
}

.emojiOnly .emoji {
	width: 3rem;
	height: 3rem;
	vertical-align: -0.5em;
}

/* MSC2545 custom emoji — inline image from a server's image pack.
   Sized to the line-height so it sits cleanly next to text. Animated
   GIF / WebP play automatically because they're just <img> elements. */
.customEmoji {
	display: inline-block;
	height: 1.4em;
	width: auto;
	max-width: 3em;
	vertical-align: -0.35em;
	object-fit: contain;
}

.emojiOnly .customEmoji {
	height: 3rem;
	max-width: 4rem;
	vertical-align: -0.5em;
}

/* Inline formatting */
.bold {
	font-weight: 700;
}

.italic {
	font-style: italic;
}

.strikethrough {
	text-decoration: line-through;
}

.inlineCode {
	padding: 0.1em 0.3em;
	margin: 0 0.1em;
	border-radius: var(--radius-sm);
	background-color: var(--background-secondary);
	font-family: var(--font-mono);
	font-size: 0.85em;
	line-height: 1.125rem;
	color: var(--text-primary);
	white-space: pre-wrap;
}

/* Code blocks */
.codeBlock {
	margin: 4px 0;
	border-radius: var(--radius-lg);
	background-color: var(--background-secondary);
	border: 1px solid var(--background-tertiary);
	overflow: hidden;
	white-space: pre;
}

.codeBlockHeader {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	background-color: var(--background-tertiary);
	font-size: var(--font-size-xs);
	color: var(--text-secondary);
	font-family: var(--font-sans);
	font-weight: 600;
	text-transform: lowercase;
}

.codeBlockBody {
	padding: 8px 12px;
	font-family: var(--font-mono);
	font-size: 0.875rem;
	line-height: 1.125rem;
	color: var(--text-primary);
	overflow-x: auto;
	white-space: pre;
}

/* Block quotes */
.blockquote {
	display: flex;
	margin: 2px 0;
}

.blockquoteBorder {
	flex-shrink: 0;
	width: 4px;
	border-radius: var(--radius-full);
	background-color: var(--interactive-muted);
	margin-right: 12px;
}

.blockquoteContent {
	color: var(--text-primary);
	white-space: pre-wrap;
}

/* Links */
.link {
	color: var(--text-link);
	text-decoration: none;
	cursor: pointer;
}

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

/* Spoilers */
.spoiler {
	background-color: var(--background-accent);
	border-radius: var(--radius-sm);
	padding: 0 2px;
	cursor: pointer;
	transition: background-color 0.1s ease;
}

.spoilerHidden {
	background-color: var(--background-accent);
	color: transparent;
}

.spoilerHidden:hover {
	background-color: var(--background-modifier-accent);
}

.spoilerRevealed {
	background-color: var(--background-modifier-hover);
	color: var(--text-primary);
}

/* Mentions */
.mention {
	padding: 0 2px;
	border-radius: var(--radius-sm);
	background-color: rgba(88, 101, 242, 0.3);
	color: var(--brand-primary);
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.1s, color 0.1s;
}

.mention:hover {
	background-color: var(--brand-primary);
	color: #fff;
}
