/* ===== FILE UPLOADER COMPONENT ===== */

.uploader {
  position: relative;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card2);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--gold3);
  background: rgba(201, 168, 76, 0.04);
}
.drop-zone.drag-over { border-color: var(--gold); }

.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  padding: 0;
}

.drop-icon {
  font-size: 36px;
  color: var(--gold3);
  margin-bottom: 10px;
  display: block;
  pointer-events: none;
}
.drop-text {
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.drop-text strong { color: var(--gold); }
.drop-hint {
  font-size: 11px;
  color: #4a4035;
  margin-top: 6px;
  pointer-events: none;
}

/* Single preview (cover photo) */
.cover-preview-wrap {
  margin-top: 14px;
  display: none;
}
.cover-preview-wrap.visible { display: block; }
.cover-preview {
  position: relative;
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cover-preview img {
  display: block;
  max-height: 240px;
  max-width: 100%;
  object-fit: cover;
}
.cover-preview-remove {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: #f87171;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}
.cover-preview-remove:hover { background: var(--danger); color: #fff; }

/* Upload progress */
.upload-progress {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.upload-progress.visible { display: flex; align-items: center; gap: 10px; }
.progress-bar-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Error / success messages under uploader */
.upload-msg {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius);
  border-left: 3px solid;
}
.upload-msg.visible { display: block; }
.upload-msg.error   { background: rgba(155,35,53,0.15); border-color: #f87171; color: #f87171; }
.upload-msg.success { background: rgba(26,107,60,0.15); border-color: #4ade80; color: #4ade80; }

/* Multi-file queue */
.file-queue {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12px;
}
.file-queue-thumb {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--card);
}
.file-queue-name {
  flex: 1;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-queue-status {
  font-size: 11px;
  white-space: nowrap;
}
.fq-pending  { color: var(--muted); }
.fq-loading  { color: var(--gold); }
.fq-done     { color: #4ade80; }
.fq-error    { color: #f87171; }

/* Existing photo URL as fallback */
.url-fallback-toggle {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  margin-top: 8px;
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.url-fallback-toggle:hover { color: var(--gold); }
.url-fallback {
  display: none;
  margin-top: 10px;
}
.url-fallback.visible { display: block; }
