/* ===========================================
   抠图模块样式
   =========================================== */

#bg-upload-area {
  margin: 0 12px 8px; padding: 18px 0;
  border: 1.5px dashed #3A3A3A; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; background: #141414; transition: border-color 0.2s;
  position: relative;
}
#bg-upload-area:hover { border-color: #00D4FF; }
#bg-upload-area span { font-size: 11px; color: #666; margin-top: 4px; }
#bg-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

#bg-image-list {
  flex: 1; overflow-y: auto; padding: 0 12px 12px;
}

/* 通用图片列表样式已移至 core.css（.img-list-item / .img-thumb / .img-checkbox 等） */

/* Preview Area */
#bg-preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 20px;
  overflow: auto;
  gap: 16px;
}

#bg-preview-area .preview-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

.preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.preview-box .preview-label {
  font-size: 11px;
  color: #888;
  font-weight: 500;
}

.preview-box .preview-img-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  background: #1A1A1A;
  max-width: 320px;
  max-height: 320px;
}

.preview-box .preview-img-wrap img {
  display: block;
  max-width: 320px;
  max-height: 320px;
  object-fit: contain;
}

/* 棋盘格背景（用于显示透明效果） */
.preview-box .preview-img-wrap.checkerboard {
  background-image:
    linear-gradient(45deg, #333 25%, transparent 25%),
    linear-gradient(-45deg, #333 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #333 75%),
    linear-gradient(-45deg, transparent 75%, #333 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: #444;
}

/* Empty state */
#bg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #444;
}
#bg-empty-state p { font-size: 13px; color: #444; }
#bg-empty-state.hidden { display: none; }

/* Color preview */
.color-detect-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

#color-preview {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid #2A2A2A;
  background: #1A1A1A;
  flex-shrink: 0;
}

#color-value {
  font-size: 11px;
  color: #AAA;
  font-family: 'SF Mono', Monaco, monospace;
}

#btn-bg-detect {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 11px;
  border: 0.5px solid #3A3A3A;
  background: #1A1A1A;
  border-radius: 6px;
  color: #AAA;
  cursor: pointer;
  transition: all 0.2s;
}
#btn-bg-detect:hover:not(:disabled) {
  background: #252525;
  border-color: #00D4FF;
  color: #00D4FF;
}
#btn-bg-detect:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Range slider styling */
.props-field input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #2A2A2A;
  border-radius: 2px;
  outline: none;
}
.props-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00D4FF;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,212,255,0.4);
}
.props-field input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00D4FF;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(0,212,255,0.4);
}

.range-value {
  font-size: 11px;
  color: #00D4FF;
  width: 32px;
  text-align: right;
  font-family: 'SF Mono', Monaco, monospace;
}

/* Progress */
#bg-progress-section {
  padding: 12px 16px;
  border-bottom: 0.5px solid #2A2A2A;
}
#bg-progress-bar {
  width: 100%;
  height: 6px;
  background: #1A1A1A;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
#bg-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #00D4FF, #7B2FFF);
  border-radius: 3px;
  transition: width 0.3s;
  width: 0%;
}
#bg-progress-text {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 4px;
}
