/* Shopping presentation: quantities come from the list, never calculated here. */
.plan-meal { min-width: 0; }
.plan-meal legend { padding-inline: 8px; font-weight: 650; }
#unresolved-state li { overflow-wrap: anywhere; margin-top: 8px; }
.shopping-page { max-width: 780px; }
.shopping-page .intro { margin-bottom: 16px; }
.shopping-status { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 10px; color: var(--ink-muted); background: var(--surface); border-radius: 8px; font-size: 13px; }
.shopping-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.shopping-progress { margin-block: 24px 28px; }
.shopping-progress > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.shopping-progress h2 { font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.shopping-progress span { font-size: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.shopping-progress progress { display: block; width: 100%; height: 7px; accent-color: var(--accent); border: 0; border-radius: 8px; background: var(--line); overflow: hidden; }
.shopping-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 8px; }
.shopping-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
.shopping-progress progress::-moz-progress-bar { background: var(--accent); border-radius: 8px; }
.shopping-aisle { margin-top: 28px; }
.shopping-aisle-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding-inline: 4px; }
.shopping-aisle-heading h2 { font-size: 13px; margin-bottom: 12px; font-family: inherit; text-transform: uppercase; letter-spacing: .04em; }
.shopping-aisle-heading span { font-size: 13px; color: var(--ink-muted); }
.shopping-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.shopping-row { background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--divider); padding-inline: 12px; }
.shopping-check { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 14px; align-items: start; padding-block: 16px; min-height: 64px; cursor: pointer; }
.shopping-check input { appearance: auto; width: 24px; height: 24px; min-height: 24px; margin: 3px 0 0; accent-color: var(--accent); }
.shopping-item-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 16px; align-items: baseline; }
.shopping-item-name { font-weight: 400; overflow-wrap: anywhere; }
.shopping-item-quantity { color: var(--ink); font-weight: 700; font-size: 16px; text-align: end; max-width: 12ch; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.shopping-item-warning { grid-column: 1 / -1; font-size: 13px; color: var(--tomato); }
.shopping-item-warning strong { font-weight: 650; }
.shopping-row.is-checked .shopping-item-name { text-decoration: line-through; color: var(--ok-ink); font-weight: 400; }
.shopping-check:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.shopping-check input:focus-visible { outline-offset: 2px; }
.shopping-empty { text-align: center; margin-block: 32px; padding-block: 32px; }
.shopping-empty p { color: var(--ink-muted); max-width: 34ch; margin-inline: auto; }
.empty-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--lemon); color: var(--on-lemon); font-size: 26px; margin-bottom: 20px; }
.shopping-done { margin-top: 28px; }
.shopping-done p:last-child { margin-bottom: 0; }
.shopping-hidden-note { color: var(--ink-muted); font-size: 14px; margin-top: 24px; }
.shopping-actions #remaining-count { margin: 0; max-width: none; }
.shopping-actions #hide-checked { flex: 0 1 auto; min-width: 162px; font-size: 14px; }
.shopping-examples { font-size: 14px; }
.shopping-examples .back-link { margin-inline-end: 20px; }
@media (max-width: 380px) {
  .shopping-item-content { column-gap: 10px; }
  .shopping-rows { padding-inline: 0; }
  .shopping-check { column-gap: 12px; }
}

.shopping-row.is-checked { background: var(--ok-soft); color: var(--ok-ink); }
.shopping-row.is-checked .shopping-item-quantity { color: var(--ok-ink); }
.shopping-row:has(.shopping-item-warning) { border: 1.5px solid var(--tomato); }
.shopping-aisle-heading { align-items: center; gap: 8px; }
.shopping-aisle-heading h2 { display: flex; align-items: center; gap: 8px; position: relative; }
.shopping-aisle-heading h2::before { content: ""; width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-pill); background: var(--ink-muted); }
.shopping-aisle-heading h2::after { content: ""; position: absolute; top: 5px; left: 5px; width: 18px; height: 18px; background: var(--surface); }
.aisle-produce h2::before { background: var(--accent); }
.aisle-produce h2::after { background: var(--on-accent); }
.aisle-meat h2::before { background: var(--tomato); }
.aisle-meat h2::after { background: var(--on-tomato); }
.aisle-dairy h2::before { background: var(--lemon); }
.aisle-dairy h2::after { background: var(--on-lemon); }
.shopping-status { border: 1px solid var(--divider); }
.shopping-empty .button { width: 100%; }

@media print {
  .shopping-status, .shopping-progress, .shopping-examples, .shopping-hidden-note { display: none; }
  .shopping-aisle { break-inside: avoid; }
  .shopping-row[hidden] { display: list-item !important; }
}
