/* Visual Enhancements for Image Upload Features */

/* Drag & Drop Zone Styling */
#imageUrl,
#editImageUrl {
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
}

/* Drag over effect */
#imageUrl.dragging,
#editImageUrl.dragging {
  border-color: #4af6ff !important;
  background-color: rgba(74, 246, 255, 0.1) !important;
  box-shadow: 0 0 15px rgba(74, 246, 255, 0.3) !important;
  transform: scale(1.02);
}

/* Upload status animations */
#gifStatus {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for uploading state */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.uploading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Drop zone indicator */
.drop-zone-active::before {
  content: '📎 Drop your image here';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(74, 246, 255, 0.95);
  color: #1a1a2e;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(74, 246, 255, 0.5);
  animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Enhanced placeholder styling */
#imageUrl::placeholder,
#editImageUrl::placeholder {
  opacity: 0.7;
  font-style: italic;
}

/* Success feedback */
.upload-success {
  animation: successPulse 0.6s ease;
}

@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 246, 255, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(74, 246, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 246, 255, 0);
  }
}

/* Loading spinner for upload status */
.upload-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(74, 246, 255, 0.3);
  border-top-color: #4af6ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* Tooltip for drag & drop */
.image-upload-tooltip {
  position: relative;
}

.image-upload-tooltip::after {
  content: 'Paste (Ctrl+V) or Drag & Drop images here';
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(42, 42, 64, 0.95);
  color: #4af6ff;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-upload-tooltip:focus::after,
.image-upload-tooltip:hover::after {
  opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .drop-zone-active::before {
    font-size: 12px;
    padding: 10px 20px;
  }
  
  .image-upload-tooltip::after {
    content: 'Paste or drop image';
    font-size: 11px;
    padding: 6px 12px;
  }
}

/* Dark theme enhancements */
@media (prefers-color-scheme: dark) {
  #imageUrl:focus,
  #editImageUrl:focus {
    background-color: rgba(42, 42, 64, 0.8);
  }
}

/* File type validation feedback */
.invalid-file-type {
  border-color: #ef4444 !important;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Progress indicator */
.upload-progress {
  position: relative;
  overflow: hidden;
}

.upload-progress::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #4af6ff, #4facfe);
  animation: progressBar 2s ease-in-out infinite;
}

@keyframes progressBar {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}


