html, body {
  height: 100%;
  font-size: 16px;
}

body {
  margin: 0;

  font-family: 'PT Sans', sans-serif;
  color: #222233;
}

pre {
  font-family: 'PT Sans', sans-serif;

  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  white-space: -pre-wrap;
  white-space: -o-pre-wrap;
  word-wrap: break-word;
}

#navbar {
  display: flex;

  position: fixed;
  box-sizing: border-box;

  align-items: center;

  height: 3.5rem;

  top: 0;
  left: 0;
  right: 0;

  padding: 0 0.5rem;

  border-bottom: 1px #222233 solid;
  background-color: #ddddee;
}
#navbar h1 {
  margin: 0;

  font-family: 'Patua One', serif;

  flex-shrink: 0;

  font-size: 2rem;
}
#meterContainer {
  position: relative;
  width: 250px;
  height: 1.5rem;

  box-sizing: border-box;
  margin: 0 1.5rem;

  flex-shrink: 0;

  border: 1px solid #555566;
  border-radius: 0.3rem;
  overflow: hidden;

  background-color: #ccccdd;
}
#meter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;

  background-color: #9999aa; /* backup color, should never show */

  z-index: 50;

  transition: width 0.25s, background-color 0.25s;
}
#meter.low      { background-color: #55bb66; }
#meter.medium   { background-color: #ccbb66; }
#meter.high     { background-color: #cc5566; }
#meter.critical { background-color: #ff4466; }
#meterLabel {
  position: absolute;
  width: 100%;

  z-index: 55;

  text-align: center;
}
#downloadQueue {
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
}
.file {
  display: inline-block;
  width: 10rem;

  padding: 0 0.2rem;
  margin-right: 0.2rem;

  background-color: #eeeeff;
  border: 1px solid #555566;
  border-radius: 0.3rem;
}
.filename {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fileProgress {
  font-size: 0.85rem;
}

#mainCointainer {
  display: flex;

  position: fixed;
  top: 3.5rem;
  left: 0;
  right: 0;
  bottom: 0;

  align-items: stretch;
}

#sidebar {
  display: none;
  width: 150px;

  box-sizing: border-box;

  background-color: #eeeeff;

  flex-shrink: 0;
}
@media (min-width: 800px) {
  #sidebar {
    display: block;
  }
}
#sidebar > * {
  padding: 0.15rem  0.5rem;
  cursor: default;
}
#sidebar > *:hover {
  background-color: rgba(255, 255, 255, 0.5);
}
#sidebar .active {
  font-weight: bold;
}
#inboxLabel::before {
  content: "(";
}
#inboxLabel::after {
  content: ")";
}

#inbox, #readArea {
  flex: 1;
  background-color: #f8f8ff;
}
#inbox, #readMessage {
  overflow-x: hidden;
  overflow-y: auto;
}

.email {
  display: flex;
  width: 100%;

  padding: 0.25rem 0;

  border-bottom: 1px #aaaabb solid;

  align-items: stretch;

  cursor: pointer;
}
.email:hover {
  background-color: rgba(0, 0, 128, 0.06125);
}
.email.unread {
  font-weight: bold;
}
.email > * {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  margin: 0 0.5em;
}
.email .from {
  width: 300px;
  max-width: 33%;
  flex-shrink: 0;
}
.email .from::before {
  content: "from: ";
  font-weight: normal;
  color: #aaaabb;
}
.email .subject {
  flex-grow: 1;
}
.email .attachments {
  flex-shrink: 0;
}
.email .attachmentIcon {
  width: 1.25em;
  height: 1em;

  display: inline-block;
  vertical-align: middle;

  background-image: url('paperclip.svg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.email .attachmentLabel {
  margin-left: 0.25rem;
  display: inline-block;
}

#readArea {
  display: flex;
  flex-direction: column;
}

#readMenu {
  padding: 0.5rem;

  flex-shrink: 0;

  background-color: #eeeeff;
  border-bottom: 1px #222233 solid;
}
.button {
  display: inline-block;

  padding: 0.35rem 0.5rem;

  border: 1px #777788 solid;
  border-radius: 0.3rem;

  color: #ffffff;
  background-color: #777788;

  cursor: pointer;

  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;

  transition: background-color 0.15s;
}
.button:hover {
  background-color: #9999aa;
}
.button.redButton {
  background-color: #aa4455;
  border-color: #aa4455;
}
.button.redButton:hover {
  background-color: #cc6677;
}
.button.smallButton {
  padding: 0 0.2rem;
}

#readMessage {
  padding: 0.5rem;
  flex-grow: 1;
}
#readSubject {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}
#readFromContainer {
  margin-bottom: 0.5rem;
}
#readAddress {
  margin-left: 0.5rem;
  font-style: italic;
  color: #777788;
}
#readAddress::before {
  content: "<";
  margin-right: 0.125rem;
}
#readAddress::after {
  content: ">";
  margin-left: 0.125rem;
}
#readBody {
  border: 1px #777788 none;
  border-style: solid none;

  margin: 0.5em 0;
  padding: 0.5em 0;
}
#readBody hr {
  border: 0;
  border-bottom: 1px #777788 solid;

  margin: 0.5rem;
}
#readAttachments ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
}
#readAttachments ul li {
  margin-bottom: 0.125rem;
}
#readAttachments ul li::before {
  display: inline-block;
  content: "";

  width: 1.25em;
  height: 0.8em;

  margin-right: 0.125rem;

  vertical-align: middle;

  background-image: url('paperclip.svg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
#readAttachments .downloading, #readAttachments .downloaded {
  color: #777788;
  font-style: italic;
}
