/* Drag & Drop Upload Container */
.upload-container {
  width: 100%;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
}

.upload-container:hover, .upload-container.drag-active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon {
  width: 64px;
  height: 64px;
  fill: var(--text-tertiary);
  transition: fill var(--transition-fast), transform var(--transition-fast);
}

.upload-container:hover .upload-icon {
  fill: var(--primary);
  transform: translateY(-4px);
}

.upload-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.upload-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Batch File List */
.batch-file-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.batch-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.file-info-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.file-size {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-remove-file {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-remove-file:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.btn-remove-file svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 48px);
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  position: relative;
  overflow: hidden;
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-info { border-left: 4px solid #3b82f6; }
.toast-warning { border-left: 4px solid #f59e0b; }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success .toast-icon { fill: #10b981; }
.toast-error .toast-icon { fill: #ef4444; }
.toast-info .toast-icon { fill: #3b82f6; }
.toast-warning .toast-icon { fill: #f59e0b; }

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.toast-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

@keyframes toastSlideIn {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Loading Spinners & Overlays */
.spinner-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: var(--radius-lg);
  z-index: 100;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

body.dark-theme .spinner-overlay {
  background: rgba(15, 23, 42, 0.85);
}

.spinner-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
}

/* Skeleton loader */
.skeleton {
  animation: skeleton-loading 1.5s ease-in-out infinite;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}
