@keyframes slidein {
  0% {
    position: relative;
    top: 10px;
    opacity: 0;
  }

  99% {
    position: relative;
    top: 0;
    opacity: 1;
  }

  100% {
    position: static;
    top: unset;
  }
}

@keyframes slidein_header {
  0% {
    position: relative;
    left: -10px;
    opacity: 0;
  }

  99% {
    position: relative;
    left: 0;
    opacity: 1;
  }

  100% {
    position: static;
    top: unset;
  }
}

.ChatLayout {
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;

  overflow: hidden;
  display: grid;
  grid-template-columns: 256px 1fr;
}

.ChatLayout_Aside {
  padding: 4px 16px;
  background-color: var(--bg-1);
  color: var(--fg-1);
  border-right: 1px solid var(--neutral);
  overflow-y: auto;
}

.ChatLayout_Aside.Modifier_Open {}

.ChatLayout_Inner {
  max-width: 100%;
  max-height: 100%;

  overflow: hidden;

  display: grid;
  grid-template-rows: 48px auto 64px;
}

.ChatLayout_Inner_Header {
  padding: 6px 16px;
  background-color: var(--bg-2);
  color: var(--fg-2);
  border-bottom: 1px solid var(--neutral);
  overflow: hidden;

  display: grid;
  grid-template-columns: auto;
  gap: 8px;
  align-items: center;
}

.ChatLayout_Inner_Header>* {
  animation-duration: 0.25s;
  animation-name: slidein_header;
}

.ChatLayout_Inner_Header.Modifier_Back {
  padding: 6px 8px;
  grid-template-columns: 32px 1fr;
}

.ChatLayout_Inner_Header_Back_Button {
  font-family: var(--font-MaterialSymbols);
  font-size: 24px;
  width: 32px;
  height: 32px;
}

.ChatLayout_Inner_Header_Menu {
  display: none;
}

.ChatLayout_Inner_Header_Title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  align-content: center;
  width: 100%;
  overflow: hidden;
}

.ChatLayout_Inner_Header_Title h1 {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
  font-size: 1em;
  text-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ChatLayout_Inner_Header_Title span {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
  font-size: 0.75em;
  text-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ChatLayout_Inner_Footer {
  padding: 6px 16px;
  background-color: var(--bg-1);
  color: var(--fg-1);
  border-top: 1px solid var(--neutral);
  overflow: hidden;

  display: grid;
  grid-template-columns: auto;
  gap: 8px;
  align-items: center;
}

.ChatLayout_Inner_Main {
  display: inline-block;
  background-color: var(--bg-1);
  color: var(--fg-1);
  width: 100%;

  overflow: hidden;
  overflow-y: auto;
  text-align: center;
  position: relative;
}

.ChatLayout_Inner_Main_Content {
  display: inline-block;
  text-align: left;
  overflow: hidden;
  background-color: var(--bg-2);
  color: var(--fg-2);
  padding: 0 16px;
  max-width: 50em;
  width: 100%;
  min-height: 100%;
  margin-bottom: -4px;

  /* border-left: 1px solid var(--neutral);
  border-right: 1px solid var(--neutral); */
}

.ChatLayout_Inner_Main_Content>* {
  animation-duration: 0.25s;
  animation-name: slidein;
}

.ChatLayout_Inner_Main_Content img {
  max-width: 100%;
}

@media screen and (max-width: 800px) {
  .ChatLayout {
    grid-template-columns: 1fr;
  }

  .ChatLayout_Aside {
    position: absolute;
    height: calc(100% - 48px);
    width: 100%;
    top: 48px;
    z-index: 50;
    left: -100%;
    transition: left 0.125s;
  }

  .ChatLayout_Inner_Header_Menu {
    display: inline-block;
  }

  .ChatLayout_Inner_Header {
    padding: 6px 8px;
    grid-template-columns: 32px auto;
  }

  .ChatLayout_Aside.Modifier_Open {
    left: 0;
  }
}

/* sidebar */

.Main_Image {
  text-align: center;
  margin: 16px 0;
}

.Main_Image img {
  border-radius: 8px;
}

.Main_List {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.Main_List>a {
  text-decoration: none;
}

.Main_List_CurrentLink>div {
  background-color: var(--bg-2);
}

.Main_List_Button {
  color: var(--accent-color);
  overflow: hidden;
  text-overflow: ellipsis;
}

.Main_List_Button_Badge {
  background-color: rgb(255, 64, 64);
  color: white;
  padding: 0 4px;
  margin: 4px;
  float: right;
  border-radius: 4px;
  pointer-events: none;
}

.Main_List_CurrentLink .Main_List_Button_Badge {
  display: none;
}

.Main_List_Button_Slim {
  padding: 2px 8px !important;
  background-color: var(--bg-3);
  color: var(--fg-2);
}

.Main_List_Button_Slim:hover {
  background-color: var(--bg-2);
  color: var(--fg-1);
}

/* .Main_List_Button_Slim:active {
  scale: 1;
} */