/* 商品替换功能的专用样式 */

/* 商品替换的预览容器 */
.pr-preview-container {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px;
  border-radius: 4px;
  background: rgba(30, 30, 30, 0.5);
  min-height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.pr-image-preview {
  max-width: 100%;
  max-height: 300px;
  display: block;
  object-fit: contain;
}

.pr-upload-container {
  margin-bottom: 20px;
}

/* 商品替换按钮样式 */
#start-replacement {
  width: 150px;
  background-color: #8053FF;
  border-color: #8053FF;
  color: white;
  transition: all 0.3s ease;
}

#start-replacement:hover {
  background-color: #6a45d1;
  border-color: #6a45d1;
}

#start-replacement:disabled {
  background-color: rgba(128, 83, 255, 0.5);
  border-color: rgba(128, 83, 255, 0.5);
  cursor: not-allowed;
}

/* 结果图片容器 */
.pr-result-image-container {
  margin: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-color: rgba(30, 30, 30, 0.5);
  width: calc(50% - 20px);
  display: inline-block;
}

.pr-result-image {
  width: 100%;
  height: auto;
  display: block;
}

/* 结果图片上的操作按钮区域 */
.pr-result-image-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pr-result-image-container:hover .pr-result-image-actions {
  opacity: 1;
}

.pr-result-image-actions button {
  background: rgba(128, 83, 255, 0.8);
  border: none;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.pr-result-image-actions button:hover {
  background: rgba(128, 83, 255, 1);
}

/* 错误信息样式 */
.pr-error-message {
  color: #ff5252;
  background-color: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.3);
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
}

/* 布局样式 */
.pr-row {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.pr-col {
  flex: 1;
  padding: 0;
}

.pr-upload-container {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: #1e1e1e;
  border-radius: 12px;
  min-height: 350px;
  border: 1px solid #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.pr-upload-container:hover {
  border-color: #8053FF;
  box-shadow: 0 6px 15px rgba(128, 83, 255, 0.15);
}

.pr-form-label {
  color: #8053FF;
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pr-preview-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000;
  color: #8053FF;
  border-radius: 8px;
  height: 220px;
  margin-top: 15px;
  position: relative;
  overflow: hidden;
}

.pr-preview-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.pr-image-preview {
  width: 200px;
  height: 200px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.pr-image-preview:hover {
  transform: scale(1.05);
}

.pr-settings-container {
  margin-bottom: 30px;
}

.pr-result-container {
  margin-top: 30px;
  background-color: #1e1e1e;
  border-radius: 12px;
  padding: 20px;
}

.pr-result-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
  justify-content: center;
}

.pr-result-item {
  background-color: #252525;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  width: 400px;
}

.pr-result-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.pr-result-image {
  width: 370px;
  height: 370px;
  border-radius: 6px;
  margin-bottom: 10px;
  object-fit: contain;
  cursor: pointer;
  background-color: #000;
}

.pr-action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.pr-button {
  background-color: #8053FF;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pr-button:hover {
  background-color: #6a45cc;
}

/* 处理中的加载动画 */
@keyframes pr-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pr-loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(128, 83, 255, 0.2);
  border-radius: 50%;
  border-top-color: #8053FF;
  animation: pr-spin 1s linear infinite;
  margin: 0 auto;
}

/* 进度条样式 */
.pr-progress-bar {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.pr-progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: #8053FF;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* 警告提示样式 */
.pr-alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.pr-alert-info {
  color: #0dcaf0;
  background-color: rgba(13, 202, 240, 0.1);
  border-color: rgba(13, 202, 240, 0.2);
}

/* Image popup styles */
.pr-image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pr-image-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pr-image-popup-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.pr-image-popup-img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.pr-image-popup-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s ease;
}

.pr-image-popup-close:hover {
  background-color: rgba(220, 53, 69, 0.8);
}

/* 下载通知样式 */
.downloading-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  z-index: 1050;
  font-size: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.downloading-message i {
  font-size: 18px;
}

.downloading-message.success {
  background-color: rgba(40, 167, 69, 0.9);
}

.downloading-message.error {
  background-color: rgba(220, 53, 69, 0.9);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
} 