/**
 * File Badge Styles
 * Visual indicators for original vs new uploaded files in edit mode
 * Created: 2025
 * Updated: October 2025 - Compact overlay badges on file icons
 */

.file-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Overlay badge - positioned on file icon (lower left) */
.file-badge-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 1px 3px;
  border-radius: 0 4px 0 8px; /* Rounded only on top-right corner */
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.2px;
  z-index: 10;
  backdrop-filter: blur(4px);
  line-height: 1.1;
}

/* Original file badge - Green theme (protected) */
.file-badge-original {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

/* Enhanced background for overlay version */
.file-badge-original.file-badge-overlay {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 1);
  color: #ffffff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* New file badge - Blue theme (new upload) */
.file-badge-new {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

/* Enhanced background for overlay version */
.file-badge-new.file-badge-overlay {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%);
  border: 1px solid rgba(59, 130, 246, 1);
  color: #ffffff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Hover effects for overlay badges */
.file-badge-overlay:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.file-badge-original.file-badge-overlay:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(5, 150, 105, 1) 100%);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
}

.file-badge-new.file-badge-overlay:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(37, 99, 235, 1) 100%);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.5);
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .file-badge {
    font-size: 8px;
    padding: 1px 6px;
    letter-spacing: 0.3px;
  }
  
  .file-badge-overlay {
    font-size: 5px;
    padding: 0.5px 2px;
    letter-spacing: 0.1px;
  }
}

/* Animation on mount */
@keyframes badge-fade-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.file-badge {
  animation: badge-fade-in 0.2s ease-out;
}
