#chat-list .chat-thread-time {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#chat-list .chat-personal-thread .chat-shift-avatar {
  border-radius: 50%;
  background: linear-gradient(145deg, #43886f, #215a47);
  color: #fff;
}

#chat-list .chat-personal-thread .chat-avatar-off {
  background: linear-gradient(145deg, #6a8e7c, #3e6657);
}

#chat-list .chat-personal-thread .chat-avatar-day-off .chat-avatar-hours {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .03em;
  text-align: center;
}

.chat-message-tail > .chat-message::before {
  position: absolute;
  inset-inline-start: -6px;
  inset-block-end: 0;
  inline-size: 10px;
  block-size: 9px;
  background: var(--chat-bubble-fill);
  clip-path: polygon(65% 0, 100% 0, 100% 100%, 0 100%, 40% 68%);
  content: '';
  pointer-events: none;
}

.chat-message-tail > .chat-message.mine::before {
  inset-inline-start: auto;
  inset-inline-end: -6px;
  transform: scaleX(-1);
}

@media (min-width: 800px) {
  #chat-conversation.chat-direct-conversation #chat-room-title {
    display: grid;
    justify-items: start;
    inline-size: 100%;
    gap: 2px;
  }

  .chat-personal-name,
  .chat-last-visit {
    display: block;
    max-inline-size: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
  }

  button.chat-personal-name {
    border: 0;
    border-radius: 4px;
    padding: 0;
    background: transparent;
    color: #214f43;
    font-weight: 700;
    text-align: start;
  }

  button.chat-personal-name:is(:hover, :focus-visible) {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .chat-last-visit {
    color: #586e64;
    font-size: 11px;
    font-weight: 400;
  }

  #chat-conversation.chat-direct-conversation #chat-messages {
    padding-inline: 18px;
  }

  .chat-direct-conversation .chat-day-marker {
    align-self: center;
    flex: none;
    margin-block: 5px 3px;
    padding: 4px 11px;
    border-radius: 14px;
    background: rgb(243 250 245 / 62%);
    color: #355a4e;
    font-size: 12px;
    line-height: 1.2;
  }

  .chat-direct-conversation .chat-message-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #chat-conversation.chat-direct-conversation .chat-message-row > .chat-message {
    grid-column: 1;
    justify-self: start;
    max-inline-size: min(83%, 33rem);
    border-radius: 13px 13px 13px 6px;
  }

  #chat-conversation.chat-direct-conversation .chat-message-row > .chat-message.mine {
    justify-self: end;
    border-radius: 13px 13px 6px 13px;
  }

  .chat-direct-conversation .chat-bubble-meta {
    margin-inline-start: auto;
  }
}
