@layer sections {
/* ── Photo upload / extraction ──────────────────────────── */
.photo-upload { padding-bottom: 4px; }

.photo-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-slow), background var(--t-slow);
}
.photo-dropzone--active {
  border-color: #1D9E75;
  background: oklch(97% 0.02 165);
}
.photo-dropzone-icon { font-size: 26px; margin-bottom: 10px; color: var(--faint); }
.photo-dropzone-text { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.photo-dropzone-sub  { font-size: 12px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.photo-browse-btn    { display: inline-block; }

.extract-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--r-md);
  display: block;
  margin-bottom: 12px;
}

.extract-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.extract-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: oklch(90% 0.05 165);
  overflow: hidden;
}
.extract-bar-fill {
  height: 100%;
  background: #1D9E75;
  border-radius: 2px;
  animation: extractBarAnim 1.6s ease-in-out infinite;
}
@keyframes extractBarAnim {
  0%   { width: 5%;  margin-left: 0; }
  50%  { width: 60%; margin-left: 20%; }
  100% { width: 5%;  margin-left: 95%; }
}
.extract-progress-label { font-size: 12px; color: var(--faint); white-space: nowrap; }

.extract-error {
  background: oklch(95% 0.03 55);
  color: oklch(30% 0.08 55);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 12px;
}

/* Extraction success banner (shown at top of formWrap) */
.extract-success-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--sage-bg);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.extract-success-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--r);
  flex-shrink: 0;
}
.extract-success-info { min-width: 0; flex: 1; }
.extract-success-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.extract-success-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.extract-success-ingredients { font-size: 12px; color: var(--muted); line-height: 1.5; }
}
