@mixin container {
  background-color: var(--white);
  border: var(--border-in-light);
  border-radius: 20px;
  box-shadow: var(--shadow);
  color: var(--black);
  background-color: var(--white);
  min-width: 600px;
  min-height: 480px;

  display: flex;
  overflow: hidden;
  box-sizing: border-box;
}

.container {
  @include container();

  max-width: 1080px;
  max-height: 864px;
  width: 90vw;
  height: 90vh;
}

.tight-container {
  @include container();

  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.sidebar {
  width: 300px;
  padding: 20px;
  background-color: var(--second);
  display: flex;
  flex-direction: column;
  box-shadow: inset -2px 0px 2px 0px rgb(0, 0, 0, 0.05);
}

.sidebar-header {
  position: relative;
  padding-top: 20px;
  padding-bottom: 20px;
}

.sidebar-logo {
  position: absolute;
  right: 0;
  bottom: 18px;
}

.sidebar-title {
  font-size: 20px;
  font-weight: bold;
}

.sidebar-sub-title {
  font-size: 12px;
  font-weight: 400px;
}

.sidebar-body {
  flex: 1;
  overflow: auto;
}

.chat-list {
  width: 260px;
}

.chat-item {
  padding: 10px 14px;
  background-color: var(--white);
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

.chat-item:hover {
  background-color: var(--hover-color);
}

.chat-item-selected {
  border-color: var(--primary);
}

.chat-item-title {
  font-size: 14px;
  font-weight: bolder;
  display: block;
  width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-delete {
  position: absolute;
  top: 10px;
  right: -20px;
  transition: all ease 0.3s;
  opacity: 0;
}

.chat-item:hover > .chat-item-delete {
  opacity: 0.5;
  right: 10px;
}

.chat-item:hover > .chat-item-delete:hover {
  opacity: 1;
}

.chat-item-info {
  display: flex;
  justify-content: space-between;
  color: rgb(166, 166, 166);
  font-size: 12px;
  margin-top: 8px;
}

.chat-item-count {
}

.chat-item-date {
}

.sidebar-tail {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
}

.sidebar-actions {
  display: inline-flex;
}

.sidebar-action:last-child {
  margin-left: 15px;
}

.window-content {
  width: 100%;
  height: 100%;
}

.chat {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.window-header {
  padding: 14px 20px;
  border-bottom: rgba(0, 0, 0, 0.1) 1px solid;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.window-header-title {
  font-size: 20px;
  font-weight: bolder;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.window-header-sub-title {
  font-size: 14px;
  margin-top: 5px;
}

.window-actions {
  display: inline-flex;
}

.window-action-button {
  margin-left: 10px;
}

.chat-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
  margin-bottom: 100px;
}

.chat-message {
  display: flex;
  flex-direction: row;
}

.chat-message-user {
  display: flex;
  flex-direction: row-reverse;
}

.chat-message-container {
  max-width: 60%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: slide-in ease 0.3s;
}

.chat-message-user > .chat-message-container {
  align-items: flex-end;
}

.chat-message-avatar {
  margin-top: 20px;
}

.chat-message-status {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
  margin-top: 5px;
}

.user-avtar {
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-in-light);
  box-shadow: var(--card-shadow);
  border-radius: 10px;
}

.chat-message-item {
  margin-top: 10px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 10px;
  font-size: 14px;
  user-select: text;
  word-break: break-all;
  border: var(--border-in-light);
}

.chat-message-user > .chat-message-container > .chat-message-item {
  background-color: var(--second);
}

.chat-message-actions {
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  padding-top: 5px;
  box-sizing: border-box;
}

.chat-message-action-date {
  font-size: 12px;
  color: #aaa;
}

.chat-message-action-button {
}

.chat-input-panel {
  position: absolute;
  bottom: 20px;
  display: flex;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.chat-input-panel-inner {
  display: flex;
  flex: 1;
}

.chat-input-panel-multi {
}

.chat-input {
  height: 100%;
  width: 100%;
  border-radius: 10px;
  border: var(--border-in-light);
  box-shadow: var(--card-shadow);
  background-color: var(--white);
  color: var(--black);
  font-family: inherit;
  padding: 10px 14px;
  resize: none;
  outline: none;
}

.chat-input:focus {
  border: 1px solid var(--primary);
}

.chat-input-send {
  background-color: var(--primary);
  color: white;

  position: absolute;
  right: 30px;
  bottom: 10px;
}

.settings {
  padding: 20px;
}

.settings-title {
  font-size: 14px;
  font-weight: bolder;
}

.avatar {
  cursor: pointer;
}