
/* Inline media */

@import "inlineMedia.css";

/* Basic Structure */

:root {
	supported-color-schemes: dark;
}

body {
	background: #222;
	color: #cfcfcf;
	font-family: 'Myriad Pro';
	font-size: 16px;
	line-height: 1.4;
	margin: 0;
	overflow: hidden;
	word-wrap: break-word;
	word-break: break-word;
}

a {
	border-bottom: dotted 1px #8cb3ff;
	color: #8cb3ff;
	text-decoration: none;
}

a:hover {
	border: none;
	border-bottom: solid 1px #8cb3ff;
}

#body {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-height: 100%;
	overflow-y: auto;
	z-index: 100;
	position: absolute;
	opacity: 0; /* Set by JavaScript */
	-webkit-transition: opacity 0.8s linear;
}

.message,
.sender,
.time {
	padding: 4px 8px 3px;
}

.message {
	width: 100%;
}

.sender,
.time {
	flex-shrink: 0;
	background: #333;
}

.sender {
	font-weight: 600;
	overflow: hidden;
	text-align: right;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 10em;
}

body[data-view-type="sender"] .sender {
	display: none;
}

.time {
	color: #888;
	font-size: 0.8em;
	line-height: 1.8;
	white-space: nowrap;
}

div.line {
	display: flex;
	display: -webkit-flex;
	flex-flow: row;
	-webkit-flex-flow: row;
}

div.line[data-member-type="myself"] .message {
	background: #2e2e2e;
}

div.line[data-line-type="action"] .message,
div.line[data-line-type="action"] .sender {
	background: none;
	font-style: italic;
}

div.line[data-line-type="action"] .sender {
	padding-right: 2px;
}

body[data-view-type="channel"] .event .message {
	color: #666;
}

.event .message:before {
	content: '» ';
}

body[data-view-type="server"] .event .message {
	color: #999;
	font-size: inherit;
	padding-left: 1em;
	padding-right: 2em;
}

body[data-view-type="server"] .event .message:before {
	content: '';
}

.event .sender {
	background: inherit;
}

div.line.text:hover,
body[data-view-type="server"] .line:hover {
	outline: 1px solid #666;
}

div.line.text:hover .message,
div.line.text:hover .sender,
div.line.text:hover .time,
body[data-view-type="server"] .line:hover .message,
body[data-view-type="server"] .line:hover .time {
	background-color: #444;
	color: #fff;
}

div.line.text[data-highlight="true"],
div.line.text[data-highlight="true"] .time {
	color: #fff;
}

div.line.text[data-highlight="true"] {
	border: 1px solid #284e84;
	border-left: none;
	border-right: none;
	outline: none;
}

div.line.text[data-highlight="true"]:hover {
	border-color: #3069ab;
}

div.line.text[data-highlight="true"] + div.line.text[data-highlight="true"] {
	border-top: none;
}

div.line.text[data-highlight="true"] .message,
div.line.text[data-highlight="true"] .sender,
div.line.text[data-highlight="true"] .time {
	background-color: #1b3458;
}

div.line.text[data-highlight="true"]:hover .message,
div.line.text[data-highlight="true"]:hover .sender,
div.line.text[data-highlight="true"]:hover .time {
	background-color: #204571;
}

/* Selected User */
.sender {
	cursor: pointer;
}

div.line[data-line-type="privmsg"]:not(.selectedUser),
div.line[data-line-type="action"]:not(.selectedUser) {
	transition-property: border-top, border-bottom, background-color;
	transition-duration: 0.5s, 0.5s, 0.5s;
}

div.line[data-line-type="privmsg"] .time:not(.selectedUser),
div.line[data-line-type="action"] .time:not(.selectedUser) {
	transition: color 0.5s;
}

div.line.selectedUser[data-highlight="false"] .time {
	transition: color 0.5s ease-in;
	color: #fff;
}

div.line.selectedUser[data-highlight="false"] {
	transition-property: color, border-top, border-bottom, background-color;
	transition-duration: 0.5s, 0.5s, 0.5s, 0.5s;

	color: #fff;
	border: 1px solid #942f25;
	border-left: none;
	border-right: none;
	outline: none;
}

div.line.selectedUser[data-highlight="false"]:hover {
	border-color: #aa362b;
}

div.line.selectedUser[data-highlight="false"] + div.line.selectedUser[data-highlight="false"] {
	border-top: none;
}

div.line.selectedUser[data-highlight="false"] .message,
div.line.selectedUser[data-highlight="false"] .sender,
div.line.selectedUser[data-highlight="false"] .time {
	background-color: #521e17;
}

div.line.selectedUser[data-highlight="false"]:hover .message,
div.line.selectedUser[data-highlight="false"]:hover .sender,
div.line.selectedUser[data-highlight="false"]:hover .time {
	background-color: #68271d;
}

/* Remember Line */
#mark {
	border-bottom: 1px dotted #9f9f9f;
	margin: 1px 0;
	-webkit-transition: 0.2s linear;
}

/* Loading Screen */
#loadingScreen {
	position: absolute;
	top: 45%;
	left: calc(50% - (320px / 2)); /* half of width + padding */
	width: 300px;
	font-size: 18px;
	background: #181818;
	border: 1px solid #333;
	border-radius: 5px;
	padding: 5px 10px;
	opacity: 1;
	-webkit-transition: opacity 0.8s linear;
}

/* Topic Bar */
#topicBar {
	top: 0;
	left: 0;
	right: 0;
	z-index: 400;
	opacity: 0; /* Set by JavaScript */
	color: #efefef;
	position: fixed;
	padding: 4px 12px 2px;
	box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.8);
	border-bottom: 1px solid #404040;
	text-shadow: 1px 1px rgba(83, 86, 94, 0.7);
	background: #333;
	font-weight: 600;
	text-align: center;
	-webkit-transition: opacity 0.8s linear;
	-webkit-font-smoothing: subpixel-antialiased;
}

#topicBar a,
#topicBar span.channel {
	color: #f5f5f5;
	border-color: #f5f5f5;
	text-shadow: 1px 1px rgba(10, 10, 10, 0.7);
}

/* Scrolling */
body[data-custom-scroller="true"]::-webkit-scrollbar {
	width: 17px;
}

body[data-custom-scroller="true"]::-webkit-scrollbar:horizontal {
	height: 0;
}

body[data-custom-scroller="true"]::-webkit-scrollbar-track {
	background: #393939;
	box-shadow: inset 1px 0px 0px 0px #4b4b4b;
}

body[data-custom-scroller="true"]::-webkit-scrollbar-thumb {
	background-color: #7c7c7c;
	border: 4px solid transparent;
	border-left: 5px solid transparent;
	border-radius: 20px;
	background-clip: content-box;
}

body[data-custom-scroller="true"]::-webkit-scrollbar-thumb:hover {
	background-color: #b0b0b0;
}

/* Message buffer loading animation */
.message_buffer_loading_indicator {
	text-align: center;
	height: 42px;
}

.message_buffer_loading_indicator span {
	font-family: Optima !important;
	font-size: 35px;
	font-weight: 600;
	letter-spacing: 5px;
	line-height: 43px;
	color: #797979;
	-webkit-animation: ellipsis-period 1.5s infinite;
	animation: ellipsis-period 1.5s infinite;
}

.message_buffer_loading_indicator span:nth-child(1) {
	-webkit-animation-delay: 0.0s;
	animation-delay: 0.0s;
}

.message_buffer_loading_indicator span:nth-child(2) {
	-webkit-animation-delay: 0.1s;
	animation-delay: 0.1s;
}

.message_buffer_loading_indicator span:nth-child(3) {
	-webkit-animation-delay: 0.2s;
	animation-delay: 0.2s;
}

@keyframes ellipsis-period {
	0% { opacity: 0.2; }
	20% { opacity: 1.0; }
	100% { opacity: 0.2; }
}

/* Message buffer session indicator */
.date_indicator ,
.session_indicator {
	display: flex;
	display: -webkit-flex;
	padding: 0.5em 0;
}

.date_indicator > hr,
.session_indicator > hr {
	background: #444;
	border: 0;
	height: 1px;
	margin-top: 0.6em;
	flex: 1;
	-webkit-flex: 1;
}

.date_indicator > span,
.session_indicator > span {
	font-style: oblique;
	margin: 0 1em;
	color: #919191;
}

.date_indicator + #mark,
.session_indicator + #mark {
	display: none;
}

/* Nickname Colors */
data.line.text .sender[data-member-type="myself"] { 
	color: #ff8c00;
}
