:root {
  --wk-conversation-footer: 120px;
  --wk-height-conversation-replyview: 50px;
}

.wk-conversation {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.wk-conversation-hasreply {
}

.wk-conversation-content {
  width: 100%;
  flex: 1;
  min-height: 0; /* 必须，让 flex 子元素可以收缩 */
  position: relative;
  transition: opacity 150ms ease-out;
}

body[theme-mode="dark"] .wk-conversation-content {
  background-color: var(--wk-color-secondary-2);
}

.wk-conversation-hasreply .wk-conversation-content {
  /* flex 布局下不需要 calc，由 flex: 1 自动计算 */
}

.wk-conversation-messages {
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.wk-message-item {
  width: 100%;
  display: flex;
  position: relative;
}

.wk-message-item:has(.wk-message-system),
.wk-message-item-system {
  justify-content: center;
  padding: var(--wk-sp-2) var(--wk-sp-4);
}

.wk-message-item-fold-session {
  justify-content: flex-start;
  padding: 24px 0 0;
}

.wk-message-item-fold-session-shell {
  width: 100%;
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-left: 15px;
}

.wk-message-item-fold-session-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  overflow: visible;
}

.wk-message-item-fold-session-avatar > * {
  display: block;
}

.wk-message-item-fold-session-avatar-icon {
  width: 32px;
  height: 32px;
  max-width: none;
}

.wk-message-item-fold-session-content {
  width: 100%;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 折叠会话标题行:参与者名字 + AI协作标签 + 时间 + 收起/展开 */
.wk-fold-session-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  max-width: min(680px, calc(100vw - 120px)); /* 和卡片宽度一致 */
}

/* 名字和Tag的容器 */
.wk-fold-session-participants {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 收起/展开按钮 (对齐卡片右边缘) */
.wk-fold-session-toggle-btn {
  margin-left: auto;
  margin-right: 0; /* 对齐卡片边缘,不是内容区边缘 */
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: rgba(127, 59, 245, 1);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  padding-right: 0; /* 确保和卡片右边缘对齐 */
  transition: opacity var(--wk-dur-fast) var(--wk-ease);
}

.wk-fold-session-toggle-btn:hover {
  opacity: 0.8;
}

.wk-fold-session-participant-name {
  font-size: 14px;
  font-weight: 600 !important;
  color: #000000;
}

/* AI 名称样式 (和普通名字一样,不需要特殊样式) */
.wk-fold-session-participant-name-ai {
  /* 继承 .wk-fold-session-participant-name 的样式 */
}

/* 折叠提示容器 */
.wk-fold-session-participants-collapsed {
  position: relative;
  display: inline-block;
}

/* Tooltip */
.wk-fold-session-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: rgba(28, 28, 35, 0.9);
  color: #ffffff;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  transition-delay: 0s;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wk-fold-session-participants-collapsed:hover .wk-fold-session-tooltip {
  opacity: 1;
  transition-delay: 0.3s;
}

.wk-fold-session-tooltip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.wk-fold-session-tooltip-item + .wk-fold-session-tooltip-item {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wk-fold-session-tooltip-avatar {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.wk-fold-session-tooltip-name {
  font-size: 14px;
  font-weight: 500;
}

.wk-fold-session-tag {
  font-size: 11px;
  font-weight: 500;
  color: #ffffff;
  background: linear-gradient(90deg, #7b89f4 0%, #9d78f5 100%);
  border: none;
  padding: 0 6px;
  border-radius: 4px;
  height: 18px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 标题行时间 */
.wk-fold-session-time {
  font-size: 14px;
  font-weight: 400;
  color: rgba(28, 28, 35, 0.4);
  white-space: nowrap;
}

/* 标题行外层的 toggle 已移到卡片右上角,这些样式已废弃 */

.wk-message-item-fold-session-card {
  width: 100%;
  flex: 1;
  min-width: 0;
}

/* ── 折叠卡片展开区：紧凑列表样式 ── */
.wk-fold-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 0;
}

.wk-fold-msg-check-open {
  cursor: pointer;
  margin: 0 calc(var(--wk-sp-2) * -1);
  padding-left: var(--wk-sp-2);
  padding-right: var(--wk-sp-2);
  border-radius: var(--wk-r-sm);
  transition: background-color var(--wk-dur-fast) var(--wk-ease);
}

.wk-fold-msg-check-open:hover {
  background: color-mix(in srgb, var(--wk-brand-primary) 4%, transparent);
}

.wk-fold-msg-selected {
  background: color-mix(in srgb, var(--wk-brand-primary) 4%, transparent);
}

.wk-fold-msg-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-height: 22px;
  padding-top: 2px;
}

.wk-fold-msg-checkbox {
  gap: 0;
}

.wk-fold-msg-checkbox .wk-checkbox__box {
  border-radius: 50%;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--wk-text-primary) 15%, transparent);
  background: transparent;
}

.wk-fold-msg-checkbox:hover .wk-checkbox__box {
  border-color: color-mix(in srgb, var(--wk-brand-primary) 40%, transparent);
}

.wk-fold-msg-checkbox.wk-checkbox--checked .wk-checkbox__box {
  background: var(--wk-brand-primary);
  border-color: var(--wk-brand-primary);
}

.wk-fold-msg-checkbox .wk-checkbox__check {
  width: 10px;
  height: 10px;
}

.wk-fold-msg + .wk-fold-msg {
  margin-top: 12px;
}

/* 讨论列表里不显示头像,只显示姓名 Tag */
.wk-fold-msg-ava {
  display: none;
}

.wk-fold-msg-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wk-fold-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 姓名 Tag: 白底黑字, 20px高, 8px padding */
.wk-fold-msg-name {
  font-size: 12px;
  font-weight: 700;
  color: rgba(28, 28, 35, 1);
  background: rgba(255, 255, 255, 1);
  border-radius: 3px;
  padding: 2px 8px;
  height: 20px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
}

.wk-fold-msg-time {
  font-size: 12px;
  font-weight: 400;
  color: rgba(28, 28, 35, 0.4);
}

.wk-fold-msg-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(28, 28, 35, 0.8);
  line-height: 1.6;
}

.wk-fold-session-summary-loading {
  display: inline-flex;
  align-items: center;
  min-height: var(--wk-sp-4);
}

/* 折叠内·文件卡片 */
.wk-fold-file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--wk-bg-elevated);
  border: 1px solid var(--wk-border-subtle);
  border-radius: var(--wk-r-md, 10px);
  padding: 8px 12px;
  margin-top: 4px;
  max-width: 360px;
  cursor: pointer;
  transition: background 200ms;
}

.wk-fold-file:hover {
  background: var(--wk-bg-hover);
}

.wk-fold-file-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--wk-r-sm, 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--wk-text-inverse);
}

.wk-fold-file-info {
  flex: 1;
  min-width: 0;
}

.wk-fold-file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--wk-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-fold-file-size {
  font-size: 11px;
  color: var(--wk-text-tertiary);
}

.wk-fold-file-dl {
  width: 28px;
  height: 28px;
  border-radius: var(--wk-r-sm, 6px);
  border: 1px solid var(--wk-border-subtle);
  background: var(--wk-bg-base);
  color: var(--wk-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 200ms;
}

.wk-fold-file-dl:hover {
  border-color: var(--wk-brand-primary);
  color: var(--wk-brand-primary);
  background: var(
    --wk-brand-primary-subtle,
    color-mix(in srgb, var(--wk-brand-primary) 4%, transparent)
  );
}

/* 折叠内·图片 */
.wk-fold-img {
  margin-top: 4px;
  max-width: 240px;
  border-radius: var(--wk-r-md, 10px);
  overflow: hidden;
  border: 1px solid var(--wk-border-subtle);
  cursor: pointer;
  transition: box-shadow 200ms;
}

.wk-fold-img:hover {
  box-shadow: var(--wk-shadow-md);
}

.wk-fold-img img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 180px;
}

.wk-message-item-last {
  margin-bottom: 15px;
}

.wk-conversation-dragover .wk-message-item {
  pointer-events: none;
}

.wk-conversation-footer {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.wk-conversation-footer-content {
  width: 100%;
  height: 100%;
}

.wk-conversation-chattoolbars {
  height: 100%;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
}

.wk-conversation-chattoolbars-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.wk-conversation-content-fileupload-mask {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0px;
  top: 0px;
  padding: 15px;
}

.wk-conversation-content-fileupload-mask-content {
  width: 100%;
  height: 100%;
  border: 1px dashed var(--wk-border-default);
  border-radius: 4px;
  background-color: var(--wk-bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  padding: 20px;
}

.wk-replyview {
  width: 100%;
  height: 100%;
  display: flex;
}

.wk-replyview-content {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-left: 15px;
  overflow: hidden;
  color: var(--wk-color-font-tip);
}

.wk-replyview-content-msg {
  display: inline-block;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-replyview-content-first {
  width: 100%;
  margin-top: 2px;
}

.wk-replyview-content-second {
  margin-top: 2px;
}

.wk-replyview-content-userinfo {
  display: flex;
}

.wk-replyview-content-userinfo-name {
  display: flex;
  align-items: center;
  margin-left: 5px;
}

.wk-conversation-topview {
  transform: translate3d(0, 100%, 0);
  transition: transform var(--wk-layer-transition);
  background-color: var(--input-bg);
}

.wk-conversation-hasreply .wk-conversation-topview {
  /* 引用已移到 MessageInput 内部，这里隐藏 */
  display: none;
}

.wk-conversation-topview {
  display: none;
}

/* 新版引用样式 */
.wk-replyview-new {
  display: flex;
  align-items: center;
  background-color: #f6f6f6;
  padding: 6px 12px;
  border-radius: 4px;
  width: 100%;
  border: 1px solid #e5e5e5;
  box-sizing: border-box;
}

.wk-replyview-new-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background-color: #b0b0b0;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s;
}

.wk-replyview-new-close:hover {
  background-color: #888;
}

.wk-replyview-new-close svg {
  width: 8px;
  height: 8px;
}

.wk-replyview-new-divider {
  flex-shrink: 0;
  width: 1px;
  height: 12px;
  background-color: #d1d5db;
  margin: 0 8px;
}

.wk-replyview-new-content {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.wk-replyview-new-label {
  flex-shrink: 0;
  margin-right: 4px;
}

.wk-replyview-new-name {
  flex-shrink: 0;
  font-weight: 500;
  margin-right: 4px;
}

.wk-replyview-new-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #555;
}

.wk-conversation-hasreply .wk-messageinput-box {
  box-shadow: none;
}

.wk-replyview-close {
  height: 100%;
  padding: 0px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-right: var(--wk-line);
  cursor: pointer;
}

/* ── 多选操作栏容器（slide-up 动画） ── */
/* ── 多选操作栏：悬浮 pill 定位容器 ──
 * absolute 定位，浮在消息区底部 + 输入框上方，居中
 * 不参与 flex 布局，不占高度
 */
.wk-conversation-multiplepanel {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wk-conversation-multiplepanel-show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ── 悬浮 pill 主体 ──
 * Figma 387:63357: 白底，r=1000，pad T4 B4 L16 R16，gap=12，带阴影
 */
.wk-multiplepanel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px;
  background: #ffffff;
  border-radius: 1000px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

/* 纯文字小 pill 按钮
 * Figma: r=100, bg=rgba(28,28,35,0.05), pad T6 B6 L16 R16
 * 字号14px font-weight 500，颜色 #1C1C23，高32px
 */
/* 纯文字小 pill 按钮：默认透明，hover 出现背景 */
.wk-multiplepanel-btn {
  height: 32px;
  padding: 6px 16px;
  border-radius: 100px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #1c1c23;
  white-space: nowrap;
  transition: background 0.15s;
  line-height: 1;
  display: flex;
  align-items: center;
}

.wk-multiplepanel-btn:hover {
  background: rgba(28, 28, 35, 0.08);
}

/* 删除按钮：危险色 */
.wk-multiplepanel-btn--danger {
  color: #ff563b;
}

.wk-multiplepanel-btn--danger:hover {
  background: rgba(255, 86, 59, 0.08);
}

/* 添加到事项按钮 */
.wk-multiplepanel-btn--matter {
  color: var(--wk-text-primary, #1c1c23);
}

.wk-multiplepanel-btn--matter.is-active {
  background: var(--wk-bg-hover, rgba(28, 28, 35, 0.08));
}

.wk-multiplepanel-btn--matter:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wk-multiplepanel-btn--matter:disabled:hover {
  background: transparent;
}

/* 竖线分隔符 */
.wk-multiplepanel-sep {
  width: 1px;
  height: 20px;
  background: rgba(28, 28, 35, 0.15);
  flex-shrink: 0;
}

/* 关闭（×）按钮 */
.wk-multiplepanel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 100px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(28, 28, 35, 0.4);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}

.wk-multiplepanel-close:hover {
  background: rgba(28, 28, 35, 0.08);
  color: #1c1c23;
}

.wk-conversationpositionview {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  z-index: 100;
}

.wk-conversationpositionview ul {
  margin-bottom: 0px;
}

.wk-conversationpositionview-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--card-bg);

  box-shadow: var(--wk-shadow-sm);
  color: var(--wk-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: scale(0.5, 0.5);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
  opacity: 0;
}

.wk-conversationpositionview-item img {
  width: 20px;
  height: 20px;
}

body[theme-mode="dark"] .wk-conversationpositionview-item {
  background-color: var(--wk-color-secondary);
  box-shadow: var(--wk-shadow-sm);
}

.wk-conversationpositionview-item.wk-reveale {
  transform: scale(1, 1);
  opacity: 1;
  pointer-events: all;
}

.wk-conversationpositionview-item i {
  font-size: 1.75rem;
}

.icon-arrow-down::before {
  content: "";
}

.wk-conversationpositionview-item .wk-conversation-unread-count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  font-weight: 500;
  text-align: center;
  position: absolute;
  top: -0.3rem;
  right: -0.3rem;
  background: var(--wk-color-danger);
  color: var(--wk-text-inverse);
  pointer-events: none;
}

.wk-conversationpositionview ul li {
  margin-top: 20px;
}

.wk-message-item-reminder {
  animation: wk-message-item-reminder-move 2s ease-out forwards;
  -webkit-animation: wk-message-item-reminder-move 2s ease-out forwards;
  border-radius: 8px;
}

@keyframes wk-message-item-reminder-move {
  0% {
    background-color: rgba(127, 59, 245, 0.1);
  }
  60% {
    background-color: rgba(127, 59, 245, 0.06);
  }
  100% {
    background-color: transparent;
  }
}

@-webkit-keyframes wk-message-item-reminder-move {
  0% {
    background-color: rgba(127, 59, 245, 0.1);
  }
  60% {
    background-color: rgba(127, 59, 245, 0.06);
  }
  100% {
    background-color: transparent;
  }
}

/* 删除确认弹窗 — 清除 Semi body 默认 padding，内容自己控制间距 */
.wk-delete-confirm-modal .semi-modal-body {
  padding: 0 !important;
}
.wk-delete-confirm-modal .semi-modal-body-wrapper {
  margin: 0 !important;
}
.wk-delete-confirm-modal .semi-modal-content {
  padding: 0 !important;
}
