/* Shopping list: the cart in the header, the people stepper, the list panel
   and the add/remove control in the recipe detail. */

/* Header cart: round, the height of the profile chip, with a count badge. */
.cart-btn {
  position: relative; flex: none;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
}
.cart-btn:hover { border-color: var(--ink-faint); color: var(--ink); }
.cart-icon { display: flex; }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--bg);
  font-size: 10px; font-weight: 700; line-height: 14px; text-align: center;
}

/* [ − ]  3 people  [ + ] */
.stepper {
  display: inline-flex; align-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.stepper-btn {
  width: 32px; height: 32px;
  border: none; background: none; cursor: pointer;
  color: var(--ink); font-size: 18px; line-height: 1;
  border-radius: 50%;
}
.stepper-btn:hover:not(:disabled) { background: var(--surface-sunk); }
.stepper-btn:disabled { color: var(--ink-faint); cursor: default; }
.stepper-value { font-size: 13.5px; font-weight: 600; min-width: 68px; text-align: center; }

/* Recipe detail: add to / on the shopping list. */
.detail-shop {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 12px;
}
.detail-shop-label { font-size: 13.5px; color: var(--ink-soft); }

/* The panel. */
.shop-recipes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.shop-recipe {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 10px 10px 12px;
}
.shop-recipe-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-recipe-title .name { font-weight: 600; font-size: 14.5px; }
.shop-recipe-title .meta { font-size: 12.5px; color: var(--ink-faint); }
.shop-remove {
  flex: none; width: 28px; height: 28px;
  border: none; background: none; cursor: pointer;
  color: var(--ink-faint); font-size: 14px; border-radius: 50%;
}
.shop-remove:hover { background: var(--surface-sunk); color: var(--ink); }

.shop-lines {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.shop-lines li { padding: 9px 12px; font-size: 14.5px; }
.shop-lines li + li { border-top: 1px solid var(--line); }
.shop-note { font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }

.shop-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.shop-clear { color: var(--danger); }

.shop-help { margin-top: 20px; font-size: 13.5px; color: var(--ink-soft); }
.shop-help summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.shop-help-steps { margin: 10px 0 0; padding-left: 20px; line-height: 1.5; }
.shop-help-steps li + li { margin-top: 4px; }

/* Phones: stepper and remove wrap under the title instead of squeezing it. */
@media (max-width: 420px) {
  .shop-recipe { flex-wrap: wrap; }
  .shop-recipe-title { flex-basis: 100%; }
}
