/**
 * 网页端清单内容共用样式（A4 摘要纸 / 图片九宫格 / 视频播放条 / ZIP 下载卡）
 * 由 checklist-view.css 迁出，供 checklist-view.html 与 checklist-list.html（右栏面板）共用，
 * 避免两处内容样式漂移。取值与原 checklist-view.css 完全一致。
 */

/* ===== A4 摘要纸 ===== */
.summary-section {
  margin-bottom: 32px;
}

.summary-paper {
  background: white;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.summary-content {
  /* 动态渲染 */
}

.summary-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2563eb;
  color: #1f2937;
}

.summary-group {
  margin-bottom: 24px;
}

.summary-group-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #374151;
}

.summary-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.summary-item {
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.item-label {
  color: #6b7280;
  font-weight: 500;
}

.item-value {
  color: #1f2937;
}

/* ===== 图片九宫格 ===== */
.images-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1f2937;
}

.images-grid {
  /* 动态渲染 */
}

.image-category {
  margin-bottom: 24px;
}

.image-category-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #374151;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.image-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.image-item img:hover {
  transform: scale(1.05);
}

.image-group {
  margin-bottom: 16px;
}

.image-group-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #6b7280;
}

/* ===== 视频播放条 ===== */
.videos-section {
  margin-bottom: 32px;
}

.videos-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.video-player {
  width: 100%;
  display: block;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

/* ===== ZIP 下载卡 ===== */
.zip-section {
  margin-bottom: 32px;
}

.zip-card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.zip-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.zip-icon {
  color: #2563eb;
}

.zip-title {
  font-size: 18px;
  font-weight: 600;
}

.zip-desc {
  color: #6b7280;
  margin-bottom: 16px;
}

.btn-primary {
  padding: 12px 24px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-zip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.zip-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  width: 120px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #2563eb;
  transition: width 0.3s;
}

.progress-text {
  font-size: 12px;
  color: #6b7280;
}

.zip-status {
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
}

/* ===== 图片全屏预览层（与小程序 wx.previewImage 同口径） ===== */
.image-item img {
  cursor: pointer;
}

.img-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
}

.img-preview-img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  user-select: none;
}

.img-preview-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.img-preview-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.img-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-preview-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.img-preview-prev {
  left: 20px;
}

.img-preview-next {
  right: 20px;
}

.img-preview-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .summary-paper {
    padding: 16px;
  }

  .summary-items {
    grid-template-columns: 1fr;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* ===== ZIP 情境广告位（2026-10-26 效果图审核通过重新引入：查看页 ZIP 卡下 / 列表页右栏内容末尾） ===== */
/* DOM 由 checklist-render.js buildPromoSlot 构建；业主/已关闭/本会话已展示时不插入节点 */
.ad-slot {
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 26px;
}
.ad-media {
  width: 112px;
  height: 63px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #eef3fb;
  position: relative;
}
.ad-illust { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.ad-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-text { flex: 1; min-width: 0; }
.ad-line {
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-hl { color: #2563eb; font-weight: 700; }
.ad-sub {
  font-size: 12px;
  color: #9aa4b2;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-cta {
  flex-shrink: 0;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 999px;
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ad-cta:hover { background: #1d4ed8; }
.ad-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #b6bcc8;
  font-size: 16px;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
}
.ad-close:hover { background: #f2f3f5; color: #666; }
@media (max-width: 480px) {
  .ad-media { width: 88px; height: 50px; }
  .ad-sub { display: none; }
}
