/* =================================================================
   Upload Manager — Styles
   ================================================================= */

.flux-upload-widget {
  padding: 12px;
}

/* Drop Zone — light mode (app theme); do not use prefers-color-scheme here */
.flux-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 2px dashed var(--gray-300, #cbd5e1);
  border-radius: 10px;
  background: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 100px;
}

.flux-upload-dropzone-icon {
  font-size: 2rem;
  color: #64748b;
}

.flux-upload-dropzone-hint {
  margin: 0.5rem 0 0;
  color: #334155;
  font-size: 0.85rem;
}

.flux-upload-dropzone:hover,
.flux-upload-dragover {
  border-color: #00bf9a;
  background: rgba(0, 212, 170, 0.06);
}

/* Preview Grid */
.flux-upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.flux-upload-thumb {
  position: relative;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: box-shadow 0.15s ease;
}

.flux-upload-thumb:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.flux-upload-thumb-loading,
.flux-upload-thumb-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.5rem;
}

.flux-upload-thumb-info {
  text-align: center;
  width: 100%;
}

.flux-upload-thumb-name {
  display: block;
  font-size: 0.7rem;
  color: #475569;
  word-break: break-all;
  line-height: 1.2;
}

.flux-upload-thumb-size {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
}

.flux-upload-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.65rem;
  color: #ef4444;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  padding: 0;
}

/* Progress Bar */
.flux-upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 0;
}

.flux-upload-progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.flux-upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.flux-upload-progress-text {
  font-size: 0.75rem;
  color: #6366f1;
  font-weight: 600;
  min-width: 36px;
  text-align: right;
}

/* Action Buttons */
.flux-upload-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}

/* Photo Capture (inline) */
.flux-photo-capture {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flux-photo-preview {
  position: relative;
  display: inline-block;
}

.flux-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .flux-upload-preview {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
  }

  .flux-upload-dropzone {
    padding: 16px 12px;
    min-height: 80px;
  }

  .flux-upload-thumb-loading,
  .flux-upload-thumb-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}
