/* ============================================================================
 * 探店视频（Store Visit）· 前端样式（2026-10-11 · 开发员12号）
 * ----------------------------------------------------------------------------
 * 风格方向：商业探索 + 暖色调（奶茶/木纹/招牌橙），区别于视频去背景的青→靛。
 * 🔴 全部类名前缀 `sv-` ⇒ 全站唯一、零冲突（参考 check-css-collisions.py）。
 * 作用域：仅作用于 #sub-storevisit 内部，不会污染全站。
 * ============================================================================
 */

/* ---------- 0. 顶部横幅 ---------- */
#sub-storevisit .sv-hero {
  position: relative;
  padding: 18px 20px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffb070 0%, #f97e3a 45%, #d9472a 100%);
  color: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}
#sub-storevisit .sv-hero-glow {
  position: absolute; top: -40px; right: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.32), rgba(255,255,255,0) 65%);
  pointer-events: none;
}
#sub-storevisit .sv-hero-ico { font-size: 30px; margin-right: 6px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.18)); }
#sub-storevisit .sv-hero-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: rgba(255,255,255,.18); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; margin-bottom: 6px;
}
#sub-storevisit .sv-hero-t { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 2px 0 6px; }
#sub-storevisit .sv-hero-s { font-size: 13px; opacity: .94; line-height: 1.55; }
#sub-storevisit .sv-hero-s b { font-weight: 700; }
#sub-storevisit .sv-hero-flow {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
}
#sub-storevisit .sv-hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.16); font-size: 12px;
}
#sub-storevisit .sv-hero-chip i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%;
  background: rgba(255,255,255,.3); font-style: normal; font-size: 11px; font-weight: 700;
}

/* ---------- 1. 上传区 ---------- */
#sub-storevisit .sv-drop {
  border: 2px dashed #ffd2b6;
  border-radius: 14px;
  padding: 22px 16px 18px;
  text-align: center;
  background: linear-gradient(180deg, #fffaf5, #fff5ec);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
#sub-storevisit .sv-drop:hover { border-color: #f97e3a; background: #fff1e3; }
/* ⚠️ iOS/macOS Webkit 不允许 JS click() 触发 file 选择器
   这里让 file input 直接覆盖在 drop 上 → 用户点 drop 就是点 input
   input 透明、cursor pointer，整体仍像"在点 drop" */
#sub-storevisit .sv-drop { position: relative; cursor: pointer; }
#sub-storevisit .sv-file-cover {
  display: block !important;         /* 显式覆盖 input 默认 inline-block 样式，避免某些浏览器把 input 渲染为 display:none */
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; z-index: 2;
  /* 一些浏览器要 `display:none` 之外的"被遮盖"才让原生选择器显示 */
}
/* 已显示缩略图时，input 仍覆盖在图上，但缩略图在 z-index 下层 */
#sub-storevisit .sv-drop.has-image .sv-drop-img-wrap { position: relative; z-index: 1; }
#sub-storevisit .sv-drop.has-image .sv-file-cover { z-index: 3; }
#sub-storevisit .sv-drop.has-image { padding: 0; border-style: solid; border-color: #f8d4b6; }
#sub-storevisit .sv-drop-ico { font-size: 36px; margin-bottom: 4px; }
#sub-storevisit .sv-drop-t { font-size: 15px; font-weight: 600; color: #4a2c1e; }
#sub-storevisit .sv-drop-s { font-size: 12.5px; color: #8a6e5f; margin-top: 4px; line-height: 1.55; }
#sub-storevisit .sv-drop-rules {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-top: 10px;
}
#sub-storevisit .sv-drop-rule {
  font-size: 11.5px; color: #c9794a;
  padding: 2px 8px; border-radius: 6px; background: rgba(249,126,58,.08);
}
#sub-storevisit .sv-drop-img-wrap {
  position: relative; width: 100%; max-height: 240px; overflow: hidden;
  border-radius: 12px;
}
#sub-storevisit .sv-drop-img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
#sub-storevisit .sv-drop-img-tip {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px;
  padding: 3px 10px; border-radius: 999px;
}

/* ---------- 2. 选项卡 ---------- */
#sub-storevisit .sv-opt-group { margin-top: 16px; }
#sub-storevisit .sv-opt-h {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: #4a2c1e;
  margin-bottom: 8px;
}
#sub-storevisit .sv-opt-h-i { color: #f97e3a; }
#sub-storevisit .sv-opt-h-s { font-size: 11.5px; color: #b09c8c; font-weight: 400; }

/* 比例 + 时长：横向 chip（形状直接表达比例，无小字） */
#sub-storevisit .sv-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
#sub-storevisit .sv-chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px;
  min-width: 74px;
  min-height: 64px;                 /* 🔴 全部等高 —— 形状高矮不一也不会参差 */
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff; border: 1.5px solid #f1d8c4;
  cursor: pointer; user-select: none;
  color: #5b3a2a;
  transition: border-color .12s, background .12s;
}
#sub-storevisit .sv-chip:hover { border-color: #f97e3a; background: #fff5ec; }
#sub-storevisit .sv-chip.on {
  border-color: #f97e3a; background: #ffe7d2;
  color: #c9472a;
}
#sub-storevisit .sv-chip-k {
  font-size: 13px; font-weight: 700; line-height: 1;
  letter-spacing: .02em;
}
#sub-storevisit .sv-chip-k i { font-style: normal; font-size: 10.5px; font-weight: 500; margin-left: 1px; }

/* 比例形状 —— 9:16 就是竖框、16:9 就是横框、1:1 就是方框 */
#sub-storevisit .sv-shape {
  display: block;
  background: #dbc7b6;
  border-radius: 2px;
  transition: background .12s;
}
#sub-storevisit .sv-chip:hover .sv-shape { background: #f0b58c; }
#sub-storevisit .sv-chip.on .sv-shape { background: #f97e3a; }
#sub-storevisit .sv-shape-916 { width: 11px; height: 19px; }
#sub-storevisit .sv-shape-169 { width: 19px; height: 11px; }
#sub-storevisit .sv-shape-23  { width: 13px; height: 19px; }
#sub-storevisit .sv-shape-32  { width: 19px; height: 13px; }
#sub-storevisit .sv-shape-11  { width: 15px; height: 15px; }

/* 🔴 比例 5 档 / 时长 4 档：**一行放完，不许拐弯**（老板 2026-10-12："一行能解决就不用 2 行"） */
#sub-storevisit #svRatio,
#sub-storevisit #svDur { flex-wrap: nowrap; }
#sub-storevisit #svRatio .sv-chip,
#sub-storevisit #svDur .sv-chip {
  flex: 1 1 0;          /* 等分剩余空间 */
  min-width: 0;         /* 允许压到比 min-width 更窄 */
  padding: 9px 4px;
}
#sub-storevisit #svRatio .sv-chip-k,
#sub-storevisit #svDur .sv-chip-k { font-size: 12.5px; }

/* 时长：只需秒数，无形状 */
#sub-storevisit .sv-chip.sv-chip-dur { min-width: 68px; }
/* 场景（谁来探店）：只有文字，不撑到 64px */
#sub-storevisit .sv-chip.sv-chip-scene { min-height: auto; padding: 11px 16px; }

/* ============================================================================
 * 11. 生成等待特效（2026-10-12 老板口径："缺少生成等待特效 / 缺少生成读秒"）
 *     —— 转圈 + 流动进度条 + 已用秒数，让客户知道"在动、还要多久"
 * ============================================================================ */
#sub-storevisit .sv-prog-h {
  display: flex; align-items: center; justify-content: space-between;
}
#sub-storevisit .sv-prog-t { display: inline-flex; align-items: center; gap: 8px; }

/* 转圈（CSS 动画，不占带宽） */
#sub-storevisit .sv-spin {
  display: inline-block;
  width: 14px; height: 14px; flex: none;
  border: 2px solid rgba(217, 71, 42, .22);
  border-top-color: #d9472a;
  border-radius: 50%;
  animation: svSpin .8s linear infinite;
}
@keyframes svSpin { to { transform: rotate(360deg); } }

/* 进度条：流动光带（比静止色块"活"得多） */
#sub-storevisit .sv-bar {
  background: linear-gradient(90deg, #ffb070 0%, #d9472a 50%, #ffb070 100%);
  background-size: 200% 100%;
  animation: svBarFlow 1.3s linear infinite;
}
@keyframes svBarFlow {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}

/* 底部一行：左=阶段文案，右=已用读秒 */
#sub-storevisit .sv-prog-s {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
#sub-storevisit .sv-prog-time {
  flex: none;
  color: #c9794a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;   /* 秒数跳动不抖 */
}

/* ---------- 3. 提示词 ---------- */
#sub-storevisit .sv-prompt {
  width: 100%; min-height: 110px;
  border: 1.5px solid #f1d8c4; border-radius: 12px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.55;
  color: #4a2c1e; resize: vertical;
  background: #fffaf5;
  font-family: inherit;
}
#sub-storevisit .sv-prompt:focus { outline: none; border-color: #f97e3a; background: #fff; }
#sub-storevisit .sv-prompt-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: #b09c8c; margin-top: 5px;
}
#sub-storevisit .sv-prompt-meta-r { color: #c9794a; }
#sub-storevisit .sv-prompt-reset {
  background: none; border: 0; color: #c9794a; cursor: pointer; font-size: 11.5px;
  padding: 0; margin-left: 8px;
}
#sub-storevisit .sv-prompt-reset:hover { text-decoration: underline; }

/* 风格预设 */
#sub-storevisit .sv-presets {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px;
}
#sub-storevisit .sv-preset {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  background: #fff; border: 1px solid #f1d8c4; cursor: pointer; color: #8a6e5f;
}
#sub-storevisit .sv-preset:hover { background: #fff5ec; color: #c9794a; }

/* ---------- 4. 生成按钮 ---------- */
#sub-storevisit .sv-run {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 13px 20px; border-radius: 12px;
  background: linear-gradient(135deg, #ffb070, #d9472a);
  color: #fff; font-size: 15px; font-weight: 600; border: 0;
  cursor: pointer; margin-top: 16px;
  box-shadow: 0 6px 18px rgba(249,126,58,.32);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
#sub-storevisit .sv-run:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(249,126,58,.4); }
#sub-storevisit .sv-run:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
#sub-storevisit .sv-run-cost {
  font-size: 12.5px; opacity: .9; font-weight: 500;
}

/* ---------- 5. 进度 ---------- */
#sub-storevisit .sv-prog { padding: 4px 0; }
#sub-storevisit .sv-prog-h { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: #4a2c1e; }
#sub-storevisit .sv-prog-h span:last-child { color: #c9794a; font-weight: 500; font-size: 12px; }
#sub-storevisit .sv-barwrap { height: 6px; background: #f3e6da; border-radius: 3px; margin-top: 8px; overflow: hidden; }
#sub-storevisit .sv-bar { height: 100%; width: 0; background: linear-gradient(90deg, #ffb070, #d9472a); transition: width .35s ease; }
#sub-storevisit .sv-prog-s { font-size: 12px; color: #8a6e5f; margin-top: 8px; line-height: 1.55; }

/* ---------- 6. 结果 ---------- */
#sub-storevisit .sv-res-card { padding: 14px; }
#sub-storevisit .sv-res-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#sub-storevisit .sv-res-title { font-size: 14.5px; font-weight: 600; color: #4a2c1e; }
#sub-storevisit .sv-res-acts { display: flex; gap: 6px; }
#sub-storevisit .sv-res-act {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  background: #fff5ec; color: #c9794a; border: 1px solid #f1d8c4; cursor: pointer;
  text-decoration: none;
}
#sub-storevisit .sv-res-act:hover { background: #ffe7d2; }
#sub-storevisit .sv-res-video-wrap {
  position: relative; width: 100%; background: #000; border-radius: 10px;
  overflow: hidden;
}
#sub-storevisit .sv-res-video-wrap video { display: block; width: 100%; max-height: 360px; }
#sub-storevisit .sv-res-meta {
  margin-top: 10px; font-size: 12px; color: #8a6e5f;
  display: flex; flex-wrap: wrap; gap: 12px;
}
#sub-storevisit .sv-res-meta b { color: #4a2c1e; font-weight: 600; }

/* ---------- 7. 提示条（外用） ---------- */
#sub-storevisit .sv-toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(40,20,12,.92); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; z-index: 99999;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  animation: svToastIn .2s ease;
}
@keyframes svToastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 8. 底部水印提示 ---------- */
#sub-storevisit .sv-notice {
  text-align: center; font-size: 11.5px; color: #b09c8c;
  margin-top: 18px; padding-top: 12px;
  border-top: 1px dashed #f1d8c4;
}

/* ---------- 9. 生成历史页签（沿用站内 .tab-bar 风格，复用全局样式） ---------- */
#sub-storevisit .sv-history {
  margin-top: 18px;
}

/* ============================================================================
 * 10. 多图上传（2026-10-12 老板口径：产品图 / 门面招牌 / 店内 / 人物，1~5 张，AI 自动识别）
 *     —— 替换原「单图 sv-drop」；配色沿用本文件暖色系
 * ============================================================================ */
#sub-storevisit .sv-imgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}
#sub-storevisit .sv-img-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1.5px dashed #ffd2b6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf5, #fff5ec);
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  font-size: 12px; color: #c9794a;
  transition: border-color .15s, background .15s;
}
#sub-storevisit .sv-img-slot:hover { border-color: #f97e3a; background: #fff1e3; }
#sub-storevisit .sv-imgs.is-drag .sv-img-slot { border-color: #f97e3a; background: #fff1e3; }
#sub-storevisit .sv-img-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
#sub-storevisit .sv-img-rm {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0, 0, 0, .55);
  border: none; color: #fff;
  border-radius: 50%; cursor: pointer;
  font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
#sub-storevisit .sv-img-add { cursor: pointer; }
#sub-storevisit .sv-img-add-ico { font-size: 22px; color: #f97e3a; line-height: 1; }
#sub-storevisit .sv-img-file { display: none; }
#sub-storevisit .sv-img-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 9px; font-size: 11.5px; color: #b09c8c;
}
#sub-storevisit .sv-img-meta-r { color: #c9472a; font-weight: 700; }
#sub-storevisit .sv-img-clear {
  background: transparent;
  border: 1.5px solid #f1d8c4;
  color: #8a6e5f;
  font-size: 12px; padding: 5px 11px; border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
#sub-storevisit .sv-img-clear:hover { border-color: #f97e3a; color: #c9472a; }