:host {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: fit-content;
  min-height: 0;
  position: relative;
  box-sizing: border-box;
  max-height: var(--ux-chat-max-height, 100%);
}

#chat-container {
  background-color: #eff0f4;
  padding: 30px;
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-anchor: none;
}
#chat-container:has(ux-chat-typing-indicator) {
  scroll-behavior: smooth;
}
#chat-container.has-error ux-modal {
  position: absolute;
}
#chat-container.has-error .chat-error-icon {
  text-align: center;
  margin-bottom: 16px;
}
#chat-container.has-error .chat-error-icon ux-icon {
  font-size: 48px;
  color: #ff0201;
}
#chat-container.has-error .chat-error-title {
  text-align: center;
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}
#chat-container.has-error .chat-error-message {
  text-align: center;
  margin: 0 0 24px;
  color: #131313;
  white-space: pre-line;
}
#chat-container.has-error .chat-error-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
#chat-container.has-error .chat-error-actions ux-button {
  min-width: 120px;
}

.chat-container__items {
  display: flex;
  flex-direction: column;
  gap: 18px 5px;
  margin: 0;
  justify-content: flex-start;
}

#chat-bar {
  position: relative;
  margin-top: 10px;
  background-color: #fff;
  flex: 0 0 auto;
  box-sizing: border-box;
}

::slotted(ux-chat-item[source=user]) {
  margin-bottom: 0;
  align-self: flex-end;
}