/* 聊天列表 - 左滑删除（补丁层样式） */

.session-list-scroll,
.session-list-view,
.session-items,
.chat-session-list {
  overflow-x: hidden !important;
}

.session-item.zk-swipe-item {
  position: relative !important;
  overflow: visible !important;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  will-change: transform;
  z-index: 1;
}

.session-item.zk-swipe-item.zk-dragging {
  transition: none !important;
}

.session-item.zk-swipe-item.zk-open {
  z-index: 3;
}

.zk-del-btn {
  position: absolute;
  top: 0;
  right: -88px;
  width: 88px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(180deg, #ff5b5b 0%, #ef2b2b 100%);
  border-radius: 0 14px 14px 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: filter 0.15s ease;
}

.zk-del-btn:active {
  filter: brightness(0.92);
}

.zk-del-btn svg {
  width: 26px;
  height: 26px;
  display: block;
  pointer-events: none;
}

.session-item.zk-deleting {
  pointer-events: none;
}

.zk-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(23, 30, 42, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

.zk-toast.zk-toast--in {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 手机上按钮更贴卡片：右侧内缩更自然 */
@media (max-width: 640px) {
  .zk-del-btn {
    border-radius: 0 14px 14px 0;
  }
}

/* 桌面端（鼠标）：列表项悬停右侧出现删除按钮，不用拖 */
.zk-hover-del {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #fff1f0;
  color: #ef2b2b;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(0.9);
  transition: opacity 0.16s ease, transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
  z-index: 6;
}

.zk-hover-del svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

@media (min-width: 641px) {
  .session-item.zk-swipe-item .zk-hover-del {
    display: flex;
  }
  .session-item.zk-swipe-item:hover .zk-hover-del {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  .zk-hover-del:hover {
    background: #ef2b2b;
    color: #ffffff;
  }
}

/* ---------- 自绘确认弹层（不依赖浏览器原生 confirm） ---------- */
.zk-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  z-index: 2147483000;
  opacity: 0;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.zk-mask.zk-mask--in { opacity: 1; }

.zk-dialog {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.2s cubic-bezier(.25,.8,.25,1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.zk-mask--in .zk-dialog { transform: scale(1); }

.zk-dialog-title {
  padding: 22px 20px 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.45;
  word-break: break-all;
}

.zk-dialog-desc {
  padding: 0 20px 20px;
  font-size: 13px;
  color: #8a8a8a;
  text-align: center;
  line-height: 1.5;
}

.zk-dialog-desc:empty { display: none; }

.zk-dialog-actions {
  display: flex;
  border-top: 1px solid #eee;
}

.zk-dialog-btn {
  flex: 1;
  height: 50px;
  border: none;
  background: transparent;
  font-size: 16px;
  line-height: 50px;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.zk-dialog-cancel {
  color: #666;
  border-right: 1px solid #eee;
}

.zk-dialog-ok {
  color: #ef2b2b;
  font-weight: 600;
}

.zk-dialog-btn:active { background: #f6f6f6; }
