/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

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

.no-boxsizing,
.no-boxsizing *,
.no-boxsizing *:after,
.no-boxsizing *:before {
  box-sizing: content-box;
}

:root {
  --primary: #29aa69;
  --hover: #2fcb7d;
  --gray: #999;
  --body: #ddd;
  --bg: #222;
  --bg-on: #1b1b1b;
  --bg-off: #282828;
  --border: #444;
  --border-light: #555;
  --red: #c30000;
  --orange: #d8832d;
  --mono: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
}

body, input, button, select, label, textarea {
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  color: var(--body);
  background: var(--bg);
}
body:focus, input:focus, button:focus, select:focus, label:focus, textarea:focus {
  outline: none;
  box-shadow: none;
}

body {
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:visited {
  color: var(--hover);
}
a:hover {
  color: var(--hover);
}

h1 {
  font-size: 48px;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 14px 16px;
  line-height: 1;
  border-radius: 8px;
  border: 0;
  background: var(--primary);
  color: white;
  cursor: pointer;
}
.btn:visited {
  color: white;
}
.btn:hover {
  background: var(--hover);
  color: white;
}
.btn.display-block {
  text-align: center;
}

.btn-icon-filled {
  padding: 8px 10px;
  line-height: 0.5;
}

.btn-icon-circle {
  padding: 8px;
  border-radius: 50%;
  line-height: 0.5;
}
.btn-icon-circle .material-symbols-outlined {
  font-size: 36px;
}

.btn-gray {
  background-color: var(--gray);
}
.btn-gray:visited, .btn-gray:hover {
  background-color: var(--gray);
}

.btn-icon {
  line-height: 1;
  padding: 0;
  background: transparent;
}
.btn-icon:hover {
  background: transparent;
}
.btn-icon.btn-gray {
  background: transparent;
  color: var(--gray);
}
.btn-icon.btn-gray:visited, .btn-icon.btn-gray:hover {
  background: transparent;
  color: var(--gray);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input {
  border: 2px solid var(--border);
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 8px;
  width: 100%;
  display: block;
  line-height: 1.2;
}
@media (prefers-color-scheme: dark) {
  .input {
    color-scheme: dark;
  }
}
.input:hover {
  border-color: var(--border-light);
}
.input:disabled {
  background: var(--border);
}
.input:focus {
  border-color: var(--border-light);
  box-shadow: 0px 0px 8px 0px var(--primary);
}
.input.error {
  border-color: var(--red);
}

.upload-wrapper {
  position: relative;
}
.upload-wrapper .upload-input {
  opacity: 0.01;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.flex-dynamic {
  width: 100%;
  flex-grow: 1;
  flex-shrink: 1;
}

.flex-static {
  flex-grow: 0;
  flex-shrink: 0;
}

.pf-4 {
  padding: 4px !important;
}

.pt-4 {
  padding-top: 4px !important;
}

.pr-4 {
  padding-right: 4px !important;
}

.pb-4 {
  padding-bottom: 4px !important;
}

.pl-4 {
  padding-left: 4px !important;
}

.pv-4 {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.ph-4 {
  padding-right: 4px !important;
  padding-left: 4px !important;
}

.pf-8 {
  padding: 8px !important;
}

.pt-8 {
  padding-top: 8px !important;
}

.pr-8 {
  padding-right: 8px !important;
}

.pb-8 {
  padding-bottom: 8px !important;
}

.pl-8 {
  padding-left: 8px !important;
}

.pv-8 {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.ph-8 {
  padding-right: 8px !important;
  padding-left: 8px !important;
}

.pf-16 {
  padding: 16px !important;
}

.pt-16 {
  padding-top: 16px !important;
}

.pr-16 {
  padding-right: 16px !important;
}

.pb-16 {
  padding-bottom: 16px !important;
}

.pl-16 {
  padding-left: 16px !important;
}

.pv-16 {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

.ph-16 {
  padding-right: 16px !important;
  padding-left: 16px !important;
}

.pf-32 {
  padding: 32px !important;
}

.pt-32 {
  padding-top: 32px !important;
}

.pr-32 {
  padding-right: 32px !important;
}

.pb-32 {
  padding-bottom: 32px !important;
}

.pl-32 {
  padding-left: 32px !important;
}

.pv-32 {
  padding-top: 32px !important;
  padding-bottom: 32px !important;
}

.ph-32 {
  padding-right: 32px !important;
  padding-left: 32px !important;
}

.pf-64 {
  padding: 64px !important;
}

.pt-64 {
  padding-top: 64px !important;
}

.pr-64 {
  padding-right: 64px !important;
}

.pb-64 {
  padding-bottom: 64px !important;
}

.pl-64 {
  padding-left: 64px !important;
}

.pv-64 {
  padding-top: 64px !important;
  padding-bottom: 64px !important;
}

.ph-64 {
  padding-right: 64px !important;
  padding-left: 64px !important;
}

.pf-0 {
  padding: 0 !important;
}

.pt-0 {
  padding-top: 0 !important;
}

.pr-0 {
  padding-right: 0 !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}

.pl-0 {
  padding-left: 0 !important;
}

.pv-0 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.ph-0 {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.mf-4 {
  margin: 4px !important;
}

.mt-4 {
  margin-top: 4px !important;
}

.mr-4 {
  margin-right: 4px !important;
}

.mb-4 {
  margin-bottom: 4px !important;
}

.ml-4 {
  margin-left: 4px !important;
}

.mv-4 {
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}

.mh-4 {
  margin-right: 4px !important;
  margin-left: 4px !important;
}

.mf-8 {
  margin: 8px !important;
}

.mt-8 {
  margin-top: 8px !important;
}

.mr-8 {
  margin-right: 8px !important;
}

.mb-8 {
  margin-bottom: 8px !important;
}

.ml-8 {
  margin-left: 8px !important;
}

.mv-8 {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}

.mh-8 {
  margin-right: 8px !important;
  margin-left: 8px !important;
}

.mf-16 {
  margin: 16px !important;
}

.mt-16 {
  margin-top: 16px !important;
}

.mr-16 {
  margin-right: 16px !important;
}

.mb-16 {
  margin-bottom: 16px !important;
}

.ml-16 {
  margin-left: 16px !important;
}

.mv-16 {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}

.mh-16 {
  margin-right: 16px !important;
  margin-left: 16px !important;
}

.mf-32 {
  margin: 32px !important;
}

.mt-32 {
  margin-top: 32px !important;
}

.mr-32 {
  margin-right: 32px !important;
}

.mb-32 {
  margin-bottom: 32px !important;
}

.ml-32 {
  margin-left: 32px !important;
}

.mv-32 {
  margin-top: 32px !important;
  margin-bottom: 32px !important;
}

.mh-32 {
  margin-right: 32px !important;
  margin-left: 32px !important;
}

.mf-64 {
  margin: 64px !important;
}

.mt-64 {
  margin-top: 64px !important;
}

.mr-64 {
  margin-right: 64px !important;
}

.mb-64 {
  margin-bottom: 64px !important;
}

.ml-64 {
  margin-left: 64px !important;
}

.mv-64 {
  margin-top: 64px !important;
  margin-bottom: 64px !important;
}

.mh-64 {
  margin-right: 64px !important;
  margin-left: 64px !important;
}

.mf-0 {
  margin: 0 !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.mr-0 {
  margin-right: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.ml-0 {
  margin-left: 0 !important;
}

.mv-0 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.mh-0 {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.toast-container {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 9999;
  width: 100vw;
  pointer-events: none;
  padding: 0 16px;
}

.toast {
  background: var(--bg-on);
  border: 3px solid var(--bg-off);
  color: white;
  padding: 16px;
  margin: 16px 0;
  border-radius: 8px;
  pointer-events: auto;
  width: 100%;
  text-align: center;
}

.toast.success {
  border-color: var(--primary);
}

.toast.error {
  border-color: var(--red);
}

.pell {
  border: 1px solid hsla(0, 0%, 4%, 0.1);
}

.pell, .pell-content {
  box-sizing: border-box;
}

.pell-content {
  height: 300px;
  outline: 0;
  overflow-y: auto;
  padding: 10px;
}

.pell-actionbar {
  background-color: #fff;
  border-bottom: 1px solid hsla(0, 0%, 4%, 0.1);
}

.pell-button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  height: 30px;
  outline: 0;
  width: 30px;
  vertical-align: bottom;
}

.pell-button-selected {
  background-color: #f0f0f0;
}

.backup {
  margin: 24px 0;
  display: block;
  font-family: "Courier New", Courier, monospace;
  font-size: 24px;
}
.backup span {
  display: inline-block;
  margin-right: 8px;
}

.messages {
  padding-bottom: 200px;
}

.message {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  position: relative;
  z-index: 0;
}
.message:first-child {
  border-top: 0;
}
.message:nth-child(1 of .unread) {
  border-top: 3px solid var(--primary);
  padding-top: 32px;
}
.message:nth-child(1 of .unread)::before {
  content: "New Messages";
  position: absolute;
  top: 16px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--primary);
}
.message:hover .actions, .message.context-open .actions {
  display: block;
}
.message.context-open {
  z-index: 20;
}
.message:not(.editing) + .message.grouped:not(.editing) {
  border-top: 0;
  padding-top: 0;
  margin-top: -8px;
}
.message:not(.editing) + .message.grouped:not(.editing) .avatar {
  opacity: 0;
  height: 0;
}
.message:not(.editing) + .message.grouped:not(.editing) .meta {
  display: none;
}
.message.first-of-date {
  border-top: 2px solid var(--gray);
  padding-top: 32px;
  margin-top: 32px;
}
.message.first-of-date .dateline {
  display: block;
}
.message.deleted {
  display: none;
}
.message.editing {
  background-color: var(--border);
  border-top: 3px solid var(--orange);
  padding-top: 32px;
}
.message.editing::before {
  content: "Editing";
  position: absolute;
  top: 16px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--orange);
}
.message .dateline {
  display: none;
  position: absolute;
  top: 8px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--gray);
}
.message .avatar {
  margin-right: 16px;
  width: 50px;
}
.message .avatar .img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: url() center center no-repeat;
  background-color: #999;
  background-size: cover;
}
.message .body {
  display: flex;
  min-height: 24px;
}
.message .edited-tag {
  font-size: 12px;
  color: var(--gray);
}
.message .actions {
  display: none;
  position: relative;
}
.message .actions > button, .message .actions > button > span {
  display: block;
}
.message .notice {
  color: var(--gray);
  font-style: italic;
  font-size: 14px;
}
.message .meta {
  display: flex;
  justify-content: space-between;
  color: var(--gray);
  margin-bottom: 4px;
}
.message .meta .username {
  font-weight: 700;
}
.message .meta .date {
  font-size: 12px;
  user-select: none;
}
.message .text {
  font-size: 18px;
}
.message .thumbs {
  margin-top: 8px;
  display: flex;
}
.message .thumb {
  display: block;
  margin-right: 8px;
  width: 128px;
  height: 128px;
  background: var(--gray) center center no-repeat;
  background-size: cover;
  user-select: none;
}
.message span.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}
.message span.thumb .material-symbols-outlined {
  font-size: 64px;
}

.reply-area {
  padding: 0 16px 16px;
  position: fixed;
  background: var(--bg);
  bottom: 0;
  left: 0;
  width: 100vw;
  z-index: 1;
}

.reply-button {
  position: absolute;
  right: 32px;
  bottom: 32px;
}

.message-input .pell-button {
  color: var(--gray);
  transition: color 0.1s linear;
}
.message-input .pell-button:hover {
  color: var(--body);
}
.message-input .pell-actionbar {
  background: var(--bg-off);
  border: 1px solid var(--border);
}
.message-input .pell-content {
  border: 1px solid var(--border);
  border-top: 0;
  height: 150px;
}
.message-input .pell-button-selected {
  background-color: var(--bg-on);
}

.unsent-photos {
  position: absolute;
  left: 32px;
  bottom: 32px;
  display: flex;
}
.unsent-photos .photo {
  position: relative;
}
.unsent-photos .btn {
  position: absolute;
  top: -12px;
  right: -12px;
  text-shadow: 0px 0px 5px var(--bg-on);
}
.unsent-photos img {
  width: 64px;
  border-radius: 4px;
}

.reply-button .upload-input {
  pointer-events: none;
}

.base b {
  font-weight: 700;
}
.base u {
  text-decoration: underline;
}
.base i {
  font-style: italic;
}
.base ul, .base ol {
  padding-left: 24px;
}
.base ul li {
  list-style: disc;
}
.base ol li {
  list-style: decimal;
}
.base li {
  margin-bottom: 4px;
  word-wrap: break-word;
}
.base pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 16px;
  display: block;
  padding: 8px;
  margin-bottom: 16px;
  background-color: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--mono);
}
.base blockquote {
  display: block;
  border-left: 3px solid var(--gray);
  padding-left: 12px;
  margin-bottom: 16px;
}

.context-bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
}
.context-bg.show {
  display: block;
}

.context-container {
  display: none;
  position: absolute;
  border: 1px solid var(--border);
  background: var(--bg-on);
  border-radius: 8px;
  top: 0;
  right: 0;
  width: 200px;
  z-index: 101;
}
.context-container.show {
  display: block;
}

.context-menu ul {
  list-style: none;
  padding: 0;
}
.context-menu li {
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.context-menu li:last-child {
  border: 0;
}
.context-menu button, .context-menu a {
  display: block;
  text-align: left;
  width: 100%;
  background: transparent;
  padding: 16px;
  border: 0;
  color: var(--primary);
  cursor: pointer;
}
.context-menu button:hover, .context-menu a:hover {
  color: var(--hover);
}
.context-menu .delete-button button, .context-menu .delete-button a {
  color: var(--red);
}
.context-menu .delete-button button:hover, .context-menu .delete-button a:hover {
  color: #dd0101;
}

.scroll-shortcut {
  position: absolute;
  top: -65px;
  right: 16px;
  transition: opacity 0.1s linear;
}
.scroll-shortcut.hidden {
  opacity: 0;
  pointer-events: none;
}
