/**
 * Replicate AI Processor - Loading States and UI Styles
 */

/* Loading state for the upload field */
.tee-processing {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.tee-processing input[type="file"] {
  cursor: not-allowed;
}

/* Loading spinner */
.tee-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.tee-loading-spinner .loading-text {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.tee-loading-spinner .spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: tee-spin 1s linear infinite;
}

@keyframes tee-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Version Selector Modal */
.tee-version-selector-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: tee-fadeIn 0.3s ease;
}

@keyframes tee-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tee-version-content,
.tee-version-selector-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 600px; /* Smaller max width */
  width: 100%;
  max-height: 80vh; /* Smaller height */
  overflow-y: auto;
  animation: tee-slideUp 0.3s ease;
}

@keyframes tee-slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.tee-version-content h2,
.tee-version-selector-content h2 {
  margin: 0 0 5px 0;
  font-size: 20px;
  color: #333;
  text-align: center;
}

.tee-version-content p,
.tee-version-selector-content p {
  margin: 0 0 15px 0;
  color: #666;
  text-align: center;
  font-size: 14px;
}

.tee-version-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Always 2 columns */
  gap: 10px;
  margin-bottom: 15px;
}

.tee-version-option {
  position: relative;
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f5f5f5;
}

.tee-version-option:hover {
  border-color: #3498db;
  transform: scale(1.03);
  box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.tee-version-option img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;  /* Limit max height for consistency */
  object-fit: contain;  /* Show full image without cropping */
  background: #f0f0f0;  /* Light background for non-square images */
}

.tee-version-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 15px 10px 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.tee-version-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding-top: 15px;
  border-top: 2px solid #eee;
}

.tee-btn-secondary {
  padding: 12px 30px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tee-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tee-btn-secondary:active {
  transform: translateY(0);
}

/* Regenerate button special style */
.tee-btn-secondary[data-action="regenerate"] {
  background: #28a745;
}

.tee-btn-secondary[data-action="regenerate"]:hover {
  background: #218838;
}

/* Cancel button special style */
.tee-btn-secondary[data-action="cancel"] {
  background: #dc3545;
}

.tee-btn-secondary[data-action="cancel"]:hover {
  background: #c82333;
}

/* Processing selection state */
.tee-version-selector-modal.tee-processing-selection {
  pointer-events: none;
}

.tee-version-selector-modal.tee-processing-selection .tee-version-selector-content {
  opacity: 0.6;
}

.tee-version-selector-modal.tee-processing-selection::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  /* IMPORTANT:
     Keep translate(-50%, -50%) inside the animation keyframes.
     Otherwise the keyframes' transform (rotate) overrides translate and the spinner
     visibly "jumps" diagonally each loop (center → down-right → snap back). */
  animation: tee-spin-centered 1s linear infinite;
}

/* Spinner that stays perfectly centered while rotating */
@keyframes tee-spin-centered {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success/Error states */
.tee-upload-success {
  border-color: #4caf50 !important;
}

.tee-upload-error {
  border-color: #f44336 !important;
}

/* Ensure the upload field wrapper has position relative */
.m-product-custom-field[data-product-custom-field="image_field"],
.tee-custom-field,
.product-form__input {
  position: relative;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .tee-loading-spinner {
    padding: 15px;
    min-width: 150px;
  }
  
  .tee-loading-spinner .loading-text {
    font-size: 12px;
  }
  
  .tee-loading-spinner .spinner {
    width: 24px;
    height: 24px;
  }

  .tee-version-selector-modal {
    padding: 10px;
  }

  .tee-version-content,
  .tee-version-selector-content {
    padding: 15px;
    max-height: 85vh;
  }

  .tee-version-content h2,
  .tee-version-selector-content h2 {
    font-size: 18px;
    margin-bottom: 5px;
  }

  .tee-version-content p,
  .tee-version-selector-content p {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .tee-version-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .tee-version-option img {
    max-height: 200px; /* Smaller max height on mobile */
  }

  .tee-version-label {
    font-size: 12px;
    padding: 10px 5px 5px;
  }

  .tee-version-actions {
    flex-direction: row;
    gap: 8px;
    padding-top: 10px;
  }

  .tee-btn-secondary {
    flex: 1;
    padding: 10px 15px;
    font-size: 13px;
  }
}

/* Loading Modal Styles */
.tee-loading-modal .tee-loading-content {
  text-align: center;
}

.tee-loading-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.tee-robot-drawing {
  position: relative;
  animation: tee-float 3s ease-in-out infinite;
}

@keyframes tee-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Animate robot parts */
.robot-eye-left,
.robot-eye-right {
  animation: tee-blink 4s infinite;
}

@keyframes tee-blink {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0; }
}

.robot-arm {
  animation: tee-draw 2s ease-in-out infinite;
  transform-origin: 85px 65px;
}

@keyframes tee-draw {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-10deg); }
}

.pencil,
.pencil-tip {
  animation: tee-pencil-move 2s ease-in-out infinite;
}

@keyframes tee-pencil-move {
  0%, 100% { transform: rotate(-30deg) translateX(0); }
  50% { transform: rotate(-35deg) translateX(5px); }
}

/* Animate drawing lines */
.drawing-line-1 {
  animation: tee-draw-line 2s ease-in-out infinite;
  animation-delay: 0s;
}

.drawing-line-2 {
  animation: tee-draw-line 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

.drawing-line-3 {
  animation: tee-draw-line 2s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes tee-draw-line {
  0% {
    opacity: 0;
    stroke-dasharray: 0 100;
  }
  50% {
    opacity: 1;
    stroke-dasharray: 100 0;
  }
  100% {
    opacity: 0;
    stroke-dasharray: 100 0;
  }
}

/* Loading progress bar */
.loading-progress {
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
  border-radius: 4px;
  width: 0;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: tee-shimmer 2s infinite;
}

@keyframes tee-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #4CAF50;
}

.loading-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.loading-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
  transition: opacity 0.3s ease;
}

.loading-tip {
  font-size: 13px;
  color: #888;
  margin-top: 15px;
  font-style: italic;
}

/* Additional spinner for loading modal */
.tee-loading-modal .spinner-circle {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  animation: tee-spin 1s linear infinite;
  margin: 0 auto;
}

/* Watermark styles for AI-generated preview images */
.tee-version-option.tee-watermarked {
  position: relative;
  overflow: hidden;
  display: flex;  /* Flexbox to center images */
  align-items: center;
  justify-content: center;
  min-height: 200px;  /* Minimum height for consistency */
}

.tee-version-option .tee-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 20px;  /* Slightly smaller */
  font-weight: 600;  /* Less bold */
  color: rgba(255, 255, 255, 0.35);  /* Reduced opacity from 0.7 to 0.35 */
  text-shadow: 
    1px 1px 2px rgba(0, 0, 0, 0.3),  /* Softer shadow */
    -1px -1px 1px rgba(0, 0, 0, 0.2);  /* Lighter shadow */
  pointer-events: none;
  letter-spacing: 3px;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  white-space: nowrap;
  font-family: 'Arial', sans-serif;
  mix-blend-mode: soft-light;  /* Changed from hard-light to soft-light for more subtlety */
}

/* Ensure proper image display in watermarked containers */
.tee-version-option.tee-watermarked img {
  max-width: 100%;
  height: auto;
  display: block;
  position: relative;
}

/* Notification styles */
.tee-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100000;
  transform: translateX(420px);
  transition: transform 0.3s ease;
}

.tee-notification.tee-notification-show {
  transform: translateX(0);
}

.tee-notification-content {
  padding: 16px 20px;
  position: relative;
}

.tee-notification-icon {
  font-size: 24px;
  margin-right: 12px;
  vertical-align: middle;
}

.tee-notification-message {
  display: inline-block;
  vertical-align: middle;
  max-width: calc(100% - 80px);
  line-height: 1.5;
  color: #333;
}

.tee-notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

.tee-notification-close:hover {
  color: #333;
}

/* Notification types */
.tee-notification-error {
  border-left: 4px solid #f44336;
}

.tee-notification-warning {
  border-left: 4px solid #ff9800;
}

.tee-notification-success {
  border-left: 4px solid #4CAF50;
}

.tee-notification-info {
  border-left: 4px solid #2196F3;
}

/* Notification actions */
.tee-notification-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.tee-notification-btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.tee-notification-btn-primary {
  background: #4CAF50;
  color: white;
}

.tee-notification-btn-primary:hover {
  background: #45a049;
}

.tee-notification-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.tee-notification-btn-secondary:hover {
  background: #e0e0e0;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .tee-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .tee-notification-message {
    max-width: calc(100% - 60px);
  }
}

/* Change selection button */
.tee-change-selection-btn {
  display: inline-block;
  margin: 10px 0;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tee-change-selection-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.tee-change-selection-btn:active {
  transform: translateY(0);
}

/* Modal close button (X) */
.tee-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tee-modal-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.tee-modal-close:active {
  transform: scale(0.9);
}

/* Selected version indicator */
.tee-version-option.selected {
  border-color: #4CAF50 !important;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tee-selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #4CAF50;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
  animation: bounceIn 0.5s;
}

/* Cancel button in reselection modal */
.tee-cancel-btn {
  padding: 10px 24px;
  background: #666;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.tee-cancel-btn:hover {
  background: #555;
  transform: translateY(-2px);
}

/* Bounce animation for selected badge */
@keyframes bounceIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESSIVE/STREAMING UI STYLES
   Used when images load progressively via SSE streaming
   ═══════════════════════════════════════════════════════════════════════════ */

/* Progressive modal header with status */
.tee-progressive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tee-progressive-header h2 {
  margin: 0;
}

.tee-progressive-status {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Progress bar container */
.tee-progress-container {
  margin-bottom: 16px;
}

.tee-progress-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.tee-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

.tee-progress-hint {
  color: #666;
  font-size: 13px;
  margin: 0;
  text-align: center;
}

/* Loading placeholder for images not yet ready */
.tee-loading-placeholder {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  opacity: 0.7;
}

.tee-loading-placeholder .tee-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.tee-placeholder-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: tee-spin-placeholder 1s linear infinite;
}

.tee-placeholder-text {
  color: #888;
  font-size: 13px;
}

@keyframes tee-spin-placeholder {
  to { transform: rotate(360deg); }
}

/* Ready image state */
.tee-version-option.tee-ready {
  opacity: 1;
  cursor: pointer;
  animation: tee-imageAppear 0.5s ease-out;
}

@keyframes tee-imageAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tee-progressive-modal .tee-version-option.tee-ready:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Hide version label in progressive modal - cleaner look */
.tee-progressive-modal .tee-version-label {
  display: none;
}

/* Gender selection UI styles */
.tee-gender-selection {
  margin: 15px 0;
  padding: 12px 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  border: 1px solid #dee2e6;
}

.tee-gender-label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
  font-size: 14px;
}

.tee-gender-options {
  display: flex;
  gap: 10px;
}

.tee-gender-btn {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tee-gender-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.tee-gender-btn.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.tee-gender-btn.selected:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* ═══════════════════════════════════════════════════════════════════
   FULLSCREEN IMAGE ZOOM - allows pinch-to-zoom on mobile
   ═══════════════════════════════════════════════════════════════════ */
.tee-zoom-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.2s ease;
  font-size: 16px;
  opacity: 0.7;
}

.tee-zoom-icon:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
  opacity: 1;
}

.tee-zoom-icon:active {
  transform: scale(0.95);
}

/* Fullscreen overlay for zooming */
.tee-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tee-fadeIn 0.2s ease;
  /* Allow pinch-to-zoom inside */
  touch-action: pinch-zoom pan-x pan-y;
  overflow: auto;
}

.tee-fullscreen-close {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 28px;
  cursor: pointer;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tee-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.tee-fullscreen-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 100002;
  animation: tee-fadeIn 0.3s ease 0.5s both;
}

.tee-fullscreen-image-container {
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tee-fullscreen-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  /* Enable pinch zoom on the image */
  touch-action: pinch-zoom pan-x pan-y;
}

/* Select button in fullscreen */
.tee-fullscreen-select {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  z-index: 100002;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.2s ease;
}

.tee-fullscreen-select:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.tee-fullscreen-select:active {
  transform: translateX(-50%) scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════
   FAILED IMAGE SLOT STYLES
   Shows when individual image generation fails
   ═══════════════════════════════════════════════════════════════════ */
.tee-version-option.tee-failed {
  background: linear-gradient(135deg, #ffeaea 0%, #ffdddd 100%);
  opacity: 0.6;
  cursor: not-allowed;
}

.tee-failed-content {
  color: #c00;
}

.tee-failed-icon {
  font-size: 24px;
}

/* ═══════════════════════════════════════════════════════════════════
   BACKGROUND REMOVAL OVERLAY
   Shows when removing background from selected image
   ═══════════════════════════════════════════════════════════════════ */
.tee-bg-removal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000001;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: tee-overlay-fade-in 0.2s ease;
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

.tee-bg-removal-overlay.tee-fade-out {
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

@keyframes tee-overlay-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tee-bg-removal-content {
  background: white;
  border-radius: 16px;
  padding: 32px 48px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: tee-fade-in 0.3s ease;
}

@keyframes tee-fade-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.tee-bg-removal-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: tee-spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes tee-spin {
  to { transform: rotate(360deg); }
}

.tee-bg-removal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.tee-bg-removal-subtitle {
  font-size: 14px;
  color: #666;
}