/* ========== AI QUALITY SELECTOR & IMAGE PROCESSING IMPROVEMENTS ========== */

/* AI Quality Selector Styling */
#aiQualitySelector {
  width: 100%;
  padding: 10px 14px;
  margin-top: 6px;
  border: 1.5px solid #e1e6f0;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  font-family: 'Inter Variable', sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

#aiQualitySelector:hover {
  border-color: #129ed9;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1);
}

#aiQualitySelector:focus {
  outline: none;
  border-color: #129ed9;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.15);
}

/* Enhanced Image Action Buttons */
.image-action-buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.import-button-x {
  background: #fff !important;
  color: #129ed9 !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: 'Inter Variable', sans-serif !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 80px !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.import-button-x:hover {
  background: #f8fbfd !important;
  border-color: #129ed9 !important;
  color: #0f8bb8 !important;
  box-shadow: 0 2px 4px rgba(18, 158, 217, 0.1) !important;
  transform: translateY(-1px) !important;
}

.import-button-x:active {
  background: #f3fafd !important;
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(18, 158, 217, 0.1) !important;
}

.import-button-x i {
  color: #129ed9 !important;
  font-size: 11px !important;
}

/* Image Processing Preview Container */
#imageProcessingPreview {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-top: 16px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* Edit Store Image Processing Preview Container */
#editStoreImageProcessingPreview {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-top: 16px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* Select All Images Checkbox */
#selectAllImages {
  margin-right: 8px;
  accent-color: #129ed9;
}

/* Image Grid Layout */
#selectedImageProcessingList {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
  margin-top: 16px !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Edit Store Image Grid Layout */
#editStoreSelectedImageProcessingList {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
  margin-top: 16px !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Individual Image Container */
#selectedImageProcessingList .image-container {
  position: relative !important;
  padding: 12px !important;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  margin-bottom: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Edit Store Individual Image Container */
#editStoreSelectedImageProcessingList .image-container {
  position: relative !important;
  padding: 12px !important;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  margin-bottom: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Image Wrapper to maintain aspect ratio */
#selectedImageProcessingList .image-wrapper {
  position: relative !important;
  width: 100% !important;
  padding-top: 100% !important;
  margin-bottom: 8px !important;
  background: #fafafa !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

/* Edit Store Image Wrapper */
#editStoreSelectedImageProcessingList .image-wrapper {
  position: relative !important;
  width: 100% !important;
  padding-top: 100% !important;
  margin-bottom: 8px !important;
  background: #fafafa !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

#selectedImageProcessingList .image-wrapper img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 4px !important;
}

/* Edit Store Image Wrapper Images */
#editStoreSelectedImageProcessingList .image-wrapper img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 4px !important;
}

/* Product Title Headers */
#selectedImageProcessingList .product-title {
  grid-column: 1 / -1 !important;
  margin-bottom: 16px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid #e1e6f0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #333 !important;
  font-family: 'Inter Variable', sans-serif !important;
  width: 100% !important;
}

/* Edit Store Product Title Headers */
#editStoreSelectedImageProcessingList .product-title {
  grid-column: 1 / -1 !important;
  margin-bottom: 16px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid #e1e6f0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #333 !important;
  font-family: 'Inter Variable', sans-serif !important;
  width: 100% !important;
}

/* Select All Container */
#selectedImageProcessingList .select-all-container {
  grid-column: 1 / -1 !important;
  margin-bottom: 16px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #e1e6f0 !important;
  width: 100% !important;
}

/* Edit Store Select All Container */
#editStoreSelectedImageProcessingList .select-all-container {
  grid-column: 1 / -1 !important;
  margin-bottom: 16px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #e1e6f0 !important;
  width: 100% !important;
}

/* Image Controls */
#selectedImageProcessingList .image-controls {
  margin: 8px 0 !important;
  width: 100% !important;
}

/* Edit Store Image Controls */
#editStoreSelectedImageProcessingList .image-controls {
  margin: 8px 0 !important;
  width: 100% !important;
}

#selectedImageProcessingList .image-controls label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-family: 'Inter Variable', sans-serif !important;
  font-size: 13px !important;
  color: #666 !important;
}

/* Edit Store Image Controls Labels */
#editStoreSelectedImageProcessingList .image-controls label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-family: 'Inter Variable', sans-serif !important;
  font-size: 13px !important;
  color: #666 !important;
}

/* Edit Buttons Container */
#selectedImageProcessingList .edit-buttons {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 12px !important;
  width: 100% !important;
}

/* Edit Store Edit Buttons Container */
#editStoreSelectedImageProcessingList .edit-buttons {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 12px !important;
  width: 100% !important;
}

/* Individual Edit Button */
#selectedImageProcessingList .edit-button {
  flex: 1 !important;
  background: #fff !important;
  color: #129ed9 !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  font-family: 'Inter Variable', sans-serif !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 100px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Edit Store Individual Edit Button */
#editStoreSelectedImageProcessingList .edit-button {
  flex: 1 !important;
  background: #fff !important;
  color: #129ed9 !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  font-family: 'Inter Variable', sans-serif !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 100px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

#selectedImageProcessingList .edit-button:hover {
  background: #f8fbfd !important;
  border-color: #129ed9 !important;
  color: #0f8bb8 !important;
  box-shadow: 0 2px 4px rgba(18, 158, 217, 0.1) !important;
  transform: translateY(-1px) !important;
}

/* Edit Store Edit Button Hover */
#editStoreSelectedImageProcessingList .edit-button:hover {
  background: #f8fbfd !important;
  border-color: #129ed9 !important;
  color: #0f8bb8 !important;
  box-shadow: 0 2px 4px rgba(18, 158, 217, 0.1) !important;
  transform: translateY(-1px) !important;
}

#selectedImageProcessingList .edit-button i {
  color: #129ed9 !important;
  font-size: 12px !important;
}

/* Edit Store Edit Button Icons */
#editStoreSelectedImageProcessingList .edit-button i {
  color: #129ed9 !important;
  font-size: 12px !important;
}

/* Image Label */
#selectedImageProcessingList .image-label {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  z-index: 10 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  font-family: 'Inter Variable', sans-serif !important;
}

/* Edit Store Image Label */
#editStoreSelectedImageProcessingList .image-label {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  z-index: 10 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  font-family: 'Inter Variable', sans-serif !important;
}

/* Loading Glow Effect for Images */
.loading-glow-img {
  position: relative !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
}

.loading-glow-img::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(18, 158, 217, 0.2), transparent) !important;
  animation: shimmer 1.5s infinite !important;
  z-index: 1 !important;
  border-radius: 8px !important;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Edit Image Prompt Input */
#editImagePrompt {
  width: 100% !important;
  padding: 10px 14px !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  font-family: 'Inter Variable', sans-serif !important;
  font-size: 14px !important;
  color: #374151 !important;
  background: #fff !important;
  transition: all 0.2s ease !important;
  margin-top: 8px !important;
}

#editImagePrompt:focus {
  outline: none !important;
  border-color: #129ed9 !important;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1) !important;
}

#editImagePrompt::placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
}

/* Responsive Grid Adjustments */
@media (max-width: 1400px) {
  #selectedImageProcessingList {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  #editStoreSelectedImageProcessingList {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 900px) {
  #selectedImageProcessingList {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  #editStoreSelectedImageProcessingList {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}

@media (max-width: 500px) {
  #selectedImageProcessingList {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  #editStoreSelectedImageProcessingList {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}

/* ========== PRODUCT ROW GLOW EFFECT ========== */

/* Product row glow animation - similar to chat input */
.product-row {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-row.row-glow {
  position: relative;
  overflow: hidden;
}

.product-row.row-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(18, 158, 217, 0.15), 
    rgba(18, 158, 217, 0.3), 
    rgba(18, 158, 217, 0.15), 
    transparent
  );
  animation: productRowGlow 2s ease-in-out;
  z-index: 1;
  pointer-events: none;
}

@keyframes productRowGlow {
  0% { 
    left: -100%; 
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% { 
    left: 100%; 
    opacity: 0;
  }
}

/* Ensure content stays above the glow effect */
.product-row > * {
  position: relative;
  z-index: 2;
}

/* Enhanced hover effect for product rows */
.product-row:hover {
  background-color: rgba(18, 158, 217, 0.02);
  border-color: rgba(18, 158, 217, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(18, 158, 217, 0.08);
}

/* ========== IMAGE PROCESSING INDICATORS ========== */

/* AI/BG indicators for processed images */
.image-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  background: rgba(18, 158, 217, 0.9);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

.image-indicator.ai {
  background: linear-gradient(135deg, #129ed9, #0f8bb8);
}

.image-indicator.bg {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Enhanced image container styling */
#selectedImageProcessingList > div {
  border: 1px solid #e1e6f0 !important;
  transition: all 0.2s ease !important;
}

#selectedImageProcessingList > div:has(.image-indicator) {
  border-color: rgba(18, 158, 217, 0.3) !important;
}

#selectedImageProcessingList > div:has(.image-indicator.ai) {
  box-shadow: 0 2px 8px rgba(18, 158, 217, 0.15) !important;
}

#selectedImageProcessingList > div:has(.image-indicator.bg) {
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
}

/* Edit Store Enhanced image container styling */
#editStoreSelectedImageProcessingList > div {
  border: 1px solid #e1e6f0 !important;
  transition: all 0.2s ease !important;
}

#editStoreSelectedImageProcessingList > div:has(.image-indicator) {
  border-color: rgba(18, 158, 217, 0.3) !important;
}

#editStoreSelectedImageProcessingList > div:has(.image-indicator.ai) {
  box-shadow: 0 2px 8px rgba(18, 158, 217, 0.15) !important;
}

#editStoreSelectedImageProcessingList > div:has(.image-indicator.bg) {
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
}

/* Improved image thumbnails */
#selectedImageProcessingList img {
  transition: transform 0.2s ease !important;
}

#selectedImageProcessingList > div:hover img {
  transform: scale(1.02) !important;
}

/* Edit Store Improved image thumbnails */
#editStoreSelectedImageProcessingList img {
  transition: transform 0.2s ease !important;
}

#editStoreSelectedImageProcessingList > div:hover img {
  transform: scale(1.02) !important;
}

/* Edit Image Prompt Input */
#editImagePrompt {
  width: 100% !important;
  padding: 10px 14px !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  font-family: 'Inter Variable', sans-serif !important;
  font-size: 14px !important;
  color: #374151 !important;
  background: #fff !important;
  transition: all 0.2s ease !important;
  margin-top: 8px !important;
}

#editImagePrompt:focus {
  outline: none !important;
  border-color: #129ed9 !important;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1) !important;
}

#editImagePrompt::placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
}

/* Edit Store Image Prompt Input */
#editStoreEditImagePrompt {
  width: 100% !important;
  padding: 10px 14px !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  font-family: 'Inter Variable', sans-serif !important;
  font-size: 14px !important;
  color: #374151 !important;
  background: #fff !important;
  transition: all 0.2s ease !important;
  margin-top: 8px !important;
}

#editStoreEditImagePrompt:focus {
  outline: none !important;
  border-color: #129ed9 !important;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1) !important;
}

#editStoreEditImagePrompt::placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
} 