.navds-chat {
  display: flex;
  align-items: flex-end;
  gap: var(--a-spacing-3);
  max-width: 40.75rem;
}

.navds-chat--right {
  flex-direction: row-reverse;
}

.navds-chat__bubble-wrapper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--a-spacing-3);
}

.navds-chat--right .navds-chat__bubble-wrapper {
  align-items: flex-end;
}

.navds-chat__avatar {
  align-items: center;
  box-shadow: var(--a-shadow-xsmall);
  background-color: var(--ac-chat-avatar-bg, var(--a-surface-neutral-subtle));
  border-radius: var(--a-border-radius-full);
  color: var(--ac-chat-avatar-color, var(--a-text-default));
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  overflow: hidden;
  height: 2.5rem;
  width: 2.5rem;
  line-height: 2.5rem; /* Makes text properly vertically centered in Chrome */
  font-size: 1.06rem;
  letter-spacing: 0.024rem;
}

.navds-chat__avatar svg {
  align-self: center;
  width: 100%;
  max-width: 1.5rem;
  max-height: 1.5rem;
}

.navds-chat__bubble {
  padding: var(--a-spacing-4);
  box-shadow: var(--a-shadow-xsmall);
  width: fit-content;
  background-color: var(--ac-chat-bubble-bg, var(--a-surface-neutral-subtle));
  border-radius: var(--a-border-radius-xlarge);
  border-bottom-left-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: var(--a-spacing-2);
}

.navds-chat--right .navds-chat__bubble {
  border-radius: var(--a-border-radius-xlarge);
  border-bottom-right-radius: 2px;
}

.navds-chat--small .navds-chat__bubble {
  padding: var(--a-spacing-3);
}

.navds-chat--info .navds-chat__bubble,
.navds-chat--info .navds-chat__avatar {
  background-color: var(--a-surface-info-subtle);
}

.navds-chat--subtle .navds-chat__bubble,
.navds-chat--subtle .navds-chat__avatar {
  background-color: var(--a-surface-default);
}

.navds-chat__top-text {
  color: var(--ac-chat-top-text, var(--a-text-default));
  display: flex;
  gap: var(--a-spacing-2);
  align-items: baseline;
  font-weight: normal;
  margin: 0;
}

.navds-chat--right .navds-chat__top-text {
  align-self: flex-end;
}

.navds-chat--top-text-left .navds-chat__top-text {
  align-self: flex-start;
}

.navds-chat--top-text-right .navds-chat__top-text {
  align-self: flex-end;
}

.navds-chat--left .navds-chat__top-text--right {
  align-self: flex-end;
}

.navds-chat--right .navds-chat__top-text--left {
  align-self: flex-start;
}

@media (forced-colors: active) {
  .navds-chat__bubble,
  .navds-chat__avatar {
    border: 1px solid canvastext;
    background-color: canvas;
    color: canvastext;
  }

  .navds-chat__avatar svg {
    forced-color-adjust: none;
  }
}
