/* 聊天页按微信桌面版：灰列表、白底、绿色气泡。选中是灰色，没有色条和胶囊。 */

html { -webkit-tap-highlight-color: transparent; }

button,
a,
.wk-conversationlist-item-content,
.wk-main-sider-item,
.wk-contextmenus li,
.wk-messageinput-toolbar-item {
  touch-action: manipulation;
}

.wk-conversationlist-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 68px;
}

.wk-conversationlist-item-content,
.wk-main-sider-item,
.wk-contextmenus li,
.wk-message-base-bubble,
.wk-contacts-section-item {
  transition: background-color 60ms linear !important;
}
.wk-conversationlist-item-content:active,
.wk-main-sider-item:active,
.wk-contextmenus li:active,
.wk-contacts-section-item:active {
  transition: none !important;
}

.wk-conversationlist-item img,
.senderAvatar img,
.wk-contacts-section-item-avatar img {
  border-radius: 4px !important;
}

/* —— 左侧图标栏，白天黑夜都是深灰 —— */
.wk-main-sider,
.kefu-login-rail {
  background: #2e2e2e !important;
  border-right: 0 !important;
}
body[theme-mode="dark"] .wk-main-sider,
body[theme-mode="dark"] .kefu-login-rail {
  background: #191919 !important;
}
.wk-main-sider-item,
.kefu-rail-item {
  border-radius: 4px !important;
  color: #fff !important;
}
.wk-main-sider-item:hover,
.wk-main-sider-item.selected,
.wk-main-sider-item.wk-main-sider-item-selected,
.kefu-rail-item:hover,
.kefu-rail-item.is-on {
  background: #3a3a3a !important;
  color: #fff !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-main-sider-item:hover,
body[theme-mode="dark"] .wk-main-sider-item.selected,
body[theme-mode="dark"] .wk-main-sider-item.wk-main-sider-item-selected,
body[theme-mode="dark"] .kefu-rail-item:hover,
body[theme-mode="dark"] .kefu-rail-item.is-on {
  background: #2a2a2a !important;
  color: #fff !important;
}

/* —— 白天 —— */
body:not([theme-mode="dark"]) {
  color-scheme: light;
  background: #f5f5f5;
  color: #191919;
}
body:not([theme-mode="dark"]) .wk-main,
body:not([theme-mode="dark"]) .wk-chat,
body:not([theme-mode="dark"]) .wk-chat-content-chat,
body:not([theme-mode="dark"]) .wk-conversation,
body:not([theme-mode="dark"]) .wk-conversation-content,
body:not([theme-mode="dark"]) .wk-conversation-messages,
body:not([theme-mode="dark"]) .wk-chat-empty,
body:not([theme-mode="dark"]) .wk-conversation-footer {
  background: #f5f5f5 !important;
  color: #191919 !important;
}
body:not([theme-mode="dark"]) .wk-chat-content-left,
body:not([theme-mode="dark"]) .wk-conversationlist,
body:not([theme-mode="dark"]) .wk-chat-title,
body:not([theme-mode="dark"]) .wk-chat-search {
  background: #ebebeb !important;
  color: #191919 !important;
  border-color: #d6d6d6 !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-chat-conversation-header {
  background: #f5f5f5 !important;
  color: #191919 !important;
  border-bottom: 1px solid #e2e2e2 !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-chat-title,
body:not([theme-mode="dark"]) .wk-chat-conversation-header-channel-info-name,
body:not([theme-mode="dark"]) .wk-conversationlist-item-name,
body:not([theme-mode="dark"]) .wk-conversationlist-item-name h3 {
  color: #191919 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}
body:not([theme-mode="dark"]) .wk-conversationlist-item-lastmsg,
body:not([theme-mode="dark"]) .wk-conversationlist-item-time,
body:not([theme-mode="dark"]) .wk-chat-conversation-header-channel-info-tip {
  color: #707070 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
body:not([theme-mode="dark"]) .wk-conversationlist-item,
body:not([theme-mode="dark"]) .wk-conversationlist-item-content,
body:not([theme-mode="dark"]) .wk-conversationlist-item-top {
  background: transparent !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-conversationlist-item-content::after {
  background: #d9d9d9 !important;
}
body:not([theme-mode="dark"]) .wk-conversationlist-item-content:hover {
  background: #d9d9d9 !important;
}
body:not([theme-mode="dark"]) .wk-conversationlist-item-selected,
body:not([theme-mode="dark"]) .wk-conversationlist-item-selected .wk-conversationlist-item-content {
  background: #c8c8c8 !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-search-box,
body:not([theme-mode="dark"]) .semi-input-wrapper,
body:not([theme-mode="dark"]) .wk-search-input .semi-input-wrapper {
  background: #e2e2e2 !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-search-input input,
body:not([theme-mode="dark"]) .semi-input {
  color: #191919 !important;
  background: transparent !important;
}

body:not([theme-mode="dark"]) .wk-messageinput-box {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-conversation-footer {
  border-top: 1px solid #e2e2e2 !important;
}
body:not([theme-mode="dark"]) .wk-messageinput-input,
body:not([theme-mode="dark"]) .wk-messageinput-input__input,
body:not([theme-mode="dark"]) .wk-messageinput-input__control,
body:not([theme-mode="dark"]) .mentions__input,
body:not([theme-mode="dark"]) .mentions__highlighter {
  color: #191919 !important;
  background: transparent !important;
  font-size: 14px !important;
}
body:not([theme-mode="dark"]) .wk-messageinput-input:empty:before {
  color: #999 !important;
}

body:not([theme-mode="dark"]) .wk-message-base-bubble-box.recv .wk-message-base-bubble {
  background: #fff !important;
  color: #191919 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-message-base-bubble-box.recv .svgAppendix .corner { fill: #fff !important; }
body:not([theme-mode="dark"]) .wk-message-base-bubble-box.send .wk-message-base-bubble {
  background: #95ec69 !important;
  color: #191919 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-message-base-bubble-box.send .svgAppendix .corner { fill: #95ec69 !important; }
body:not([theme-mode="dark"]) .wk-message-base-bubble .wk-message-text-content,
body:not([theme-mode="dark"]) .wk-message-base-bubble .wk-message-text-richtext,
body:not([theme-mode="dark"]) .wk-message-base-bubble .wk-message-text-commontext,
body:not([theme-mode="dark"]) .wk-message-base-bubble .wk-message-text-richmention,
body:not([theme-mode="dark"]) .wk-message-base-bubble .wk-message-text-send,
body:not([theme-mode="dark"]) .wk-message-base-bubble .wk-message-text-recv,
body:not([theme-mode="dark"]) .wk-message-base-bubble a,
body:not([theme-mode="dark"]) .wk-message-text-reply,
body:not([theme-mode="dark"]) .wk-message-text-reply.wk-message-text-reply-recv {
  color: #191919 !important;
}
body:not([theme-mode="dark"]) .senderName,
body:not([theme-mode="dark"]) .textTitle {
  color: #888 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

/* —— 夜间：微信深色，绿气泡配白字 —— */
body[theme-mode="dark"] {
  color-scheme: dark;
  background: #111 !important;
  color: #e8e8e8;
  -webkit-font-smoothing: antialiased;
}
body[theme-mode="dark"] #root,
body[theme-mode="dark"] .wk-main,
body[theme-mode="dark"] .wk-chat,
body[theme-mode="dark"] .wk-chat-content-chat,
body[theme-mode="dark"] .wk-conversation,
body[theme-mode="dark"] .wk-conversation-content,
body[theme-mode="dark"] .wk-conversation-messages,
body[theme-mode="dark"] .wk-chat-empty {
  background: #111 !important;
  color: #e8e8e8 !important;
}
body[theme-mode="dark"] .wk-chat-content-left,
body[theme-mode="dark"] .wk-conversationlist,
body[theme-mode="dark"] .wk-chat-title,
body[theme-mode="dark"] .wk-chat-search,
body[theme-mode="dark"] .wk-chat-conversation-header,
body[theme-mode="dark"] .wk-conversation-footer {
  background: #191919 !important;
  color: #e8e8e8 !important;
  border-color: #2a2a2a !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-chat-title,
body[theme-mode="dark"] .wk-chat-conversation-header-channel-info-name,
body[theme-mode="dark"] .wk-conversationlist-item-name,
body[theme-mode="dark"] .wk-conversationlist-item-name h3 {
  color: #e8e8e8 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-lastmsg,
body[theme-mode="dark"] .wk-conversationlist-item-time,
body[theme-mode="dark"] .wk-chat-conversation-header-channel-info-tip {
  color: #9a9a9a !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
body[theme-mode="dark"] .wk-conversationlist-item,
body[theme-mode="dark"] .wk-conversationlist-item-content,
body[theme-mode="dark"] .wk-conversationlist-item-top {
  background: transparent !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-content::after { background: #2a2a2a !important; }
body[theme-mode="dark"] .wk-conversationlist-item-content:hover { background: #252525 !important; }
body[theme-mode="dark"] .wk-conversationlist-item-selected,
body[theme-mode="dark"] .wk-conversationlist-item-selected .wk-conversationlist-item-content {
  background: #2e2e2e !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-search-box,
body[theme-mode="dark"] .semi-input-wrapper,
body[theme-mode="dark"] .wk-search-input .semi-input-wrapper {
  background: #2a2a2a !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-search-input input,
body[theme-mode="dark"] .semi-input,
body[theme-mode="dark"] .wk-messageinput-input,
body[theme-mode="dark"] .wk-messageinput-input__input,
body[theme-mode="dark"] .wk-messageinput-input__control,
body[theme-mode="dark"] .mentions__input,
body[theme-mode="dark"] .mentions__highlighter {
  color: #e8e8e8 !important;
  background: transparent !important;
}
body[theme-mode="dark"] .wk-messageinput-box {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-conversation-footer {
  border-top: 1px solid #2a2a2a !important;
}
body[theme-mode="dark"] .wk-messageinput-input:empty:before,
body[theme-mode="dark"] input::placeholder,
body[theme-mode="dark"] textarea::placeholder {
  color: #8a8a8a !important;
  opacity: 1 !important;
}

body[theme-mode="dark"] .wk-message-base-bubble-box.recv .wk-message-base-bubble {
  background: #2c2c2c !important;
  color: #fff !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-message-base-bubble-box.recv .svgAppendix .corner { fill: #2c2c2c !important; }
body[theme-mode="dark"] .wk-message-base-bubble-box.send .wk-message-base-bubble {
  background: #3eb575 !important;
  color: #fff !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-message-base-bubble-box.send .svgAppendix .corner { fill: #3eb575 !important; }
body[theme-mode="dark"] .wk-message-base-bubble .wk-message-text-content,
body[theme-mode="dark"] .wk-message-base-bubble .wk-message-text-richtext,
body[theme-mode="dark"] .wk-message-base-bubble .wk-message-text-commontext,
body[theme-mode="dark"] .wk-message-base-bubble .wk-message-text-richmention,
body[theme-mode="dark"] .wk-message-base-bubble .wk-message-text-send,
body[theme-mode="dark"] .wk-message-base-bubble .wk-message-text-recv,
body[theme-mode="dark"] .wk-message-base-bubble a,
body[theme-mode="dark"] .wk-message-text-reply,
body[theme-mode="dark"] .wk-message-text-reply.wk-message-text-reply-recv {
  color: #fff !important;
}
body[theme-mode="dark"] .wk-message-base-bubble-box.recv .wk-message-text-reply,
body[theme-mode="dark"] .wk-message-base-bubble-box.recv .wk-message-text-reply-recv {
  color: #d0d0d0 !important;
}
body[theme-mode="dark"] .senderName,
body[theme-mode="dark"] .textTitle {
  color: #b5b5b5 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

/* 平台官方号：星标 + 金色加粗 */
.kefu-official-name,
body:not([theme-mode="dark"]) .kefu-official-name.textTitle,
body:not([theme-mode="dark"]) .kefu-official-name.senderName,
body[theme-mode="dark"] .kefu-official-name.textTitle,
body[theme-mode="dark"] .kefu-official-name.senderName {
  font-weight: 700 !important;
  color: #c9a227 !important;
  letter-spacing: 0.02em;
  opacity: 1 !important;
}
body[theme-mode="dark"] .kefu-official-name,
body[theme-mode="dark"] .kefu-official-name.textTitle,
body[theme-mode="dark"] .kefu-official-name.senderName {
  color: #e8c36a !important;
}

/* 日期和系统提示：一行灰字，不要底色胶囊 */
.wk-message-time-line1,
.wk-message-time-line2,
.wk-message-split-line1,
.wk-message-split-line2 {
  display: none !important;
}
.wk-message-time-box,
.wk-message-split-box {
  display: block !important;
  width: 100% !important;
  padding: 8px 0 !important;
  text-align: center !important;
}
.wk-message-time,
.wk-message-split-content,
.wk-message-system {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  padding: 0 !important;
  width: fit-content !important;
  max-width: 80% !important;
  white-space: normal !important;
  text-align: center !important;
  opacity: 1 !important;
}
body:not([theme-mode="dark"]) .wk-message-time,
body:not([theme-mode="dark"]) .wk-message-split-content,
body:not([theme-mode="dark"]) .wk-message-system {
  color: #707070 !important;
  display: block !important;
  margin: 6px auto !important;
}
body[theme-mode="dark"] .wk-message-time,
body[theme-mode="dark"] .wk-message-split-content,
body[theme-mode="dark"] .wk-message-system {
  color: #b5b5b5 !important;
  display: block !important;
  margin: 6px auto !important;
}

.semi-badge-count,
.wk-conversationlist-item-reddot,
.wk-conversation-unread-count {
  background: #fa5151 !important;
  color: #fff !important;
  font-weight: 400 !important;
}

body:not([theme-mode="dark"]) .wk-contextmenus {
  background: #fff !important;
  color: #191919 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}
body:not([theme-mode="dark"]) .wk-contextmenus li:hover { background: #f2f2f2 !important; }
body[theme-mode="dark"] .wk-contextmenus {
  background: #2c2c2c !important;
  color: #e8e8e8 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}
body[theme-mode="dark"] .wk-contextmenus li { color: #e8e8e8 !important; }
body[theme-mode="dark"] .wk-contextmenus li:hover { background: #3a3a3a !important; }

body[theme-mode="dark"] .wk-chat-channelsetting,
body[theme-mode="dark"] .wk-subscribers,
body[theme-mode="dark"] .wk-userinfo,
body[theme-mode="dark"] .wk-userInfo,
body[theme-mode="dark"] .wk-route-header,
body[theme-mode="dark"] .wk-sider-setting-list {
  background: #191919 !important;
  color: #e8e8e8 !important;
  border-color: #2a2a2a !important;
}

/* —— 联系人，和会话列表同一套灰 —— */
body:not([theme-mode="dark"]) .wk-contacts,
body:not([theme-mode="dark"]) .wk-contacts-content,
body:not([theme-mode="dark"]) .wk-contacts-content-contacts,
body:not([theme-mode="dark"]) .wk-contacts-content-fnc,
body:not([theme-mode="dark"]) .wk-contacts-content-header,
body:not([theme-mode="dark"]) .wk-contacts-section,
body:not([theme-mode="dark"]) .wk-contacts-section-list,
body:not([theme-mode="dark"]) .wk-iconlistitem {
  background: #ebebeb !important;
  color: #191919 !important;
  border-color: #d6d6d6 !important;
}
body:not([theme-mode="dark"]) .wk-iconlistitem-content-title,
body:not([theme-mode="dark"]) .wk-contacts-section-item-name {
  color: #191919 !important;
  font-weight: 400 !important;
  font-size: 14px !important;
}
body:not([theme-mode="dark"]) .wk-contacts-section-item-index { color: #888 !important; font-weight: 400 !important; }
body:not([theme-mode="dark"]) .wk-contacts-section-item::after { background: #d9d9d9 !important; }
body:not([theme-mode="dark"]) .wk-contacts-section-item,
body:not([theme-mode="dark"]) .wk-iconlistitem { box-shadow: none !important; }
body:not([theme-mode="dark"]) .wk-contacts-section-item:hover,
body:not([theme-mode="dark"]) .wk-iconlistitem:hover { background: #d9d9d9 !important; }
body:not([theme-mode="dark"]) .wk-contacts-section-item-selected,
body:not([theme-mode="dark"]) .wk-contacts-section-item-selected .wk-contacts-section-item-name {
  background: #c8c8c8 !important;
  color: #191919 !important;
  box-shadow: none !important;
}
body:not([theme-mode="dark"]) .wk-contacts-content-header .wk-search-box,
body:not([theme-mode="dark"]) .wk-contacts .semi-input-wrapper {
  background: #e2e2e2 !important;
  border: 0 !important;
  border-radius: 4px !important;
}

body[theme-mode="dark"] .wk-contacts,
body[theme-mode="dark"] .wk-contacts-content,
body[theme-mode="dark"] .wk-contacts-content-contacts,
body[theme-mode="dark"] .wk-contacts-content-fnc,
body[theme-mode="dark"] .wk-contacts-content-header,
body[theme-mode="dark"] .wk-contacts-section,
body[theme-mode="dark"] .wk-contacts-section-list,
body[theme-mode="dark"] .wk-iconlistitem {
  background: #191919 !important;
  color: #e8e8e8 !important;
  border-color: #2a2a2a !important;
}
body[theme-mode="dark"] .wk-iconlistitem-content-title,
body[theme-mode="dark"] .wk-contacts-section-item,
body[theme-mode="dark"] .wk-contacts-section-item-name {
  color: #e8e8e8 !important;
  font-weight: 400 !important;
  background: transparent !important;
}
body[theme-mode="dark"] .wk-contacts-section-item-index { color: #9a9a9a !important; font-weight: 400 !important; }
body[theme-mode="dark"] .wk-contacts-section-item::after { background: #2a2a2a !important; }
body[theme-mode="dark"] .wk-contacts-section-item:hover,
body[theme-mode="dark"] .wk-iconlistitem:hover {
  background: #252525 !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-contacts-section-item-selected,
body[theme-mode="dark"] .wk-contacts-section-item-selected .wk-contacts-section-item-name {
  background: #2e2e2e !important;
  color: #fff !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-contacts-content-header .wk-search-box,
body[theme-mode="dark"] .wk-contacts .semi-input-wrapper {
  background: #2a2a2a !important;
  border: 0 !important;
  border-radius: 4px !important;
}

body:not([theme-mode="dark"]) .kefu-dlg,
body:not([theme-mode="dark"]) .kefu-gfold-menu,
body:not([theme-mode="dark"]) .kefu-conv-del-menu {
  background: #fff !important;
  color: #191919 !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 4px !important;
}
body[theme-mode="dark"] .kefu-dlg,
body[theme-mode="dark"] .kefu-gfold-menu,
body[theme-mode="dark"] .kefu-conv-del-menu {
  background: #2c2c2c !important;
  color: #e8e8e8 !important;
  border-color: #3a3a3a !important;
  border-radius: 4px !important;
}

/* 登录：白卡片，微信绿按钮 */
body:not([theme-mode="dark"]) .wk-login,
body:not([theme-mode="dark"]) .wk-login-backdrop {
  background: #ededed !important;
  color: #191919 !important;
  opacity: 1 !important;
}
body:not([theme-mode="dark"]) .wk-login-shell {
  background: #fff !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-login,
body[theme-mode="dark"] .wk-login-backdrop { background: #111 !important; }
body[theme-mode="dark"] .wk-login-shell {
  background: #1f1f1f !important;
  border: 1px solid #2a2a2a !important;
  box-shadow: none !important;
  border-radius: 4px !important;
}
body[theme-mode="dark"] .wk-login-content-form input {
  background: #2a2a2a !important;
  border-color: #3a3a3a !important;
  color: #e8e8e8 !important;
}
.wk-login-card-header h1 {
  color: #191919 !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
}
body[theme-mode="dark"] .wk-login-card-header h1 { color: #fff !important; }
.wk-login-footer-buttons button,
.wk-login-content-form-scanlogin { color: #576b95 !important; background: transparent !important; }
body[theme-mode="dark"] .wk-login-footer-buttons button,
body[theme-mode="dark"] .wk-login-content-form-scanlogin { color: #7d90b8 !important; }
.wk-login-content-form-ok,
.wk-login .semi-button-primary {
  background: #07c160 !important;
  border: 0 !important;
  border-radius: 4px !important;
  color: #fff !important;
}
body[theme-mode="dark"] .wk-login-content-form-ok,
body[theme-mode="dark"] .wk-login .semi-button-primary {
  background: #07c160 !important;
  color: #fff !important;
}
