@use '../mixins';

#app-mount {
	.message__5126c:has(.channelTextArea__74017).cozyMessage__5126c .contents_c19a55 {
		display: block;
		width: 100%;
		background: var(--bg-content);
		.textArea__74017 {
			height: auto;
			min-height: auto;
		}
		.channelTextArea__5126c {
			margin-top: 0;
		}
		.slateTextArea_ec4baf {
			padding-top: 0;
			padding-bottom: 0;
		}
		.inner__74017::before {
			content: none;
		}
		.buttons__74017 {
			height: auto;
		}
	}
	.operations_bab751 {
		padding: 8px 16px 16px 16px;
	}
	.mentioned__5126c {
		background: rgb(from var(--chat-mention-colour) r g b / 5%);
		&::before {
			background: var(--chat-mention-colour);
		}

		&.groupStart__5126c .contents_c19a55 {
			background: var(--chat-mention-bubble) !important;
			.messageContent_c19a55:not(:empty) {
				background: transparent !important;
			}
		}
		&:not(.groupStart__5126c) .messageContent_c19a55:not(:empty) {
			background: var(--chat-mention-bubble) !important;
		}
	}

	.cozy_c19a55 {
		.avatar_c19a55 {
			left: var(--chat-spacing-x);
			margin-top: 0;
		}

		.contents_c19a55 > .messageContent_c19a55:not(:empty) {
			margin-left: 0;
			padding: var(--chat-padding-y) var(--chat-padding-x);
			background: var(--chat-bubble-bg);
			border-radius: var(--rounded);
			display: inline-block;
			max-width: calc(100% - var(--chat-spacing-x));
		}
		.container__235ca {
			padding: 0;
		}

		&.groupStart__5126c .contents_c19a55 {
			background: var(--chat-bubble-bg);
			display: inline-block;
			border-radius: var(--rounded) var(--rounded);
			max-width: 100%;

			.header_c19a55 {
				padding-top: var(--chat-padding-y);
				padding-right: var(--chat-padding-x);
				padding-bottom: 2px;
				padding-left: var(--chat-padding-x);
				margin-left: 0;
			}
			.messageContent_c19a55 {
				&:empty {
					margin-top: 8px;
					display: block;
				}
				&:not(:empty) {
					padding-top: 0;
				}
			}
		}

		&.isSystemMessage_c19a55 .messageContent_c19a55 {
			padding: 16px !important;
		}

		&.wrapper_c19a55 {
			padding-left: calc(var(--chat-spacing-x) + 56px);
			padding-right: calc(var(--chat-spacing-x) - 11px) !important;
		}
	}

	.embedFull__623de {
		background: var(--chat-bubble-bg);
	}

	.markup__75297 pre {
		margin: 0;
		max-width: 100%;
	}

	// Message/attachment actions
	.wrapper_f7ecac {
		background: var(--bg-content);
		border-radius: var(--btn-radius);
		box-shadow: var(--shadow-flyout);
		height: auto;
		.button_f7ecac {
			@include mixins.btn;
			@include mixins.btnSecondary;
			width: auto;
			height: auto;
			min-width: auto;
			border-radius: 0;
			&.dangerous_f7ecac {
				color: hsl(var(--discord-red));
			}
		}
	}

	// @Mention/Link Channel
	.wrapper_d4fa29 {
		background: rgb(from var(--accent) r g b / 10%);
		color: var(--accent);
		font-weight: var(--font-weight-semibold);
		cursor: default;
		&:hover {
			box-shadow: inset 0 0 0 100vmax var(--btn-bg-hover);
		}
	}

	// Reactions
	.reaction__23977 {
		background: transparent;
		border-color: var(--border-high);
		border-radius: 50px;
		cursor: default;
		transition: none;
		&:hover {
			background: var(--bg-interactive-high);
		}
		&.reactionMe__23977 {
			border-color: var(--accent);
			.reactionCount__23977 {
				color: var(--accent);
			}
		}
	}

	// Codeblocks/file embeds
	.markup__75297 code {
		background: var(--bg-alt);
		border-color: var(--border-mid);
	}

	.textContainer__4d95d {
		background: var(--bg-content);
		border-radius: var(--rounded);
		border: 1px solid var(--border-mid);
	}
	.footer__4d95d {
		background: transparent;
		border: none;
		margin-top: 4px;
		padding: 0;
		height: auto;
	}
	.toggleExpandSection__4d95d,
	.anchor-1MIwyf.downloadSection__4d95d,
	.codeIcon__4d95d {
		@include mixins.btn;
		@include mixins.btnSecondary;
		margin-right: 4px;
		min-height: 34px;
		min-width: 38px;
	}
	.openFullPreviewSection__4d95d {
		@include mixins.btn;
		@include mixins.btnSecondary;
		min-height: 34px;
	}
	.downloadButton__4d95d {
		padding: 0;
		width: 16px;
		height: 16px;
	}
	.anchor-1MIwyf.downloadSection__4d95d {
		margin-left: 8px;
	}
}

// Light theme
.theme-light #app-mount .mentioned__5126c {
	background: rgb(from var(--accent) r g b / 15%);
}
