:root {
	--off-white: #fefbf5;
	--mod-green: #27ae60;
	--founder-red: #c0392b;
	--subscriber-purple: #8e44ad;
	--vip-yellow: #fed330;
	--peppermint: #f8574e;
	--text-black: #534d4c;
}

* {
	box-sizing: border-box;
}

html,
body {
	overflow: hidden;
	height: 100vh;
	padding: 0;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
		Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
}

[data-twitch-chat] {
	--chat-font-size: 16px;
	--chat-background-color: var(--off-white);
	--chat-text-color: var(--text-black);

	background-color: var(--chat-background-color);
	color: var(--chat-text-color);
	font-size: var(--chat-font-size);
	width: 99vw;
	height: 98vh;
	filter: drop-shadow(0 4px 4px rgb(0 0 0 / 10%));
	padding: 0.5rem 1rem;
	border-radius: 20px;
	list-style: none;
	margin: 0;
	overflow: auto;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

[data-twitch-message] {
	margin: 0.25rem;
}

[data-twitch-message-reply] {
	display: none;
}

.twitch-chat-sender {
	--text-color: var(--twitch-sender-color, var(--peppermint));

	display: inline;
	justify-content: center;
	align-items: center;
	font-weight: 700;
	color: var(--text-color);
	background-color: var(--text-bg-color);
	padding-top: 0.3em;
	padding-bottom: 0.3em;
	border-radius: 0.25em;
	margin-right: 0.25em;
	position: relative;
}

.twitch-chat-sender::after {
	content: ':';
}

[data-twitch-sender-roles] .twitch-chat-sender {
	padding-left: 1.6em;
	padding-right: 0.25em;
}

[data-twitch-sender-roles] .twitch-chat-sender::before {
	top: 0.35em;
	margin-left: -1.3em;
	position: absolute;
}

/* Subscribers */
[data-twitch-sender-roles~='subscriber'] .twitch-chat-sender {
	--text-color: white;
	--text-bg-color: var(--subscriber-purple);
}

[data-twitch-sender-roles~='subscriber'] .twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg stroke="white" fill="white" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"></path></g></svg>');
}

/* VIPs */
[data-twitch-sender-roles~='vip'] .twitch-chat-sender {
	--text-color: #333;
	--text-bg-color: var(--vip-yellow);
}

[data-twitch-sender-roles~='vip'] .twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg stroke="%23333333" fill="%23333333" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm8 5.5v7h2v-7h-2zm-.285 0H8.601l-1.497 4.113L5.607 8.5H3.493l2.611 6.964h2L10.715 8.5zm5.285 5h1.5a2.5 2.5 0 1 0 0-5H14v7h2v-2zm0-2v-1h1.5a.5.5 0 1 1 0 1H16z"></path></g></svg>');
}

/* Moderators */
[data-twitch-sender-roles~='mod'] .twitch-chat-sender {
	--text-color: white;
	--text-bg-color: var(--mod-green);
}

[data-twitch-sender-roles~='mod'] .twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg stroke="white" fill="white" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" style="display: inline-block;"><g><path fill="none" d="M0 0h24v24H0z"></path><path fill-rule="nonzero" d="M7.05 13.406l3.534 3.536-1.413 1.414 1.415 1.415-1.414 1.414-2.475-2.475-2.829 2.829-1.414-1.414 2.829-2.83-2.475-2.474 1.414-1.414 1.414 1.413 1.413-1.414zM3 3l3.546.003 11.817 11.818 1.415-1.414 1.414 1.414-2.474 2.475 2.828 2.829-1.414 1.414-2.829-2.829-2.475 2.475-1.414-1.414 1.414-1.415L3.003 6.531 3 3zm14.457 0L21 3.003l.002 3.523-4.053 4.052-3.536-3.535L17.457 3z"></path></g></svg>');
}

/* Broadcasters + founders */
[data-twitch-sender-roles~='broadcaster'] .twitch-chat-sender,
[data-twitch-sender-roles~='founder'] .twitch-chat-sender {
	--text-color: white;
	--text-bg-color: var(--founder-red);
}

[data-twitch-sender-roles~='broadcaster'] .twitch-chat-sender::before,
[data-twitch-sender-roles~='founder'] .twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg stroke="white" fill="white" stroke-width="0" viewBox="0 0 512 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><path d="M509.8 332.5l-69.9-164.3c-14.9-41.2-50.4-71-93-79.2 18-10.6 46.3-35.9 34.2-82.3-1.3-5-7.1-7.9-12-6.1L166.9 76.3C35.9 123.4 0 238.9 0 398.8V480c0 17.7 14.3 32 32 32h236.2c23.8 0 39.3-25 28.6-46.3L256 384v-.7c-45.6-3.5-84.6-30.7-104.3-69.6-1.6-3.1-.9-6.9 1.6-9.3l12.1-12.1c3.9-3.9 10.6-2.7 12.9 2.4 14.8 33.7 48.2 57.4 87.4 57.4 17.2 0 33-5.1 46.8-13.2l46 63.9c6 8.4 15.7 13.3 26 13.3h50.3c8.5 0 16.6-3.4 22.6-9.4l45.3-39.8c8.9-9.1 11.7-22.6 7.1-34.4zM328 224c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z"></path></svg>');
}

/* Multiple roles */
[data-twitch-sender-roles~='vip'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg fill="%23333333" stroke="%23333333" stroke-width="0" viewBox="0 0 54 24" height="1em" width="2.25em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><path d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm8 5.5v7h2v-7h-2zm-.285 0H8.601l-1.497 4.113L5.607 8.5H3.493l2.611 6.964h2L10.715 8.5zm5.285 5h1.5a2.5 2.5 0 1 0 0-5H14v7h2v-2zm0-2v-1h1.5a.5.5 0 1 1 0 1H16z"></path><g style="transform: translateX(30px)"><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"></path></g></svg>');
}

[data-twitch-sender-roles~='mod'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg fill="white" stroke="white" stroke-width="0" viewBox="0 0 54 24" height="1em" width="2.25em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><path d="M7.05 13.406l3.534 3.536-1.413 1.414 1.415 1.415-1.414 1.414-2.475-2.475-2.829 2.829-1.414-1.414 2.829-2.83-2.475-2.474 1.414-1.414 1.414 1.413 1.413-1.414zM3 3l3.546.003 11.817 11.818 1.415-1.414 1.414 1.414-2.474 2.475 2.828 2.829-1.414 1.414-2.829-2.829-2.475 2.475-1.414-1.414 1.414-1.415L3.003 6.531 3 3zm14.457 0L21 3.003l.002 3.523-4.053 4.052-3.536-3.535L17.457 3z"></path><g style="transform: translateX(30px)"><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"></path></g></svg>');
}

[data-twitch-sender-roles~='mod'][data-twitch-sender-roles~='vip']
	.twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg fill="white" stroke="white" stroke-width="0" viewBox="0 0 54 24" height="1em" width="2.25em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><path d="M7.05 13.406l3.534 3.536-1.413 1.414 1.415 1.415-1.414 1.414-2.475-2.475-2.829 2.829-1.414-1.414 2.829-2.83-2.475-2.474 1.414-1.414 1.414 1.413 1.413-1.414zM3 3l3.546.003 11.817 11.818 1.415-1.414 1.414 1.414-2.474 2.475 2.828 2.829-1.414 1.414-2.829-2.829-2.475 2.475-1.414-1.414 1.414-1.415L3.003 6.531 3 3zm14.457 0L21 3.003l.002 3.523-4.053 4.052-3.536-3.535L17.457 3z"></path><g style="transform: translateX(30px)"><path d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm8 5.5v7h2v-7h-2zm-.285 0H8.601l-1.497 4.113L5.607 8.5H3.493l2.611 6.964h2L10.715 8.5zm5.285 5h1.5a2.5 2.5 0 1 0 0-5H14v7h2v-2zm0-2v-1h1.5a.5.5 0 1 1 0 1H16z"></path></g></svg>');
}

[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg fill="white" stroke="white" stroke-width="0" viewBox="0 0 54 24" height="1em" width="2.25em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><path style="transform: scale(0.045);" d="M509.8 332.5l-69.9-164.3c-14.9-41.2-50.4-71-93-79.2 18-10.6 46.3-35.9 34.2-82.3-1.3-5-7.1-7.9-12-6.1L166.9 76.3C35.9 123.4 0 238.9 0 398.8V480c0 17.7 14.3 32 32 32h236.2c23.8 0 39.3-25 28.6-46.3L256 384v-.7c-45.6-3.5-84.6-30.7-104.3-69.6-1.6-3.1-.9-6.9 1.6-9.3l12.1-12.1c3.9-3.9 10.6-2.7 12.9 2.4 14.8 33.7 48.2 57.4 87.4 57.4 17.2 0 33-5.1 46.8-13.2l46 63.9c6 8.4 15.7 13.3 26 13.3h50.3c8.5 0 16.6-3.4 22.6-9.4l45.3-39.8c8.9-9.1 11.7-22.6 7.1-34.4zM328 224c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z"></path><g style="transform: translateX(30px)"><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"></path></g></svg>');
}

[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='vip']
	.twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg fill="white" stroke="white" stroke-width="0" viewBox="0 0 54 24" height="1em" width="2.25em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><path style="transform: scale(0.045);" d="M509.8 332.5l-69.9-164.3c-14.9-41.2-50.4-71-93-79.2 18-10.6 46.3-35.9 34.2-82.3-1.3-5-7.1-7.9-12-6.1L166.9 76.3C35.9 123.4 0 238.9 0 398.8V480c0 17.7 14.3 32 32 32h236.2c23.8 0 39.3-25 28.6-46.3L256 384v-.7c-45.6-3.5-84.6-30.7-104.3-69.6-1.6-3.1-.9-6.9 1.6-9.3l12.1-12.1c3.9-3.9 10.6-2.7 12.9 2.4 14.8 33.7 48.2 57.4 87.4 57.4 17.2 0 33-5.1 46.8-13.2l46 63.9c6 8.4 15.7 13.3 26 13.3h50.3c8.5 0 16.6-3.4 22.6-9.4l45.3-39.8c8.9-9.1 11.7-22.6 7.1-34.4zM328 224c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z"></path><g style="transform: translateX(30px)"><path d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm8 5.5v7h2v-7h-2zm-.285 0H8.601l-1.497 4.113L5.607 8.5H3.493l2.611 6.964h2L10.715 8.5zm5.285 5h1.5a2.5 2.5 0 1 0 0-5H14v7h2v-2zm0-2v-1h1.5a.5.5 0 1 1 0 1H16z"></path></g></svg>');
}

[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='mod']
	.twitch-chat-sender::before {
	content: url('data:image/svg+xml; utf8, <svg fill="white" stroke="white" stroke-width="0" viewBox="0 0 54 24" height="1em" width="2.25em" xmlns="http://www.w3.org/2000/svg" style="display: inline;"><path style="transform: scale(0.045);" d="M509.8 332.5l-69.9-164.3c-14.9-41.2-50.4-71-93-79.2 18-10.6 46.3-35.9 34.2-82.3-1.3-5-7.1-7.9-12-6.1L166.9 76.3C35.9 123.4 0 238.9 0 398.8V480c0 17.7 14.3 32 32 32h236.2c23.8 0 39.3-25 28.6-46.3L256 384v-.7c-45.6-3.5-84.6-30.7-104.3-69.6-1.6-3.1-.9-6.9 1.6-9.3l12.1-12.1c3.9-3.9 10.6-2.7 12.9 2.4 14.8 33.7 48.2 57.4 87.4 57.4 17.2 0 33-5.1 46.8-13.2l46 63.9c6 8.4 15.7 13.3 26 13.3h50.3c8.5 0 16.6-3.4 22.6-9.4l45.3-39.8c8.9-9.1 11.7-22.6 7.1-34.4zM328 224c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z"></path><g style="transform: translateX(30px)"><path d="M7.05 13.406l3.534 3.536-1.413 1.414 1.415 1.415-1.414 1.414-2.475-2.475-2.829 2.829-1.414-1.414 2.829-2.83-2.475-2.474 1.414-1.414 1.414 1.413 1.413-1.414zM3 3l3.546.003 11.817 11.818 1.415-1.414 1.414 1.414-2.474 2.475 2.828 2.829-1.414 1.414-2.829-2.829-2.475 2.475-1.414-1.414 1.414-1.415L3.003 6.531 3 3zm14.457 0L21 3.003l.002 3.523-4.053 4.052-3.536-3.535L17.457 3z"></path></g></svg>');
}

[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender::before,
[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='vip']
	.twitch-chat-sender::before,
[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='mod']
	.twitch-chat-sender::before,
[data-twitch-sender-roles~='mod'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender::before,
[data-twitch-sender-roles~='mod'][data-twitch-sender-roles~='vip']
	.twitch-chat-sender::before,
[data-twitch-sender-roles~='vip'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender::before {
	margin-left: -2.55em;
}

[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender,
[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='vip']
	.twitch-chat-sender,
[data-twitch-sender-roles~='founder'][data-twitch-sender-roles~='mod']
	.twitch-chat-sender,
[data-twitch-sender-roles~='mod'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender,
[data-twitch-sender-roles~='mod'][data-twitch-sender-roles~='vip']
	.twitch-chat-sender,
[data-twitch-sender-roles~='vip'][data-twitch-sender-roles~='subscriber']
	.twitch-chat-sender {
	padding-left: 2.85em;
}

.twitch-chat-message {
	color: var(--chat-text-color);
	display: inline;
	line-height: 24px;
	word-break: break-word;
}

.twitch-chat-command {
	background-color: transparent;
	color: inherit;
}

[data-twitch-emote] {
	display: inline-block;
	height: 1.5em;
	margin-bottom: -0.3em;
}

[data-twitch-emote] + [data-twitch-emote] {
	margin-left: -0.22em;
}

[data-twitch-mentioned-user] {
	background-color: transparent;
	color: var(--chat-text-color);
}

[data-twitch-message] a {
	color: var(--peppermint);
	text-decoration: none;
}
