/* kefu-video.css —— 发视频补丁 (kefu-video.js) 的样式
 *
 * kefu-video.js 自身没有 injectCss，全部依赖外部样式表。
 * 这份 CSS 缺失时的表现：预览对话框被 appendChild 到 body 末尾后又没有定位规则，
 * 退化成普通 block 堆在页面最底部 —— 直观感受就是「选完视频文件没反应」。
 * 工具栏按钮同理，没有尺寸规则时可能点不中。
 */

/* —— 工具栏「视频」按钮 —— */
.kefu-video-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kefu-video-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5f5f5f;
  cursor: pointer;
  border-radius: 4px;
}
.kefu-video-btn:hover {
  color: #2d8cf0;
  background: rgba(45, 140, 240, 0.08);
}

/* —— 发送前预览对话框 —— */
.kefu-video-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.kefu-video-dialog-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.kefu-video-dialog-title {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #1c1915;
  border-bottom: 1px solid #f0f0f0;
}
.kefu-video-dialog-preview {
  display: block;
  width: 100%;
  max-height: 46vh;
  background: #000;
  object-fit: contain;
}
.kefu-video-dialog-meta {
  padding: 10px 16px;
  font-size: 12px;
  color: #8a8a8a;
}
.kefu-video-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 16px 16px;
}
.kefu-video-dialog-actions button {
  min-width: 76px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
}
.kefu-video-ok {
  background: #2d8cf0 !important;
  border-color: #2d8cf0 !important;
  color: #fff !important;
}
.kefu-video-ok:disabled {
  opacity: 0.6;
  cursor: default;
}

/* —— 已发出的视频：默认只显示封面，点开才加载 —— */
.kefu-video-hidden {
  display: none !important;
}
.kefu-video-cover {
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000 center/cover no-repeat;
  cursor: pointer;
  border-radius: 6px;
}
.kefu-video-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kefu-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.kefu-video-play::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 14px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

/* —— 夜间主题 —— */
body[theme-mode="dark"] .kefu-video-btn { color: #9a9a9a; }
body[theme-mode="dark"] .kefu-video-dialog-card { background: #241f18; color: #f3ead7; }
body[theme-mode="dark"] .kefu-video-dialog-title { color: #f3ead7; border-bottom-color: #3a3428; }
body[theme-mode="dark"] .kefu-video-dialog-meta { color: #9a9a9a; }
body[theme-mode="dark"] .kefu-video-dialog-actions button {
  background: #2c281f;
  border-color: #3a3428;
  color: #f3ead7;
}
