/* Typography hierarchy for chat, contacts, and message detail. */

/* Chat list: primary name, secondary preview, tertiary timestamp. */
body.pages-chat-index uni-page[data-page="pages/chat/index"] .conversation-head {
  align-items: center !important;
  min-width: 0 !important;
  margin-bottom: 2px !important;
}

body.pages-chat-index uni-page[data-page="pages/chat/index"] .conversation-name-row {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.pages-chat-index uni-page[data-page="pages/chat/index"] .conversation-name {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--ww-text, #172033) !important;
  font-size: var(--ww-fs-title, 16px) !important;
  font-weight: 650 !important;
  line-height: 22px !important;
}

body.pages-chat-index uni-page[data-page="pages/chat/index"] .conversation-time {
  flex: 0 0 auto !important;
  margin-left: 12px !important;
  color: var(--ww-text-3, #94a3b8) !important;
  font-size: calc(var(--ww-fs-meta, 12px) - 1px) !important;
  font-weight: 400 !important;
  line-height: 16px !important;
  white-space: nowrap !important;
}

body.pages-chat-index uni-page[data-page="pages/chat/index"] .uni-media-list-body {
  min-width: 0 !important;
  padding-left: 12px !important;
}

body.pages-chat-index uni-page[data-page="pages/chat/index"] .uni-media-list-text-bottom {
  min-width: 0 !important;
  margin-top: 3px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--ww-text-2, #64748b) !important;
  font-size: calc(var(--ww-fs-body, 14px) - 1px) !important;
  font-weight: 400 !important;
  line-height: 19px !important;
}

/* Contacts: shortcut labels, names, groups, and right-side index. */
body.pages-friend-index uni-page[data-page="pages/friend/index"] .contact-shortcut .uni-list-cell-navigate {
  color: var(--ww-text, #172033) !important;
  font-size: var(--ww-fs-title, 16px) !important;
  font-weight: 650 !important;
  line-height: 22px !important;
}

body.pages-friend-index uni-page[data-page="pages/friend/index"] .contact-shortcut-note {
  margin-top: 2px !important;
  color: var(--ww-text-muted, #7b879a) !important;
  font-size: var(--ww-fs-meta, 12px) !important;
  font-weight: 400 !important;
  line-height: 18px !important;
}

body.pages-friend-index uni-page[data-page="pages/friend/index"] .contact-name {
  color: var(--ww-text, #20252d) !important;
  font-size: calc(var(--ww-fs-title, 16px) - 1px) !important;
  font-weight: 600 !important;
  line-height: 22px !important;
}

body.pages-friend-index uni-page[data-page="pages/friend/index"] .uni-list-cell-divider {
  min-height: 28px !important;
  padding: 5px 20px !important;
  box-sizing: border-box !important;
  color: var(--ww-text-muted, #738096) !important;
  font-size: var(--ww-fs-meta, 12px) !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  letter-spacing: .08em !important;
}

body.pages-friend-index uni-page[data-page="pages/friend/index"] .uni-indexed-list-text {
  color: var(--ww-text-muted, #718096) !important;
  font-size: calc(var(--ww-fs-meta, 12px) - 1.5px) !important;
  font-weight: 650 !important;
  line-height: 16px !important;
}

/* Message header: two calm, readable lines without changing presence logic. */
body.pages-chat-message uni-page[data-page="pages/chat/message"] .chat-presence.contact-meta {
  width: min(360px, calc(100vw - 112px)) !important;
  max-width: calc(100vw - 112px) !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 5px 8px !important;
  grid-template-columns: minmax(0, max-content) max-content !important;
  grid-template-rows: 21px 18px !important;
  align-content: center !important;
  justify-content: center !important;
  row-gap: 1px !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 0 var(--ww-line, #edf0f4) !important;
}

body.pages-chat-message uni-page[data-page="pages/chat/message"] .contact-name-red {
  grid-area: 1 / 1 !important;
  place-self: center end !important;
  max-width: min(250px, 64vw) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--ww-text, #172033) !important;
  font-size: var(--ww-fs-title, 16px) !important;
  font-weight: 650 !important;
  line-height: 21px !important;
}

body.pages-chat-message uni-page[data-page="pages/chat/message"] .presence-copy {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  justify-self: center !important;
  max-width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--ww-text-muted, #68778c) !important;
  font-size: var(--ww-fs-meta, 12px) !important;
  font-weight: 500 !important;
  line-height: 18px !important;
  letter-spacing: .1px !important;
}

body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list {
  top: 6px !important;
}

/* Message metadata and special cards keep a visible secondary/tertiary scale. */
body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .system .text,
body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .system uni-view {
  color: var(--ww-text-3, #94a3b8) !important;
  font-size: calc(var(--ww-fs-meta, 12px) - .5px) !important;
  line-height: 18px !important;
}

body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .bubble-time {
  height: 13px !important;
  font-size: calc(var(--ww-fs-meta, 12px) - 1.5px) !important;
  line-height: 13px !important;
}

body.pages-chat-message uni-page[data-page="pages/chat/message"] .contact-share-name {
  font-size: var(--ww-fs-title, 16px) !important;
  font-weight: 650 !important;
  line-height: 21px !important;
}

body.pages-chat-message uni-page[data-page="pages/chat/message"] .contact-share-id {
  font-size: var(--ww-fs-meta, 12px) !important;
  line-height: 17px !important;
}

body.pages-chat-message uni-page[data-page="pages/chat/message"] .transfer-message-status {
  font-size: var(--ww-fs-meta, 12px) !important;
  line-height: 18px !important;
}
