/* Day-Dot Kitchen Labels: lists surfaces. Tokens and fonts come from scan.css; shared components (ink buttons, tape label,
   day dot, label paper, chips, action sheet, captions, empty states) come from
   kitchen.css (DESIGN.md). */

/* ---------- Location lists: /fridge /freezer /pantry ---------- */
.lst { max-width: 1120px; color: var(--dd-ink); }

.lst-head {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 20px;
    margin: 4px 0 20px;
}
.lst-title { margin: 0; }
.lst--freezer .lst-title { color: var(--dd-bench-frost); }
.lst-head-acts { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 10px; }
.lst-head-acts .bag-btn { text-decoration: none; }
.lst-scan { flex: none; }
.lst-scan .bag-ico { width: 22px; height: 22px; }
.lst-summary { grid-column: 1; margin: 0; font-size: 1.12rem; color: var(--dd-ink-2); }

.lst-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 32px; align-items: start; }
.lst-main-col { min-width: 0; }

/* Controls: condensed caps labels over plain fields. */
.lst-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 14px; margin: 0 0 14px; }
.lst-tools[hidden] { display: none; }
.lst-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lst-field--find { flex: 1 1 200px; }
.lst .lst-input, .lst input.lst-input, .lst select.lst-input {
    min-height: 46px; padding: 0 12px; border: 1.5px solid var(--dd-ink); border-radius: 6px;
    background: var(--dd-soft-hi); color: var(--dd-ink); font-family: var(--dd-sans); font-size: 1rem; width: 100%; box-shadow: none;
}

.lst input.lst-input { appearance: none; -webkit-appearance: none; }
.lst-input::placeholder { color: var(--dd-ink-2); opacity: 0.85; }
.lst-input:focus { border-color: var(--dd-ink); }
.lst-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.lst-filters[hidden] { display: none; }

/* The printed sheet. */
.lst-paper { padding: 14px 20px 16px; }
/* The freezer is frost label stock. */
.lst--freezer .lst-paper { background: var(--dd-frost); color: var(--dd-ink); }
.lst--freezer .lst-paper::before { border-color: rgba(45, 71, 83, 0.4); }
.lst-cols, .lst-btn { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 14px; align-items: center; }
.lst-cols { padding: 2px 0 8px; border-bottom: 1.5px solid var(--dd-rule); }
.lst-cols span:last-child { text-align: right; }
.lst-rows { list-style: none; margin: 0; padding: 0; }
.lst-row { border-bottom: 1px solid rgba(29, 29, 29, 0.18); }
.lst-row:last-child { border-bottom: 0; }
.lst-btn {
    width: 100%; min-height: 60px; padding: 8px 4px; border: 0; background: transparent; color: inherit;
    font: inherit; text-align: left; cursor: pointer; border-radius: 4px;
}
.lst-btn:active { background: rgba(29, 29, 29, 0.08); }
@media (hover: hover) { .lst-btn:hover { background: rgba(29, 29, 29, 0.05); } }
.lst-btn:focus-visible { outline: 3px solid var(--dd-ink); outline-offset: 2px; }
.lst-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lst-name { font-weight: 700; font-size: 1.08rem; line-height: 1.25; overflow-wrap: anywhere; }
.lst-staple::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; vertical-align: 2px; border-radius: 50%; background: var(--dd-ink); }
.lst-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 0.92rem; color: var(--dd-ink-2); }
.lst-sub:empty { display: none; }
.lst-qty { white-space: nowrap; }
.lst-qty b { font-family: var(--dd-cond); font-weight: 800; font-size: 1.08rem; color: var(--dd-ink); font-variant-numeric: tabular-nums; }
.lst-mark { font-family: var(--dd-cond); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; }
.lst-mark--frost { display: inline-flex; align-items: center; gap: 4px; color: var(--dd-frost-ink); }
.lst-mark--frost .lst-ico { width: 16px; height: 16px; }
.lst-date { font-family: var(--dd-marker); font-size: 1.12rem; line-height: 1.1; white-space: nowrap; display: inline-block; transform: rotate(-1.5deg); text-align: right; }
.lst-date--none { font-family: var(--dd-cond); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dd-ink-2); transform: none; }
.lst-row--frost { background: rgba(226, 235, 238, 0.85); margin: 0 -8px; padding: 0 8px; border-radius: 3px; }
.lst-row--frost + .lst-row { border-top: 0; }
.lst--freezer .lst-row--frost { background: transparent; margin: 0; padding: 0; }
.lst-row--frost .lst-name { color: var(--dd-frost-ink); }

.lst-side { display: grid; gap: 24px; align-content: start; }
.lst-block-title { margin: 0 0 10px; }
.lst-others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lst-cook-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

@media (max-width: 900px) {
    .lst-body { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 760px) {
    .lst-head { margin-top: 0; align-items: center; }
    .lst-head-acts { grid-row: 1; grid-column: 2; }
    .lst-summary { grid-column: 1 / -1; grid-row: 2; }
    .lst-scan { display: none; }   /* the bottom-nav Scan tape is the phone's scan action */
    .lst-title { font-size: 2.15rem; }
    .lst-paper { padding: 12px 14px 14px; margin: 0 -2px; }
    .lst-btn, .lst-cols { column-gap: 12px; }
    .lst-field--find { flex-basis: 100%; }
    .lst-field:not(.lst-field--find) { flex: 1 1 140px; }
}

/* The action sheet, its sub-views and the discard reasons are a shared component
   (kitchen.css, Shared components); the recipe view in recipes.css builds on it. */

/* The dashboard and location Scan buttons repeat the top bar's Scan on desktop. */
@media (min-width: 900px) {
    .lst-scan { display: none; }
}

/* ---------- Use soon (/expiring) ---------- */
/* Same sheet, rows and action sheet as the location lists; this section only adds
   the window control, the day groups and the "Goes in" line. */
.lst.use { max-width: 860px; }
.use-tools { margin-bottom: 16px; }
.lst-where {
    font-family: var(--dd-cond); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dd-ink);
}
.lst-goes { font-size: 0.92rem; color: var(--dd-ink-2); overflow-wrap: anywhere; text-wrap: pretty; }
.lst-goes b { font-weight: 700; color: var(--dd-ink); }
.use-paper .lst-cols { margin-bottom: 0; }
.use-group { padding-top: 14px; }
.use-group + .use-group { margin-top: 6px; border-top: 1.5px solid var(--dd-rule); }
.use-group:first-of-type { padding-top: 10px; }
.use-group-title {
    display: flex; align-items: baseline; gap: 10px; margin: 0 0 2px; color: var(--dd-ink);
}
.use-next { font-size: 1.15rem; }
/* Recipe buttons in the action sheet read as plain ink-outline rows, left aligned. */
.lst-goes-block { margin-top: 18px; }
.lst-goes-block .lst-cap { margin: 0 0 8px; }
.lst-act--recipe { justify-content: flex-start; text-align: left; padding: 8px 14px; min-height: 52px; font-size: 1.12rem; }
.lst-act--recipe span { overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .use-tools .lst-field { flex: 1 1 100%; }
}
