/* Upload Page Styles */

.upload-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
.upload-header {
  text-align: center;
  margin-bottom: 2rem;
}

.upload-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  color: #1e293b;
}

.upload-header .subtitle {
  margin: 0;
  color: #64748b;
}

/* Drop Zone */
.drop-zone {
  background: #f8fafc;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.drop-zone.drag-over {
  border-color: #3b82f6;
  background: #dbeafe;
  transform: scale(1.02);
}

.drop-zone-content {
  transition: opacity 0.2s;
}

.drop-zone.drag-over .drop-zone-content {
  opacity: 0.3;
}

.drop-zone-hover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.drop-zone.drag-over .drop-zone-hover {
  opacity: 1;
}

.drop-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

.drop-icon-large {
  font-size: 5rem;
  color: #3b82f6;
  animation: pulse 1s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.drop-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.drop-subtext {
  color: #94a3b8;
  margin: 0.5rem 0;
}

.file-select-btn {
  cursor: pointer;
  margin: 1rem 0;
}

.supported-formats {
  font-size: 0.875rem;
  color: #64748b;
  margin: 1rem 0 0.25rem 0;
}

.max-size {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

/* Upload Options */
.upload-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.option-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.option-toggle input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 10px;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.option-toggle input:checked + .toggle-slider {
  background: #3b82f6;
}

.option-toggle input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.9rem;
  color: #374151;
}

.source-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.source-selector label {
  font-size: 0.9rem;
  color: #64748b;
}

.source-selector select {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 180px;
}

/* Upload Queue */
.upload-queue {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.queue-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1e293b;
}

.queue-actions {
  display: flex;
  gap: 0.5rem;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.empty-queue {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
}

.empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Queue Item */
.queue-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.queue-item.uploading {
  border-color: #3b82f6;
  background: #eff6ff;
}

.queue-item.completed {
  border-color: #22c55e;
  background: #f0fdf4;
}

.queue-item.error {
  border-color: #ef4444;
  background: #fef2f2;
}

.file-icon {
  font-size: 2rem;
  width: 50px;
  text-align: center;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  gap: 1rem;
}

.file-progress {
  width: 150px;
}

.progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.queue-item.completed .progress-fill {
  background: #22c55e;
}

.queue-item.error .progress-fill {
  background: #ef4444;
}

.progress-text {
  font-size: 0.75rem;
  color: #64748b;
  text-align: right;
}

.file-status {
  width: 100px;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.pending {
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.uploading {
  background: #dbeafe;
  color: #2563eb;
}

.status-badge.processing {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.completed {
  background: #dcfce7;
  color: #16a34a;
}

.status-badge.error {
  background: #fee2e2;
  color: #dc2626;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
}

.file-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  color: #94a3b8;
  transition: color 0.2s;
}

.file-actions button:hover {
  color: #1e293b;
}

.file-actions button.remove:hover {
  color: #ef4444;
}

/* Recent Uploads */
.recent-uploads {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recent-uploads h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #1e293b;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
}

.recent-item-icon {
  font-size: 1.5rem;
}

.recent-item-info {
  flex: 1;
}

.recent-item-name {
  font-weight: 500;
  color: #1e293b;
}

.recent-item-meta {
  font-size: 0.8rem;
  color: #64748b;
}

.recent-item-status {
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #f1f5f9;
  color: #374151;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 640px) {
  .upload-container {
    padding: 1rem;
  }

  .upload-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .queue-item {
    flex-wrap: wrap;
  }

  .file-progress {
    width: 100%;
    order: 5;
  }

  .file-status {
    width: auto;
  }
}
