/* 通用模板上传组件样式 */
.com-template-upload {
  width: 100%;
  /* margin-right: 16px; */
}

.com-template-upload .upload-option {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.com-template-upload .upload-direction {
  margin-left: auto;
}

/* .com-template-upload .custom-upload {
  position: relative;
  width: 100%;
  height: 125px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  background: #f7f7f7;
} */


.com-template-upload .custom-upload .preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 默认隐藏，有内容时显示 */
  opacity: 0;
  pointer-events: none;
}

.com-template-upload .custom-upload .preview.show {
  opacity: 1;
  pointer-events: auto;
}

.com-template-upload .custom-upload .preview img,
.com-template-upload .custom-upload .preview video {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.com-template-upload .custom-upload .txt {
  font-size: 12px;
  color: #666;
  text-align: center;
  padding: 8px;
  line-height: 1.4;
  word-break: break-all;
  z-index: 1;
}

.com-template-upload .custom-upload .txt.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  font-size: 11px;
  /* 始终显示overlay */
  opacity: 1;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.com-template-upload .custom-upload:hover .txt.overlay {
  opacity: 1;
}

.com-template-upload .custom-upload .mask .t-icon {
  color: white;
  font-size: 12px;
}

.com-template-upload .custom-upload:hover .mask {
  opacity: 1;
}

/* 旧的delete-btn样式已移除，现在使用hover-mask内的icon-btn */

/* 悬停遮罩层 */
.com-template-upload .custom-upload .hover-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.com-template-upload .custom-upload:hover .hover-mask {
  opacity: 1;
}

/* 遮罩层图标容器 */
.com-template-upload .custom-upload .mask-icons {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

/* 图标按钮样式 */
.com-template-upload .custom-upload .icon-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.com-template-upload .custom-upload .icon-btn:hover {
  background: white;
  transform: scale(1.1);
}

.com-template-upload .custom-upload .icon-btn .t-icon {
  font-size: 16px;
  color: #333;
}

/* 删除按钮特殊样式 */
.com-template-upload .custom-upload .icon-btn.delete-btn {
  background: rgba(255, 0, 0, 0.8);
}

.com-template-upload .custom-upload .icon-btn.delete-btn:hover {
  background: rgba(255, 0, 0, 1);
}

.com-template-upload .custom-upload .icon-btn.delete-btn .t-icon {
  color: white;
}

.com-template-upload .com-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

/* 视频预览容器 */
.video-preview-container {
  text-align: center;
  padding: 0;
}

.video-preview-container video {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 无视频内容提示 */
.video-preview-container .no-video-tip {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* 在循环中使用时的样式调整 */
.nav-list .com-template-upload,
.collapse-content .com-template-upload {
  margin: 8px 0;
}

.nav-list .com-template-upload .custom-upload,
.collapse-content .com-template-upload .custom-upload {
  width: 80px;
  height: 80px;
}
