/* Progressive search-results surface.
   Layout: _design/search-loading-desktop.html; card spec:
   _design/recipe-card-spec.html (2026-07-15) — every card FIXED 200x322,
   two-line title clamp, five-metric nutrition band pinned to the bottom.
   Cards land with find-time data, nutrition + adapt badge fill in per
   card; failures dim and leave. Clusters scroll HORIZONTALLY, the pane
   scrolls vertically. Tokens come from colors.css. */

/* ── status line + progress hairline ─────────────────────────────── */
.src-surface { padding: 2px 2px 8px; }
.src-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--bf-gray-500, #6c757d);
  min-height: 16px; margin: 2px 2px 0;
}
.src-status__done {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--bf-green, #1f7a4a); font-weight: 600;
}
.src-hairline {
  height: 2px; background: var(--bf-gray-100, #e9ecef);
  border-radius: 2px; margin: 12px 2px 0; overflow: hidden;
}
.src-hairline > i {
  display: block; height: 100%; border-radius: 2px;
  background: var(--bf-primary-500, #fe6211);
  transition: width .6s ease;
}
.src-spin {
  width: 12px; height: 12px; flex: none; box-sizing: border-box;
  border: 2px solid var(--bf-primary-200, #ffd1a8);
  border-top-color: var(--bf-primary-500, #fe6211);
  border-radius: 50%; animation: src-spin .8s linear infinite;
}
@keyframes src-spin { to { transform: rotate(360deg); } }

/* ── clusters: header + horizontal scroller ───────────────────────── */
.src-cluster { margin-top: 18px; }
.src-cluster__head {
  display: flex; align-items: center; gap: 9px; padding: 0 2px 12px;
}
.src-cluster__head h3 {
  font-size: 15px; font-weight: 700; margin: 0;
  color: var(--bf-gray-800, #212529); letter-spacing: -0.01em;
}
.src-cluster__count {
  font-size: 11px; font-weight: 600; color: var(--bf-gray-500, #6c757d);
  background: var(--bf-gray-100, #e9ecef); padding: 2px 8px; border-radius: 999px;
}
.src-cluster__scroller { position: relative; }
.src-cluster__row {
  display: flex; gap: 16px; align-items: flex-start;
  overflow-x: auto; padding: 4px 2px 12px;
  scrollbar-width: thin;
}
.src-grid { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 2px; }
/* Cookbook / All-Recipes flat grids: spec cards sit directly in the
   bootstrap .row (plate cards keep their col-* cells there) — margins
   reproduce the .src-grid gutter rhythm. Cluster .recipe-row scrollers
   space with their own gap, so this must not match them. */
.row > .src-card { margin: 0 8px 16px; }
.src-empty { color: var(--bf-gray-500, #6c757d); font-size: 13px; padding: 12px 2px; }

/* ── result card — FIXED 200x322, every card identical ────────────── */
.src-card {
  width: 200px; height: 322px; flex: none; overflow: hidden;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bf-gray-100, #e9ecef);
  border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}
.src-card:hover {
  box-shadow: 0 12px 24px rgba(20,40,69,0.12);
  transform: translateY(-3px);
}
.src-card__img {
  height: 104px; flex: none; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 9px; box-sizing: border-box;
  background: var(--bf-gray-100, #e9ecef);
}
.src-card__img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.src-card__src {
  position: relative; font-size: 10px; font-weight: 600;
  color: var(--bf-gray-700, #343a40); background: rgba(255,255,255,0.92);
  padding: 2px 8px; border-radius: 999px; max-width: 80%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.src-card__bm {
  position: absolute; top: 9px; right: 9px; width: 28px; height: 28px;
  border-radius: 999px; background: rgba(255,255,255,0.92);
  border: 1px solid var(--bf-gray-200, #dee2e6);
  display: flex; align-items: center; justify-content: center;
}
.src-card__body {
  flex: 1; min-height: 0; padding: 11px 12px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
/* two-line clamp; both lines reserved so short and long titles align */
.src-card__title {
  font-size: 13.5px; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.005em; min-height: 34px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.src-card__title a { color: var(--bf-gray-800, #212529); text-decoration: none; }
.src-card__title a:hover { color: var(--bf-primary-600, #ef4707); }
.src-card__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--bf-gray-400, #adb5bd); white-space: nowrap;
}
.src-card__stars .star, .src-card__stars { letter-spacing: 0.5px; }
.src-card__stars .star { color: var(--bf-gray-200, #dee2e6); }
.src-card__stars .star.filled { color: #ffc107; }
.src-card__stars.none { color: var(--bf-gray-200, #dee2e6); }
.src-card__time { color: var(--bf-gray-400, #adb5bd); }
.src-card__time b { color: var(--bf-gray-600, #495057); }
/* key ingredients — quiet comma-separated line, clamped to three lines */
.src-card__ings {
  font-size: 10.5px; line-height: 1.5; color: var(--bf-gray-500, #6c757d);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.src-card__spacer { flex: 1; }

/* nutrition — five equal cells, pinned to the bottom edge */
.src-card__nut { display: flex; border-top: 1px solid #f1f3f5; padding-top: 9px; }
.src-card__nut .cell { flex: 1; text-align: center; padding: 0 1px; }
.src-card__nut .cell + .cell { border-left: 1px solid #f1f3f5; }
.src-card__nut .v {
  font-size: 12px; font-weight: 700; color: var(--bf-gray-800, #212529);
  line-height: 1.1; letter-spacing: -0.02em;
}
.src-card__nut .v small {
  font-size: 8px; font-weight: 600; color: var(--bf-gray-400, #adb5bd);
}
.src-card__nut .l {
  font-size: 7.5px; color: var(--bf-gray-400, #adb5bd);
  text-transform: uppercase; letter-spacing: 0.02em; margin-top: 2px;
  white-space: nowrap;
}

/* quiet adapt badge */
.src-card__adapt {
  display: flex; align-items: center; gap: 6px; margin-top: 9px;
  font-size: 10.5px; font-weight: 600; color: var(--bf-primary-700, #c63208);
}
.src-card__adapt i { font-size: 10px; }

/* per-card calculating slot (reserves the settled footprint) + shimmer */
.src-card__calc { border-top: 1px solid #f1f3f5; padding-top: 9px; display: flex; flex-direction: column; gap: 7px; }
.src-card__calc.flat { border-top: none; }
.src-card__calclab { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--bf-gray-400, #adb5bd); }
@keyframes src-sh { 0% { background-position: -160px 0; } 100% { background-position: 220px 0; } }
.src-sk {
  background: linear-gradient(90deg, #f1f3f5 25%, #e9ecef 37%, #f1f3f5 63%);
  background-size: 300px 100%; animation: src-sh 1.4s ease infinite; border-radius: 5px;
}

/* dropped-on-failure */
.src-card.drop { opacity: 0.46; }
.src-card.drop:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.src-card__dropnote {
  display: flex; align-items: center; gap: 6px; font-size: 9.5px;
  color: var(--bf-gray-400, #adb5bd);
  border-top: 1px solid #f1f3f5; margin-top: 9px; padding-top: 9px;
}

/* searching-phase skeleton cards — same footprint as the real card */
.src-skcard { width: 200px; height: 322px; }
.src-skcard .src-card__img { border-radius: 0; }
