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

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

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

  & .navds-chat__bubble {
    border-radius: var(--ax-border-radius-xlarge);
    border-bottom-right-radius: var(--ax-border-radius-small);
  }
}

/* ------------------------------- Chat avatar ------------------------------ */
.navds-chat__avatar {
  align-items: center;
  background-color: var(--ax-bg-raised);
  border-radius: var(--ax-border-radius-full);
  border: 1px solid var(--ax-border-subtleA);
  color: var(--ax-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;

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

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

.navds-chat__bubble {
  padding: var(--ax-spacing-4) var(--ax-spacing-5);
  width: fit-content;
  background-color: var(--ax-bg-raised);
  display: flex;
  flex-direction: column;
  gap: var(--ax-spacing-2);
  border-radius: var(--ax-border-radius-xlarge);
  border-bottom-left-radius: var(--ax-border-radius-small);
  border: 1px solid var(--ax-border-subtleA);
}

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

/* -------------------------- Chat bubble variants -------------------------- */
.navds-chat--info {
  & .navds-chat__bubble,
  & .navds-chat__avatar {
    background-color: var(--ax-bg-info-raised);
  }
}

.navds-chat--neutral {
  & .navds-chat__bubble,
  & .navds-chat__avatar {
    background-color: var(--ax-bg-neutral-raised);
  }
}

/* ------------------------------ Chat top text ----------------------------- */
.navds-chat__top-text {
  color: var(--ax-text-default);
  display: flex;
  gap: var(--ax-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;
}
