/* File Upload Component Styles */

.file-upload-section {
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin: 24px 0;
  border: 1px solid var(--border-color);
}

.file-upload-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.file-upload-description {
  margin: 0 0 20px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.file-upload-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

/* File Type Information */
.file-types-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.file-types-accepted {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.file-types-accepted strong {
  color: var(--text-primary);
}

/* File Type Selector */
.file-type-selector {
  display: none;
}

/* No icons: file names only */

/* Dropzone */
.file-upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-primary);
}

.file-upload-dropzone:hover {
  border-color: var(--primary-color);
  background: rgba(59, 130, 246, 0.03);
}

.file-upload-dropzone.dragover {
  border-color: var(--primary-color);
  background: rgba(59, 130, 246, 0.08);
  transform: scale(1.02);
}

.dropzone-icon {
  display: block;
  margin: 0 auto 12px;
  color: var(--text-secondary);
  width: 48px;
  height: 48px;
}

.dropzone-text {
  margin: 0 0 8px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.dropzone-hint {
  display: block;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin: 0;
}

/* Progress Bar */
.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

#progressPercent {
  font-weight: 600;
  color: var(--primary-color);
}

/* Messages */
.upload-error,
.upload-success {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
  animation: slideIn 0.3s ease;
}

.upload-error {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
}

.upload-success {
  background: #efe;
  border: 1px solid #cfc;
  color: #3c3;
}

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

/* Uploaded Files List */
.uploaded-files-list {
  display: none;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.uploaded-files-title {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.files-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  background: var(--bg-primary);
  border-radius: 6px;
}

/* File Item */
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
}

/* file-item-icon removed — display file names only */

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

.file-item-name {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.3;
}

.file-item-meta {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.staged-label {
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-left: 6px;
}

.staged-actions {
  display: none;
  margin-top: 8px;
  gap: 8px;
}

/* Hide internal staged actions when using sidebar Save button */
.file-upload-section .staged-actions {
  display: none !important;
}

.file-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
  .file-upload-section {
    padding: 16px;
  }

  .file-upload-dropzone {
    padding: 24px 16px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-item-actions {
    width: 100%;
  }

  .file-item-actions button {
    flex: 1;
  }

  .progress-text {
    flex-direction: column;
    gap: 6px;
  }
}
