/* ═══════════════════════════════════════════════════════════════════════════
   UPLOADS STYLES v2 - rAi Builder (Light Theme)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Upload button in chat input */
.chat-input-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 8px;
}

.btn-upload {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #e0d5d0);
  background: var(--bg-surface, #fff);
  color: var(--text-muted, #9a8c85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-upload:hover {
  background: var(--bg-hover, #f5f0ec);
  color: var(--accent, #6b2d3c);
  border-color: var(--accent, #6b2d3c);
}

.btn-upload:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════
   UPLOAD PROGRESS BAR
   ═══════════════════════════════════════ */

.upload-progress {
  padding: 8px 12px;
  background: var(--bg-surface, #fff);
  border-radius: 8px;
  margin: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-subtle, #e0d5d0);
}

.upload-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated, #f5f0ec);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent, #6b2d3c);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.upload-progress-fill.indeterminate {
  width: 30% !important;
  animation: indeterminate 1.2s ease-in-out infinite;
}

@keyframes indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.upload-progress-text {
  font-size: 11px;
  color: var(--text-muted, #9a8c85);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════ */

.upload-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-subtle, #e0d5d0);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary, #2c1810);
  animation: toastIn 0.3s ease;
  max-width: 380px;
}

.upload-toast.success { border-color: #22c55e; }
.upload-toast.error { border-color: #ef4444; }

.upload-toast.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   PROJECT UPLOADS PANEL
   ═══════════════════════════════════════ */

.project-uploads-panel {
  padding: 6px 10px 8px;
  border-top: 1px solid var(--border-subtle, #e0d5d0);
  margin-top: 6px;
  background: var(--bg-elevated, #faf7f5);
  border-radius: 0 0 8px 8px;
}

/* Header with summary + clear button */
.uploads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 4px;
}

.uploads-summary {
  font-size: 10px;
  color: var(--text-muted, #9a8c85);
  font-weight: 500;
}

.uploads-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.5;
  transition: all 0.15s ease;
}

.uploads-clear-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}

/* File list */
.project-uploads-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
  max-height: 200px;
  overflow-y: auto;
}

/* Single file item */
.project-upload-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: var(--bg-surface, #fff);
  border-radius: 6px;
  font-size: 11px;
  transition: background 0.15s ease;
  border: 1px solid transparent;
}

.project-upload-item:hover {
  background: var(--bg-hover, #f0ebe7);
  border-color: var(--border-subtle, #e0d5d0);
}

/* File preview (icon or image thumb) */
.file-preview {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  overflow: hidden;
  background: var(--bg-elevated, #f5f0ec);
}

.file-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.file-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary, #2c1810);
}

.file-size {
  font-size: 10px;
  color: var(--text-muted, #9a8c85);
  white-space: nowrap;
  flex-shrink: 0;
}

.file-delete {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: var(--text-muted, #9a8c85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.project-upload-item:hover .file-delete {
  opacity: 1;
}

.file-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* More files indicator */
.more-files {
  font-size: 10px;
  color: var(--text-muted, #9a8c85);
  padding: 2px 6px;
  text-align: center;
}

/* ═══════════════════════════════════════
   DROPZONE
   ═══════════════════════════════════════ */

.project-uploads-dropzone {
  border: 1px dashed var(--border-subtle, #d4cac5);
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.project-uploads-dropzone:hover {
  border-color: var(--accent, #6b2d3c);
  background: rgba(107, 45, 60, 0.03);
}

.project-uploads-dropzone.drag-over {
  border-color: var(--accent, #6b2d3c);
  background: rgba(107, 45, 60, 0.06);
  border-style: solid;
}

.project-uploads-dropzone.compact {
  padding: 5px 10px;
}

.dropzone-hint {
  font-size: 11px;
  color: var(--text-muted, #9a8c85);
}

.project-uploads-dropzone:hover .dropzone-hint {
  color: var(--accent, #6b2d3c);
}

/* Active project adjustments */
.project-card.active .project-uploads-panel {
  background: rgba(107, 45, 60, 0.03);
}
