/* ==========================================================================
   Food label check
   Layered on top of spin-check.css, which supplies the card, button and
   symptom-grid styling every tool on this site shares. Only what is specific
   to a free-text analyser lives here.
   ========================================================================== */

.food-check-label {
  display: block;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: 6px;
}

.food-check-hint {
  margin: 0 0 12px;
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.55;
}

#food-check-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 132px;
}

#food-check-input::placeholder { color: #94a3b8; }

#food-check-input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.food-check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

/* --- Verdict ------------------------------------------------------------- */

.food-check-verdict {
  margin: 26px 0 6px;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  font-size: 1rem;
  line-height: 1.6;
}
.food-check-verdict p { margin: 0; }
.food-check-verdict-good { background: #f0fdf4; border-left: 5px solid #16a34a; }
.food-check-verdict-warn { background: #fff7ed; border-left: 5px solid #ea580c; }
.food-check-verdict-info { background: #f0f7ff; border-left: 5px solid var(--brand); }

/* --- Result groups ------------------------------------------------------- */

.food-check-group { margin-top: 26px; }

.food-check-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  color: var(--text);
}

.food-check-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
  background: #64748b;
}

.food-check-group-note {
  margin: 0 0 12px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--muted);
}

.food-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.food-check-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 0 10px 10px 0;
  background: #fff;
}

.food-check-item-name {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  color: var(--text);
}

.food-check-share {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #7c2d12;
  background: #ffedd5;
}

.food-check-why {
  margin: 6px 0 0;
  font-size: .94rem;
  line-height: 1.6;
  color: var(--muted);
}

.food-check-more {
  display: inline-block;
  margin-top: 9px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--brand-strong);
}

/* Per-group accents. Same vocabulary as the site's callouts: green means
   good, orange means look at this, slate means context. */
.food-check-risk  { border-left-color: #ea580c; background: #fffbf7; }
.food-check-vague { border-left-color: #dc2626; background: #fef7f7; }
.food-check-good  { border-left-color: #16a34a; background: #f7fdf9; }
.food-check-soft  { border-left-color: #64748b; background: #f8fafc; }

.food-check-risk-group  .food-check-count { background: #ea580c; }
.food-check-vague-group .food-check-count { background: #dc2626; }
.food-check-good-group  .food-check-count { background: #16a34a; }

/* --- What to do next ----------------------------------------------------- */

.food-check-next {
  margin-top: 30px;
  padding: 20px 22px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.food-check-next h3 {
  margin: 0 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  color: var(--text);
}

.food-check-next ol { margin: 0; padding-left: 1.25rem; }
.food-check-next li { margin-bottom: .6em; line-height: 1.6; font-size: .96rem; }
.food-check-next li:last-child { margin-bottom: 0; }

.food-check-app-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .94rem;
  line-height: 1.6;
  color: var(--muted);
}
.food-check-app-note a { font-weight: 700; color: var(--brand-strong); }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 640px) {
  .food-check-actions { flex-direction: column; align-items: stretch; }
  .food-check-actions .spin-check-btn-primary,
  .food-check-actions .spin-check-reset { width: 100%; text-align: center; }
  .food-check-share { margin-left: 0; margin-top: 6px; display: block; width: max-content; }
}

/* --- Tap targets ---------------------------------------------------------
   The UX pass set 44px as the minimum touch target across the site. The two
   controls this tool adds fell short when measured in the browser: the shared
   reset button renders at 28px and the "read about X" links at 23px. Both are
   raised here rather than in the shared stylesheet, so nothing else moves. */

.food-check-actions .spin-check-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
}

.food-check-more {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
}
