html {
  box-sizing: border-box;
  font-size: 16px;
  font-family: Inter, sans-serif;
}

body {
  font-size: 16px;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

ol,
ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

input,
button,
select {
  font-family: Inter, sans-serif;
}

@font-face {
  font-family: "Inter";
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
  font-named-instance: "Regular";
  src: url("fonts/Inter-roman.var.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 100 900;
  font-display: swap;
  font-style: italic;
  font-named-instance: "Italic";
  src: url("fonts/Inter-italic.var.woff2") format("woff2");
}
html,
body {
  height: 100%;
  max-height: 100vh;
}

header {
  height: 4rem;
  background: #fffafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 {
  line-height: 4rem;
  padding-left: 6.5rem;
  background: url("img/mailcrab.svg") no-repeat center left 1rem;
  background-size: 5rem;
  font-weight: 300;
  font-size: 2.5rem;
}
header h1 span {
  color: #f74c00;
  font-weight: 400;
}
header button {
  margin-right: 1rem;
  padding: 0 1rem 0 1.9rem;
  border: 1px solid #eee;
  cursor: pointer;
  border-radius: 0;
  font-weight: 400;
  font-size: 0.9rem;
  height: 2.5rem;
  line-height: 2rem;
  background: white url("img/trash.svg") no-repeat top 0.6rem left 0.75rem;
  background-size: 14px;
}
header button span {
  font-size: 0.8rem;
  margin-left: 0.25rem;
  font-weight: 500;
}
header button:hover {
  border-color: #f74c00;
}

.main {
  height: calc(100vh - 4rem);
  display: flex;
  flex: 1;
}

.empty {
  margin: 4rem 0;
  text-align: center;
  font-size: 3rem;
  font-weight: 200;
  color: #ccc;
}

@keyframes slide-down {
  from {
    padding: 0 0.75rem 0 3.5rem;
    max-height: 0;
  }
  to {
    padding: 0.75rem 0.75rem 0.75rem 3.5rem;
    max-height: 5rem;
  }
}
.list {
  border-right: 1px solid #eee;
  width: 30%;
  height: 100%;
  min-width: 40rem;
  max-width: 50rem;
  overflow-y: auto;
}
.list ul {
  display: flex;
  flex-direction: column-reverse;
}
.list li {
  padding: 0.75rem 0.75rem 0.75rem 3.5rem;
  border-bottom: 1px solid #eee;
  line-height: 1.6;
  cursor: pointer;
  transition: all 150ms ease-in;
  animation: slide-down 300ms ease-in;
  overflow: hidden;
  font-size: 0.9rem;
  background: white url("img/envelope.svg") no-repeat center left 0.75rem;
  background-size: 2rem;
}
.list li:last-child {
  border-top: 1px solid #eee;
}
.list li:hover, .list li.selected {
  background-color: #fffafa;
}
.list li.opened {
  opacity: 0.5;
  background-image: url("img/envelope-open.svg");
}
.list li.selected {
  color: black !important;
  font-weight: 500;
  background-image: url("img/envelope-open-text.svg");
}
.list li .head {
  display: flex;
  justify-content: space-between;
}
.list li .head .name {
  font-weight: 500;
}
.list li .head .name + .email {
  margin-left: 0.5rem;
  color: rgba(0, 0, 0, 0.3);
}
.list li .head .name + .email::before {
  content: "<";
}
.list li .head .name + .email::after {
  content: ">";
}
.list li .recipients .label {
  color: rgba(0, 0, 0, 0.6);
}
.list li .recipients .email,
.list li .recipients .etc {
  color: rgba(0, 0, 0, 0.3);
}
.list li .preview {
  display: flex;
  justify-content: space-between;
}
.list li .preview .subject {
  color: rgba(0, 0, 0, 0.9);
  display: block;
}
.list li .preview .size {
  margin-left: 0.5rem;
  color: rgba(0, 0, 0, 0.3);
}
.list li.attachments .subject::before {
  content: " ";
  display: inline-block;
  margin-right: 0.2rem;
  width: 0.9rem;
  height: 0.9rem;
  background: url("img/paperclip.svg") no-repeat center left;
}

.recipients > .email + .email:before {
  content: ", <";
  display: inline-block;
  color: rgba(0, 0, 0, 0.3);
}
.recipients .email::before {
  content: "<";
  color: rgba(0, 0, 0, 0.3);
}
.recipients .email::after {
  content: ">";
  color: rgba(0, 0, 0, 0.3);
}

.view {
  background-color: #f6f6f6;
  padding: 1rem;
  flex: 1;
  overflow-x: hidden;
  border-top: 1px solid #eee;
}
.view .view-inner {
  background-color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.view .view-inner ul {
  display: block;
  background-color: #f6f6f6;
  display: flex;
}
.view .view-inner ul li button {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  margin-right: 0.3rem;
  cursor: pointer;
  border: none;
  background-color: #e9e9e9;
}
.view .view-inner ul li button:hover, .view .view-inner ul li button.active {
  background: white;
  transition: all 150ms ease-in;
}
.view .view-inner ul li.delete {
  margin-left: auto;
}
.view .view-inner ul li.delete button {
  margin-right: 0;
  margin-bottom: 0.25rem;
  padding: 0.5rem 1.5rem 0.5rem 2rem;
  background: white url("img/trash.svg") no-repeat center left 1rem;
  background-size: 12px;
  border: 1px solid #ccc;
}
.view .view-inner ul li.delete button:hover {
  border: 1px solid #f74c00;
}
.view .view-inner .tab-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  overflow-x: hidden;
  font-size: 0.9rem;
}
.view .view-inner .tab-content table {
  border-collapse: collapse;
}
.view .view-inner .tab-content table th {
  font-weight: 500;
  text-align: left;
  width: 10rem;
}
.view .view-inner .tab-content table td,
.view .view-inner .tab-content table th {
  padding: 0.5rem;
  border-bottom: 1px solid #e6e6e6;
}
.view .view-inner .tab-content table .name {
  font-weight: 500;
}
.view .view-inner .tab-content table .name + .email {
  color: rgba(0, 0, 0, 0.8);
}
.view .view-inner .tab-content table .name + .email::before {
  content: " <";
}
.view .view-inner .tab-content table .name + .email::after {
  content: ">";
}
.view .view-inner .tab-content .attachments a {
  display: inline-block;
  padding: 0.5rem 0.5rem 0.5rem 2rem;
  margin: 0.75rem 0.5rem 0 0;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  text-decoration: none;
  color: black;
  transition: all 150ms ease-in;
  background: white url("img/file.svg") no-repeat center left 0.5rem;
  background-size: 1rem;
}
.view .view-inner .tab-content .attachments a.application-pdf {
  background-image: url("img/file-pdf.svg");
}
.view .view-inner .tab-content .attachments a .size {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.7);
}
.view .view-inner .tab-content .attachments a:hover {
  background-color: #fffafa;
}
.view .view-inner .tab-content pre {
  overflow-x: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 0;
}
.view .view-inner .tab-content .body {
  width: 100%;
  flex: 1;
  padding: 0;
  margin-top: 0.75rem;
}
.view .view-inner .tab-content .body pre {
  font-family: Inter, sans-serif;
  line-height: 1.4;
}
.view .view-inner .tab-content .body iframe,
.view .view-inner .tab-content .body pre {
  border: 1px solid #eee;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
}
