/* 商品链接带入的商品信息 + 抓取图片大图查看 */
.sp-info { margin-bottom: 12px; padding: 10px 12px; border: 1px solid #2d3040; border-radius: 8px; background: #0f1017; }
.sp-info label { display: block; font-size: 11px; font-weight: 700; color: #8b8d9b; margin: 6px 0 4px; }
.sp-info label:first-child { margin-top: 0; }
.sp-info input[type=text], .sp-info textarea, .pp-editor input, .pp-editor textarea {
  width: 100%; box-sizing: border-box; background: #0c0d14; border: 1px solid #333647; border-radius: 6px;
  color: #e6e7ee; font-size: 12px; padding: 6px 8px; font-family: inherit; line-height: 1.5;
}
.sp-info textarea { height: 110px; resize: vertical; }
.sp-info .sp-use { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #cfd2e2; margin-top: 8px; cursor: pointer; }
.sp-info .sp-use input { accent-color: #25f4ee; }
.pp-note { font-size: 11px; color: #ffaa00; margin-top: 4px; }

.sp-section { grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: #8b8d9b; padding: 2px 0; }
.sp-zoom {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 6px; border: 1px solid #555;
  background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; cursor: zoom-in; z-index: 6; padding: 0;
}
.sp-zoom:hover { border-color: #25f4ee; color: #25f4ee; }

#ssProductPageCard { border-top: 1px dashed #2d3040; padding-top: 8px; }
.pp-card-head { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #cfd2e2; min-width: 0; }
.pp-card-head > i { color: #ffaa00; }
.pp-card-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pp-link { background: none; border: none; color: #25f4ee; font-size: 11px; cursor: pointer; padding: 0 2px; white-space: nowrap; }
.pp-danger { color: #ff607e; }
.pp-editor { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pp-editor[hidden] { display: none; }
.pp-editor textarea { height: 120px; resize: vertical; }

#scrapeLightbox {
  position: fixed; inset: 0; z-index: 10050; background: rgba(5,6,10,0.88); display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px 16px; box-sizing: border-box;
}
.pp-view-bar { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 13px; }
.pp-view-stage { display: flex; align-items: center; gap: 12px; max-width: 100%; min-height: 0; flex: 1; }
.pp-view-scroll { max-width: min(900px, 80vw); max-height: calc(100vh - 160px); overflow: auto; border-radius: 8px; background: #fff; }
#scrapeLightboxImg { display: block; max-width: 100%; max-height: calc(100vh - 160px); cursor: zoom-in; }
#scrapeLightboxImg.pp-actual { max-height: none; cursor: zoom-out; }
.pp-view-nav {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid #555; background: rgba(0,0,0,0.6); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; flex: none;
}
.pp-view-nav:hover { border-color: #25f4ee; color: #25f4ee; }
.pp-view-btn { height: 30px; padding: 0 14px; border-radius: 6px; border: 1px solid #25f4ee; background: transparent; color: #25f4ee; font-size: 12px; font-weight: 700; cursor: pointer; }
.pp-view-btn.pp-selected { background: #25f4ee; color: #000; }
.pp-view-close { background: none; border: none; color: #cfd2e2; font-size: 20px; cursor: pointer; }
.pp-view-hint { color: #8b8d9b; font-size: 11px; }

body[data-theme="light"] .sp-info { background: #f6f7fa !important; border-color: #dcdfe7 !important; }
body[data-theme="light"] .sp-info input[type=text], body[data-theme="light"] .sp-info textarea,
body[data-theme="light"] .pp-editor input, body[data-theme="light"] .pp-editor textarea { background: #fff !important; border-color: #d3d7e0 !important; color: #1f2330 !important; }
body[data-theme="light"] .sp-info label, body[data-theme="light"] .sp-section { color: #5b6070 !important; }
body[data-theme="light"] .sp-info .sp-use, body[data-theme="light"] .pp-card-head { color: #1f2330 !important; }
body[data-theme="light"] .pp-link { color: #0b8f8a !important; }
body[data-theme="light"] .pp-danger { color: #d6304f !important; }
body[data-theme="light"] .pp-note { color: #b26b00 !important; }
body[data-theme="light"] #ssProductPageCard { border-top-color: #dcdfe7 !important; }

/* 大图截图：框选保留区域，选框外压暗。 */
#scrapeLightbox .pp-crop-only { display: none; }
#scrapeLightbox.pp-cropping .pp-crop-only { display: revert; }
#scrapeLightbox.pp-cropping .pp-normal-only, #scrapeLightbox.pp-cropping .pp-view-nav { display: none; }
.pp-view-scroll { position: relative; }
.pp-view-quiet { border-color: #5b5e70; color: #e6e8f0; }
.pp-view-quiet:hover { border-color: #25f4ee; color: #25f4ee; }
.pp-view-btn:disabled { opacity: .45; cursor: not-allowed; }
.pp-crop-size { color: #cfd2e2; font-size: 12px; min-width: 110px; }
#scrapeLightbox.pp-cropping .pp-view-scroll { overflow: hidden; }
#ppCropLayer { position: absolute; inset: 0; cursor: crosshair; touch-action: none; user-select: none; }
#scrapeLightbox.pp-cropping #ppCropLayer { display: block; }
.pp-crop-box { position: absolute; box-sizing: border-box; border: 2px solid #25f4ee; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; }
.pp-crop-box[hidden] { display: none; }
.pp-crop-h { position: absolute; width: 12px; height: 12px; background: #25f4ee; border: 2px solid #0b0c10; border-radius: 2px; box-sizing: border-box; }

/* 弹窗只有一个滚动区域，底部按钮固定在可见区域底部。 */
#scrapeProductModal .sp-footer { position: sticky; bottom: -20px; z-index: 6; display: flex; justify-content: space-between; align-items: center; margin: 14px 0 -20px; padding: 12px 0 20px; border-top: 1px solid #232533; background: #12131b; }
body[data-theme="light"] #scrapeProductModal .sp-footer { background: #ffffff; border-top-color: #e2e8f0; }
.pp-facts-note { font-size: 11px; line-height: 1.6; color: #8b8d9b; margin: -2px 0 4px; }
.pp-facts-note[hidden] { display: none; }
.pp-facts-note .pp-link { font-size: 11px; }
