
/* Inline media */

@import "inlineMedia.css";

/* Basic Body Structure */

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

* {
	margin: 0;
	padding: 0;
	font-size: 100%;
	word-wrap: break-word;
	word-break: break-word;
	line-height: 1.7em;
}

body {
	color: #e7e7e7;
	height: 100%;
 	z-index: 100;
	font-size: 11px;
	overflow: hidden;
	background-color: #272822;
	font-family: "Lucida Grande";
}

#body {
	left: 0;
	right: 0;
	bottom: 0;
	opacity: 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;
}

/* Only factor in height of topic bar when selected == true
 because that is only time the topic is displayed according
 to the logic defined by baseLayout.css */
body[data-selected="true"][data-view-type="channel"] #body {
	max-height: calc(100% - 2.4em); /* height minus topic */
}

div.line {
 	margin-top: -1px;
	clear: both;
}

body[dir="rtl"] .sender {
	display: inline-block;
}

/* 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;
}

/* 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 #333333;
	border-radius: 5px;
	padding: 5px 10px;
	opacity: 1; /* Set by JavaScript */
	-webkit-transition: opacity 0.8s linear;
}

/* Time */

body[dir="ltr"] .time {
	font-size: 9px;
	color: #999;
	white-space: nowrap;
	text-transform:lowercase;
	padding-right: 10px;
}

body[dir="rtl"] .time {
	color: #999;
	white-space: nowrap;
	padding-left: 0.4em;
	display: inline-block;
}

/* Encryption Lock */

.encryptionLock img {
	float: right;
	margin: 0;
	padding: 0;
	height: 11px;
	margin-top: 2px;
	padding-left: 10px;
}

/* Links */

a {
	color: #2199ff;
	text-decoration: none;
}

a:hover {
	color: #70baff;
}

/* Topic Bar */

#topicBar {
	top: 0;
	left: 0;
	right: 0;
	opacity: 0; /* Set by JavaScript */
	z-index: 400;
	color: #555;
	position: fixed;
	padding: 2px 0.5em 3px;
	box-shadow: 0 1px 5px #444;
	border-bottom: 1px solid #222;
	text-shadow: 1px 1px rgba(10, 10, 10, 0.7);
	background: #171814;
	-webkit-transition: opacity 0.8s linear;
	-webkit-font-smoothing: subpixel-antialiased;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Topic bar hover additions contributed with permission from the project:
	<https://github.com/hbang/Simplified-Light-Modifications> */

#topicBar:hover {
	overflow: visible;
	white-space: normal;
}

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

/* Remember Line */

#mark {
	position: relative;
	clear: both;
	z-index: 295;
	margin: 10px 0;
	border-bottom: 1px dotted;
	border-color: #444;
	-webkit-transition: 0.2s linear;
}

/* Selected User Message */

.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: #aaa;
}

div.line.selectedUser[data-line-type="privmsg"][data-member-type="myself"] .time {
	color: #fff;
}

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

  	z-index: 190;
  	position: relative;

	border-top: 0px !important;
	border-bottom: 0px !important;
  	background-color: #34352d !important;
}

/* Message buffer loading animation */

.message_buffer_loading_indicator {
	text-align: center;
	height: 42px;
	position: relative;
	z-index: 200;
}

.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;
}

/* NOTICE/CTCP/WALLOPS */

div.line[data-line-type="ctcp"],
div.line[data-line-type="notice"],
div.line[data-line-type="wallops"] {
	color: #f00;
  	z-index: 191;
	background: #400;
  	position: relative;
 	padding: 2px 5px 2px 5px;
	border-top: 1px solid #811;
	border-bottom: 1px solid #811;
}

div.line[data-line-type="notice"] .sender {
	color: #f00;
}

/* PRIVMSG */

div.line[data-line-type="privmsg"][data-highlight="false"] {
 	padding: 3px 5px 3px 5px;
}

div.line[data-line-type="privmsg"][data-highlight="true"],
div.line[data-line-type="action"][data-highlight="true"] {
 	padding: 2px 5px 2px 5px;
	border-top: 1px solid #988C00;
	border-bottom: 1px solid #988C00;
  	background-color: #362C00 !important;
}

div.line[data-line-type="privmsg"] .message {
	color: #aaa;
}

div.line[data-line-type="privmsg"][data-member-type="myself"] .message {
	color: #fff;
}

div.line[data-line-type="privmsg"] .sender {

}

/* ACTION */

div.line[data-line-type="action"] {
 	padding: 3px 5px 3px 5px;
}

div.line[data-line-type="action"] .message {
	color: #aaa;
}

div.line[data-line-type="action"] .sender {
	color: #aaa;
}

body[dir="ltr"] div.line[data-line-type="action"] .sender:before {
	content: "\2022";
	margin-right: 0.4em;
}

body[dir="ltr"] div.line[data-line-type="action"] .sender:after {
	content: "";
  	/* margin-right: 0.4em; */
}

body[dir="rtl"] div.line[data-line-type="action"] .sender:before {
	content: "\2022";
	margin-left: 0.4em;
}

body[dir="rtl"] div.line[data-line-type="action"] .sender:after {
	content: "";
  	/* margin-left: 0.4em; */
}

/* DEBUG/INVITE */

div.line[data-line-type="invite"],
div.line[data-line-type="debug"],
div.line[data-line-type="dcc-file-transfer"],
div.line[data-line-type="off-the-record-encryption-status"] {
	color: #777;
  	z-index: 190;
	background: #222;
  	position: relative;
 	padding: 2px 5px 2px 5px;
	border-top: 1px solid #444;
	border-bottom: 1px solid #444;
}

/* off-the-record-encryption-status Message Event */
div.line[data-line-type="off-the-record-encryption-status"] .message {
	color: #ff0000;
	font-weight: 700;
}

/* Message of the Day (MOTD) */
/* 720, 721, 722 are used by ShadowIRCd for Oper MOTD. */
/* 372, 375, 376 are normal MOTD shared by several IRCds. */

div.line[data-command="372"],
div.line[data-command="721"] {
	border: none;
	padding-top: 3px;
	padding-bottom: 3px;
}

div.line[data-command="375"],
div.line[data-command="720"] { /* Start. */
	border-bottom: none;
	padding-top: 2px;
	padding-bottom: 3px;
}

div.line[data-command="376"],
div.line[data-command="722"] { /* End. */
	border-top: none;
	padding-top: 3px;
	padding-bottom: 3px;
}

div.line[data-command="372"] .message,
div.line[data-command="375"] .message,
div.line[data-command="376"] .message
div.line[data-command="720"] .message,
div.line[data-command="721"] .message,
div.line[data-command="722"] .message {
	font-family: "Menlo" !important;
}

/* GENERAL EVENT */

div.line[data-line-type="join"],
div.line[data-line-type="part"],
div.line[data-line-type="kick"],
div.line[data-line-type="quit"],
div.line[data-line-type="kill"],
div.line[data-line-type="nick"],
div.line[data-line-type="mode"],
div.line[data-line-type="topic"],
div.line[data-line-type="website"] {
 	padding: 3px 5px 3px 5px;
	color: #666;
}

body[dir="ltr"] div.line[data-line-type="join"] .message:before {
	content: "→";
  	color: #0c0;
  	/* margin-right: 0.4em; */
}

body[dir="ltr"] div.line[data-line-type="kick"] .message:before,
body[dir="ltr"] div.line[data-line-type="part"] .message:before,
body[dir="ltr"] div.line[data-line-type="quit"] .message:before {
	content: "←";
  	color: #e00;
  	/* margin-right: 0.4em; */
}

body[dir="ltr"] div.line[data-line-type="nick"] .message:before {
	content:"•";
  	color: #0c0;
  	/* margin-right: 0.4em; */
}

body[dir="rtl"] div.line[data-line-type="join"] .message:before {
	content: "→";
  	color: #0c0;
  	/* margin-left: 0.4em; */
}

body[dir="rtl"] div.line[data-line-type="kick"] .message:before,
body[dir="rtl"] div.line[data-line-type="part"] .message:before,
body[dir="rtl"] div.line[data-line-type="quit"] .message:before {
	content: "←";
  	color: #e00;
  	/* margin-left: 0.4em; */
}

body[dir="rtl"] div.line[data-line-type="nick"] .message:before {
	content:"•";
  	color: #0c0;
  	/* margin-left: 0.4em; */
}

/* Nickname Colors */

div.line[data-line-type="privmsg"] .sender[data-member-type="myself"] {
	color: #ff6f6f;
}
