/* Стили вкладки «Покупки» (этап 1, задача 2.6): «Купить» (Э7) и «Есть дома» (Э8),
   Ш-Продукт. Между блоками — не меньше 8px (DOM-ворота №5). */

/* --- Купить --- */
:is([data-screen="shop"], [data-screen="shop.home"]) > .kseg { margin-top: 8px; }
.sh-top { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.sh-top .muted { font-size: 15px; }
.sh-sent { margin-top: 4px; }
.sh-sent:empty { display: none; }
.sh-have-t { margin-top: 12px; font-size: 14px; }
.sh-have { margin-top: 8px; align-items: center; }
.sh-have .chip.more { color: var(--link); }
.sh-have .trail { margin: 0; padding: 6px 10px; font-size: 14px; }
.sh-empty { margin-top: 16px; padding: 16px; }
.sh-empty p { margin: 0; }

/* строка покупки K4 (база — app.css): ☐ · название (тап — «для: …») · количество */
.k4-n { display: block; width: 100%; min-height: 44px; padding: 8px 0; border: 0; background: none; font: inherit; color: var(--text);
  text-align: left; cursor: pointer; }
.k4-for { font-size: 14px; margin: -4px 0 6px; }
.k4-for[hidden] { display: none; }
.k4-a { flex: none; max-width: 45%; text-align: right; font-size: 15px; cursor: pointer; }
.k4.done .k4-n { text-decoration: line-through; color: var(--hint); }
/* tick saved on the phone, not on the server yet (no network) */
.k4-p { margin: -6px 0 6px; font-size: 13px; color: var(--hint); }
.k4-p[hidden] { display: none; }
.sh-wait { margin: 0 0 8px; font-size: 14px; }
.sh-wait[hidden] { display: none; }

.sh-second { margin-top: 16px; }
.sh-second > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--link); }

/* «Купили отмеченное (N)» — над панелью вкладок, видна всегда */
.sticky-bottom { position: sticky; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 5;
  margin-top: 16px; padding: 8px 0; background: var(--bg2); }
.sticky-bottom > .btn { margin-top: 0; }
body.kb .sticky-bottom { bottom: 8px; }

/* --- Есть дома --- */
.st-add { display: flex; gap: 8px; align-items: stretch; margin-top: 12px; }
.st-add > .btn { width: auto; margin-top: 0; min-height: 44px; padding: 0 20px; flex: none; }
.st-msg { margin-top: 6px; }
.st-msg:empty { display: none; }
.st-ask { margin-top: 12px; padding: 12px; }
.st-ask-q + .st-ask-q { margin-top: 12px; }
.st-ask .chips { margin-top: 8px; }
[data-screen="shop.home"] > .trail { margin: 12px 0 0; }
.st-row .k2-t { font-weight: 400; }
.st-empty { margin-top: 16px; }

/* Ш-Продукт, Ш-Срок, Ш-Готовое */
.pr-sub { margin: 0 4px 4px; font-size: 14px; }
:is(.sheet-wrap[data-sheet="product"], .sheet-wrap[data-sheet="prep"], .sheet-wrap[data-sheet="useby"]) .btn + .btn { margin-top: 8px; }
.sheet-wrap[data-sheet="useby"] .chips { margin-top: 4px; }
.sheet-wrap[data-sheet="useby"] .pr-date { display: block; width: 100%; box-sizing: border-box; margin-top: 12px; }
