/* Ansichten: Liste, Rezepte, Artikel, Konto. */

select { appearance: auto; min-height: 48px; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 0.95rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.hint { font-size: 0.82rem; color: var(--ink-2); }
.grow { flex: 1; }
h2 svg { width: 20px; height: 20px; vertical-align: -3px; margin-right: 6px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.page-head h1 { overflow-wrap: anywhere; }
.head-actions { display: flex; gap: 2px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button-row .btn { flex: 1 1 140px; white-space: nowrap; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.dialog-head { display: flex; align-items: center; gap: 12px; }
.dialog-head h2 { flex: 1; overflow-wrap: anywhere; }
.dialog-head .icon-btn { margin: -8px -8px -8px 0; }
.dialog-actions.spread { justify-content: space-between; }

.empty { text-align: center; padding: 32px 12px; display: flex; flex-direction: column; gap: 6px; list-style: none; }
.empty p:first-child { font-family: var(--serif); font-size: 1.15rem; }

/* Suchfelder mit Symbol */
.search { position: relative; display: block; }
.search > span svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-2); pointer-events: none; }
.search input { padding-left: 44px; min-height: 50px; border-radius: 12px; }

/* Vorschaubilder */
.thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
}
.thumb.small { width: 36px; height: 36px; border-radius: 8px; }
.thumb.placeholder {
  display: inline-grid;
  place-items: center;
  font: 600 1.05rem var(--serif);
  color: var(--accent);
  background: var(--accent-soft);
}
.thumb.placeholder svg { width: 20px; height: 20px; }

/* Listen-Auswahl */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px; padding: 4px 16px; scrollbar-width: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 500 0.92rem var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.chip[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .count { font-size: 0.78rem; opacity: 0.8; }
.chip.add { padding: 0 10px; }
.chip.add svg { width: 18px; height: 18px; }

/* Eingabe mit Vorschlägen */
.add-bar { position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 8px 16px; background: var(--bg); }
.add-bar .search > span svg { color: var(--accent); }
.suggestions {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% - 4px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
  max-height: min(60vh, 440px);
  overflow-y: auto;
}
.suggestions button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.suggestions button:hover, .suggestions button:focus-visible { background: var(--surface-2); outline: none; }
.suggestions .qty { margin-left: auto; color: var(--accent); font-weight: 500; white-space: nowrap; }
.suggestions-title { padding: 6px 8px 2px; font-size: 0.8rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }

/* Einträge */
.entries { display: flex; flex-direction: column; gap: 18px; }
.group { display: flex; flex-direction: column; gap: 6px; }
.group-title { font: 600 0.8rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.entry-list, .item-list, .recipe-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.entry, .item-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2px 6px 2px 2px;
}
.item-row { padding: 2px 2px 2px 0; }
.entry-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
}
.entry-text { display: flex; flex-direction: column; min-width: 0; }
.entry-name { font-weight: 500; overflow-wrap: anywhere; }
.entry-detail { font-size: 0.88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.check {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: transparent;
}
.check svg {
  width: 26px;
  height: 26px;
  padding: 3px;
  border: 2px solid var(--line);
  border-radius: 50%;
  stroke-width: 3;
  transition: background 0.15s, border-color 0.15s;
}
.check[aria-checked="true"] { color: var(--accent-ink); }
.check[aria-checked="true"] svg { background: var(--accent); border-color: var(--accent); }
.entry.done { background: transparent; }
.entry.done .entry-name { text-decoration: line-through; color: var(--ink-2); }
.entry.done .thumb { opacity: 0.5; }
.done-group .group-head { min-height: 40px; }

/* Rezepte */
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 999px; }
.stepper output { min-width: 100px; text-align: center; font-weight: 500; font-size: 0.95rem; }
.stepper .icon-btn { width: 42px; height: 42px; }
.stepper .icon-btn svg { width: 20px; height: 20px; }
.stepper .icon-btn:disabled { opacity: 0.35; cursor: default; }

.recipe-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}
.recipe-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.recipe-card-image {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
}
.recipe-card-image.placeholder { display: grid; place-items: center; color: var(--ink-2); font: 600 1.6rem var(--serif); }
.recipe-card-title { font: 600 1.08rem/1.3 var(--serif); }
.recipe-card-text { color: var(--ink-2); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recipe-card-meta, .recipe-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.85rem; color: var(--ink-2); margin-top: 2px; }
.recipe-meta svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.tag { background: var(--surface-2); border-radius: 999px; padding: 1px 9px; }

.recipe { display: flex; flex-direction: column; gap: 14px; }
.recipe-hero { width: 100%; aspect-ratio: 16 / 10; max-height: 360px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.lead { font-size: 1.02rem; color: var(--ink-2); }
.ingredients { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ingredients li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ingredients li:last-child { border-bottom: 0; }
.ing-qty { flex: 0 0 88px; text-align: right; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.ing-name { flex: 1; overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.steps li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

.pick-list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-list li + li { border-top: 1px solid var(--line); }
.pick-list label { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.pick-list input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.pick-name { flex: 1; }
.pick-qty { color: var(--ink-2); font-size: 0.9rem; white-space: nowrap; }

/* Foto bei Artikeln und Rezepten */
.photo { display: flex; flex-direction: column; gap: 10px; }
.photo-preview { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.photo-empty {
  height: 140px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-2);
}
.photo-empty svg { width: 32px; height: 32px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-actions .btn { flex: 1 1 120px; white-space: nowrap; padding: 0 12px; }

/* Haushalt */
.members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.members li { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.invite { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--surface-2); border-radius: 10px; text-align: center; }
.code { font: 700 1.6rem var(--sans); letter-spacing: 0.12em; font-variant-numeric: tabular-nums; user-select: all; }
