:root, :host {
  --rounded: 6px;
  --bg-box: #2224;
  --fg-box: #fff4;
  --fg2: #aaa;
  --fg3: #777;
  --brand: #e49aba;
  --urgent: #914264;
  line-height: 1.4;
}

* {
  scrollbar-color: var(--fg2) transparent;
}

body {
  height: 100vh;
  height: 100dvh;
}

main {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: center;
  height: 90%;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}

.chat {
  background-color: var(--bg-chat);
  display: flex;
  flex-flow: column nowrap;
  justify-content: space-between;
  width: 100%;
  max-width: 425px;
  margin-left: auto;
}

.message-logs {
  max-height: calc(100% - 5.75rem);
}
.message-log {
  height: 100%;
  overflow-y: auto;
  white-space: pre-wrap;
}

.message-log::-webkit-scrollbar-button {
  display: none;
}

.entry {
  border-width: 2px;
  resize: none;
  overflow-y: auto;
  margin-bottom: 0;
}
/* override pico defaults */
.entry:is(:focus) {
  border-color: var(--brand);
  box-shadow: none;
}

.message-block {
  display: flex;
  flex-direction: column;
}

.message-block:not(:first-child) {
  margin-top: 1rem;
}
.message-block:not(:last-child) {
  margin-bottom: 1rem;
}

.message {
  color: var(--fg);
  display: flex;
  gap: 0.5rem;
}
.message.message--system {
  color: var(--fg2);
}
.message:not(:last-child) {
  margin-bottom: 0.125rem;
}

.message-profile-pic {
  width: 3rem;
  height: 3rem;
  border-radius: var(--rounded);
}

.message-author {
  font-weight: bold;
  color: var(--brand);
}

.message-ts {
  color: var(--fg2);
  font-size: 0.75rem;
  line-height: 1;
  height: 1rem;
  text-align: right;
  white-space: nowrap;
}
.message-header > .message-ts {
  margin-top: 0.35rem;
}
.message > .message-ts {
  min-width: 3rem;
  margin-top: 0.4rem;
}

.message-initial {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.message-header {
  display: flex;
  gap: 0.625rem;
}

textarea {
  background-color: var(--bg-box);
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
  padding: 0.3rem 0.4rem;
  height: 4.5rem;
  border: 2px solid var(--fg-box);
}

textarea:focus {
  outline: none;
  border-color: var(--fg3);
}
