/* #region zone:desk.style.chat-links — ลิงก์สั้นและรายการข่าวในฟองแชท */
/* A URL in a reply is a short link (the source domain); a news list is one compact item per story: the
   headline is the link, source · time and the gist sit muted underneath. Tokens only. */
.chat-link {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.chat-link:hover {
  text-decoration-thickness: 2px;
}
.chat-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.chat-news {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--sp-2);
  padding-left: var(--sp-3);
  border-left: 2px solid var(--line);
  white-space: normal;
}
.chat-news-title {
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}
.chat-news-title:hover {
  text-decoration: underline;
}
.chat-news-meta,
.chat-news-gist {
  color: var(--muted);
  font-size: var(--u-text-xs);
  line-height: 1.5;
}
.chat-news-gist {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* #endregion */

/* #region zone:desk.style.chat-image — ปุ่มแนบรูป พรีวิว และรูปในฟองผู้ใช้ */
.chat-attach-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: transparent;
  color: var(--muted);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.chat-attach-btn svg {
  width: 18px;
  height: 18px;
}
.chat-attach-btn:hover,
.chat-attach-btn.has-image {
  background: var(--hover);
  color: var(--accent-text);
}
.chat-attach-btn:focus-visible,
.chat-attach-remove:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chat-attach-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--panel2);
}
.chat-attach-preview[hidden] {
  display: none;
}
.chat-attach-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.chat-attach-note {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: var(--u-text-xs);
}
.chat-attach-remove {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--u-radius-pill);
  background: transparent;
  color: var(--muted);
}
.chat-attach-remove svg {
  width: 16px;
  height: 16px;
}
.chat-attach-remove:hover {
  background: var(--hover);
  color: var(--text);
}
/* Dropping a picture on the chat column. */
.chat-col.is-dragover {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
}
/* The member's own picture in their bubble: small, from the browser's copy only. */
.chat-msg-image {
  display: block;
  max-width: min(100%, 220px);
  max-height: 160px;
  margin-bottom: var(--sp-2);
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}
@media (pointer: coarse) {
  .chat-attach-btn {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 419px) {
  .chat-attach-btn {
    width: 40px;
  }
  .chat-attach-note {
    font-size: var(--u-text-xs);
  }
}
@media (prefers-reduced-motion: reduce) {
  .chat-attach-btn {
    transition: none;
  }
}
/* #endregion */
