/* SassPan — the 11/24 build: "In your kitchen" on the + sheet, kitchen search, cook mode, one-tap meal moves,
   batches on recipe cards, and the "I made this" sheet. Uses the tokens from styles.css / polish.css. */

/* ---------- + sheet: what you have, first ---------- */
.onhand { margin: 2px 0 14px; }
.onhand__title {
  display: flex; align-items: center; gap: 8px; margin: 4px 2px 6px;
  font: 700 0.78rem/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text);
}
.onhand__title .icon { width: 16px; height: 16px; }
.onhand__title--all { color: var(--muted); margin-top: 6px; }
.onhand__count {
  margin-left: 2px; min-width: 20px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: var(--accent-soft); color: var(--accent-text); letter-spacing: 0; font-size: 0.75rem;
}
.onhand__hint { margin: 0 2px 8px; }
.onhand__list {
  display: grid; gap: 1px; overflow: hidden; border-radius: 16px;
  background: var(--hairline); box-shadow: var(--elev-1);
}
.onhand__row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px;
  border: 0; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.onhand__row:hover { background: var(--surface-2); }
.onhand__row:active { transform: scale(0.985); }
.onhand__row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.onhand__row[disabled] { opacity: 0.55; cursor: default; }
.onhand__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.onhand__name { font-weight: 600; overflow-wrap: anywhere; }
.onhand__spot { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.85rem; }
.onhand__spot .icon { width: 15px; height: 15px; flex: none; }
.onhand__spot.is-soon { color: var(--heads-up); font-weight: 600; }
.onhand__left { flex: none; display: grid; justify-items: end; line-height: 1.05; font-variant-numeric: tabular-nums; }
.onhand__left b { font-size: 1.15rem; color: var(--accent-text); }
.onhand__left small { font-size: 0.72rem; color: var(--muted); }

/* ---------- Kitchen search ---------- */
.k-search { margin: 4px 0 12px; }

/* ---------- Recipe card: cook mode ---------- */
.cookmode-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  text-align: left; font: inherit; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.cookmode-toggle > .icon { width: 22px; height: 22px; color: var(--accent-text); flex: none; }
.cookmode-toggle__text { flex: 1; display: grid; gap: 2px; }
.cookmode-toggle__text small { color: var(--muted); font-size: 0.82rem; }
.cookmode-toggle__switch {
  position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--track);
  transition: background-color 0.18s ease;
}
.cookmode-toggle__switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.18s ease;
}
.cookmode-toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.cookmode-toggle[aria-pressed="true"] .cookmode-toggle__switch { background: var(--accent); }
.cookmode-toggle[aria-pressed="true"] .cookmode-toggle__switch::after { transform: translateX(18px); }
.cookmode-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.is-cooking .recipe-card__list { font-size: 1.08rem; line-height: 1.55; }
.is-cooking [data-ing], .is-cooking [data-step] {
  cursor: pointer; border-radius: 10px; padding: 6px 8px; margin-inline: -8px;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.is-cooking [data-ing]:hover, .is-cooking [data-step]:hover { background: var(--surface-2); }
.is-cooking [data-ing]:focus-visible, .is-cooking [data-step]:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.is-cooking .is-done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); opacity: 0.7; }
.is-cooking .is-done strong { color: inherit; }
.is-cooking .recipe-card__steps .is-next { background: var(--accent-soft); }

/* ---------- Entry card: tap a meal to move it ---------- */
.meals--move { margin: 6px 0 14px; }
.meals--move .meals__opt[data-entry-move="breakfast"].is-active { background: linear-gradient(180deg, #ffa264, #f0742a); border-color: transparent; color: #fff; }
.meals--move .meals__opt[data-entry-move="lunch"].is-active { background: linear-gradient(180deg, #ffeb9e, #f7cf45); border-color: transparent; color: #4a3a00; }
.meals--move .meals__opt[data-entry-move="dinner"].is-active { background: linear-gradient(180deg, #6b9ee6, #2f6cc4); border-color: transparent; color: #fff; }
.meals--move .meals__opt[data-entry-move="snack"].is-active { background: linear-gradient(180deg, #a07ad8, #7647b8); border-color: transparent; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .onhand__row, .cookmode-toggle, .cookmode-toggle__switch::after, .is-cooking [data-ing], .is-cooking [data-step] { transition: none; }
}

/* ---------- "I made this" (batch.js) ---------- */
.b-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 6px; }
@media (min-width: 420px) { .b-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; } }
.b-grid .hint { display: block; margin-top: 6px; }
.b-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; font: 700 1rem/1.2 var(--font-display); color: var(--ink); }
.b-head small { font: 500 0.8rem var(--font-body); color: var(--muted); }
.b-parts { display: grid; gap: 1px; overflow: hidden; border-radius: 14px; background: var(--hairline); box-shadow: var(--elev-1); margin-bottom: 8px; }
.b-part { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; background: var(--surface); }
.b-part.is-changed { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.b-part.is-skipped .b-part__name b { text-decoration: line-through; color: var(--muted); }
.b-part__name { flex: 1; min-width: 0; display: grid; gap: 2px; }
.b-part__name b { font-weight: 600; overflow-wrap: anywhere; }
.b-part__name small { color: var(--muted); font-size: 0.8rem; }
.qty__stepper--sm .qty__btn { width: 34px; height: 34px; }
.qty__stepper--sm .qty__input { width: 56px; }
.icon-btn--quiet { background: transparent; box-shadow: none; color: var(--muted); }
.b-add { margin: 6px 0 10px; }
.b-per { margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 8px; }
.b-per.is-changed { background: var(--accent-soft); }
.b-per b { color: var(--accent-text); }
.b-spots { display: grid; gap: 10px; }
.b-spot { padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--elev-1); display: grid; gap: 8px; }
.b-spot__row { display: flex; align-items: center; gap: 8px; }
.b-spot__label { font-size: 0.85rem; color: var(--muted); }
.b-spot__exp { flex: 1; min-width: 0; }
.b-spot__exp .field__input { width: 100%; min-width: 0; padding: 8px 10px; font-size: 0.92rem; }
.b-spots__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; }
.b-count { font-size: 0.85rem; color: var(--accent-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.b-count.is-off { color: var(--danger); }
.loc-strip--compact { margin: 0; }

/* Batch card + nicknames on the food card */
.batch-note { margin: 10px 0; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); display: grid; gap: 6px; }
.batch-note__head { display: flex; align-items: center; gap: 8px; margin: 0; }
.batch-note__head .icon { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
.batch-note__text { margin: 0; font-size: 0.9rem; color: var(--ink); white-space: pre-line; }
.batch-note .link-btn { justify-self: start; }
.nicks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.nicks .from { margin-right: 2px; }
.nick { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.82rem; }

/* Recipe card: batches you made */
.r-batches { margin: 6px 0 14px; }
.r-batch { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 12px 14px; border: 0; border-radius: 14px;
  background: var(--surface); box-shadow: var(--elev-1); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.r-batch:active { transform: scale(0.985); }
.r-batch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.r-batch__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.r-batch__main small { color: var(--muted); }
.r-batch__left { display: grid; justify-items: end; line-height: 1.05; color: var(--accent-text); }
.r-batch__left small { color: var(--muted); font-size: 0.72rem; }
.r-batch__left .icon { width: 18px; height: 18px; }

.b-spots__foot .link-btn, .b-body-link, #b-body > .link-btn { display: inline-flex; align-items: center; gap: 6px; }
.b-spots__foot .link-btn .icon, #b-body > .link-btn .icon { width: 16px; height: 16px; }
#b-body .toggle { margin: 10px 0; }
#b-body .field { margin-top: 10px; }

/* ---------- Recipe tips: "Tip:" lines show as a callout under their step ---------- */
.tip {
  display: inline-flex; width: 100%; box-sizing: border-box; gap: 8px; align-items: flex-start; margin: 8px 0 2px; padding: 9px 12px;
  border-radius: 12px; background: color-mix(in srgb, var(--celebrate) 28%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--goal) 30%, transparent);
  font-size: 0.92rem; line-height: 1.45; color: var(--ink); text-decoration: none;
}
.tip .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--goal); }
.tip b { color: var(--goal); margin-right: 2px; }
.tip-li { list-style: none; }
.tip-li::marker { content: none; }
.is-cooking .is-done .tip { opacity: 0.8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tip { background: color-mix(in srgb, var(--celebrate) 12%, var(--surface)); }
}
:root[data-theme="dark"] .tip { background: color-mix(in srgb, var(--celebrate) 12%, var(--surface)); }

/* ---------- Recipe versions: "(pick one crust)" sections as tabs ---------- */
.pick-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; list-style: none; }
.pick-head__hint { font: 600 0.72rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pick-tabs { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin: 4px 0 6px; }
.pick-tab {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: 600 0.88rem var(--font-body); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease;
}
.pick-tab.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pick-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.recipe-card__list li[hidden] { display: none !important; }

/* ---------- Me: connected Claude accounts ---------- */
.cc-grants { margin-top: 12px; display: grid; gap: 8px; }
.cc-grants__title { margin: 4px 0 0; font: 700 0.78rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cc-grant { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.cc-grant__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cc-grant__main small { color: var(--muted); }

/* ---------- Amounts: unit chips on the food card, amount rows in the edit form ---------- */
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; justify-content: flex-end; }
.unit-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 0.85rem var(--font-body); cursor: pointer; }
.unit-chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.unit-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.unit-rows { display: grid; gap: 8px; margin: 4px 0 6px; }
.unit-row { display: flex; align-items: center; gap: 6px; }
.unit-row .field__input { flex: 1; min-width: 0; }
.unit-row .unit-row__n { flex: 0 0 72px; }
.unit-row__eq, .unit-row__of { color: var(--muted); font-size: 0.85rem; }
.k-row__unit { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 500; text-align: right; }
#edit-units-add { justify-self: start; }

/* ---------- Amount picker (stepper + a food's amounts) and recipe versions ---------- */
.amt { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.amt__unit { font-size: 0.8rem; color: var(--muted); max-width: 9em; overflow-wrap: anywhere; }
.unit-chips--inline { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; justify-content: flex-start; }
.unit-chips--inline .unit-chip { padding: 4px 10px; font-size: 0.78rem; }
.qty.qty--amt { flex-wrap: wrap; row-gap: 8px; }
.part { flex-wrap: wrap; row-gap: 6px; }
.part .amt { margin-left: auto; }
.b-part { flex-wrap: wrap; row-gap: 6px; }
.b-part .amt { margin-left: auto; }
.version-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 2px 0 10px; }
.version-row__label { font: 700 0.78rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.version-chips { margin: -2px 0 12px; }
.rf-row__unitpick { flex: 0 0 auto; max-width: 9.5em; }
.b-part__name, .part__name { flex: 1 1 150px; min-width: 0; }
