/* v213.css — SPEC-v2.13 "ספר המתכונים ב-PDF לפי קטגוריות" (ui/family.js):
   the PDF window's "א-ב · לפי קטגוריות" switch, its category heads (a ✓ for the whole category,
   a half mark when part of it is in) and the small category button by each recipe; the "קטגוריה: … ·
   שינוי" line of a recipe; the editor's category chips; the chips of the book's page.
   Reused as they are: .sec-switch / .sec-btn (the switch), .pk-list / .pk-li / .pk-dish / .cb (the ✓
   rows), .cat-grid / .cat-btn ("לאיזו קטגוריה?", as the shopping list's "לשנות סוג"), .meal-chips /
   .meal-chip (the chips), .link-btn ("שינוי").
   Like v29f.css: built only from the app's shared variables, so the fridge look (where a sheet stays a
   light paper object even in dark mode) and html[data-theme="clean"] (light and dark) both follow it;
   the few clean-only rules below swap a fridge object for its flat twin.
   Every font-size follows the text-size slider (var(--ts)); every tap target >= 44px; 360px wide. */

/* ---------------- the PDF window: "א-ב · לפי קטגוריות" ---------------- */
/* on the sheet's paper (not the fridge door): a light well in both modes of the fridge look */
.sec-switch.bk-order {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2px 0 14px;
  background: rgba(0, 0, 0, 0.07); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
.bk-order .sec-btn { min-height: 46px; color: var(--ink-soft); }
.bk-order .sec-btn.on { background: #fff; color: var(--ink); }
.bk-order .sec-btn:disabled { opacity: 0.55; }
.bk-hint { margin: 6px 2px 0; }

/* a category's head: a band of its own (a gap above it); its ✓ takes the whole category */
.bk-list .bk-cat-li { padding-top: 12px; }
.bk-list .bk-cat {
  padding-inline: 8px; border-bottom: 0; border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
}
.bk-list .bk-cat .pk-name { font-family: var(--font); font-weight: 800; font-size: calc(18px * var(--ts)); }
/* part of the category is in: a short line in the box */
.cb.part::after {
  content: ""; position: absolute; left: 22%; right: 22%; top: calc(50% - 1.5px); height: 3px;
  border-radius: 2px; background: var(--ink);
}

/* the small button by a recipe: its category's emoji on a round magnet (a 48px target) */
.bk-rcat {
  flex: none; width: calc(50px * var(--ts2)); min-height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
}
.bk-rcat-e {
  width: calc(38px * var(--ts2)); height: calc(38px * var(--ts2));
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: calc(19px * var(--ts2)); line-height: 1;
  background: var(--g-round-white); box-shadow: var(--sh-round);
}
.bk-rcat:active:not(:disabled) .bk-rcat-e { transform: translateY(1px); }
.bk-rcat:disabled { opacity: 0.45; }

/* "לאיזו קטגוריה?" */
.rcat-grid { margin-top: 12px; }

/* ---------------- a recipe: "קטגוריה: 🍰 קינוחים ועוגות · שינוי" ---------------- */
.rc-cat {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px;
  margin: -4px 2px 2px;
  font: 600 calc(14.5px * var(--ts))/1.3 var(--font); color: var(--ink-soft);
}
/* (.link-btn is door-ink on the door; on the sheet's paper it is the blue marker) */
.rc-cat .rc-cat-btn { margin: 0; padding: 6px 8px; color: var(--marker-blue); font-size: calc(14.5px * var(--ts)); }

/* ---------------- the recipe editor: "קטגוריה בספר" ---------------- */
.rcat-chips { gap: 8px; }
.rcat-chip { min-height: 44px; padding: 5px 13px; font-size: calc(15px * var(--ts)); }

/* ---------------- the book's page: "הכל" + a chip per category ---------------- */
.bk-cats { gap: 8px; margin: -4px 0 14px; }
.bk-cchip { min-height: 44px; padding: 5px 13px; font-size: calc(15px * var(--ts)); }
.bk-cn {
  flex: none; min-width: 1.6em; padding: 1px 6px; border-radius: 999px; text-align: center;
  font: 700 calc(12.5px * var(--ts))/1.3 var(--font);
  background: rgba(0, 0, 0, 0.07);
}
.bk-cchip.on .bk-cn { background: rgba(255, 255, 255, 0.3); }

/* ---------------- the clean look ("לבן ולימון") ---------------- */
html[data-theme="clean"] .bk-order .sec-btn { min-height: 42px; }
html[data-theme="clean"] .bk-order .sec-btn.on { background: var(--c-surface); color: var(--c-ink); }
html[data-theme="clean"] .bk-list .bk-cat { padding: 7px 10px; border-bottom: 0; background: var(--c-fill); }
html[data-theme="clean"] .bk-list .bk-cat .pk-name { font-weight: 700; }
html[data-theme="clean"] .cb.part::after { left: 26%; right: 26%; height: 2px; top: calc(50% - 1px); background: var(--c-ink); }
html[data-theme="clean"] .bk-rcat-e { background: var(--c-fill); box-shadow: none; }
html[data-theme="clean"] .bk-rcat:active:not(:disabled) .bk-rcat-e { transform: none; background: var(--c-fill2); }
html[data-theme="clean"] .rc-cat { font-weight: 500; color: var(--c-ink2); }
html[data-theme="clean"] .rc-cat .rc-cat-btn { color: var(--c-ink); font-weight: 600; }
html[data-theme="clean"] .rcat-chip, html[data-theme="clean"] .bk-cchip { font-size: calc(14.5px * var(--ts)); }
html[data-theme="clean"] .bk-cn { font-weight: 600; background: var(--c-fill2); color: var(--c-ink2); }
html[data-theme="clean"] .bk-cchip.on .bk-cn { background: rgba(127, 127, 127, 0.35); color: inherit; }

/* ================================================================================================
   SPEC-v2.14 "🔗 ייבוא מתכון" to the family book (ui/family.js, ui/menus.js) — appended here, so no new
   file to link: the book's page puts "+ הוספת מתכון" and "🔗 ייבוא מתכון" side by side (as a menu's
   page does with "+ מנה חדשה", v29i.css .ri-foot); the import sheet and the "✨ … מולא" line are
   v29i.css's own; the recipe editor's "כבר יש בספר מתכון בשם הזה" is a small quiet line under the name.
   ================================================================================================ */

/* the book's page: one row on a phone (360px); with a bigger text each takes a row of its own */
.book-adds { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.book-adds .btn { flex: 1 1 calc(128px * var(--ts)); min-width: 0; margin-top: 0; padding-inline: 10px; }
.book-adds .book-import { font-size: calc(16.5px * var(--ts)); }

/* the editor: "כבר יש בספר מתכון בשם הזה" (only said — it never stops the saving); empty = not there */
.re-dup {
  margin: 6px 2px 0;
  font: 700 calc(14px * var(--ts))/1.35 var(--font); color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.re-dup::before { content: "📖 "; }
.re-dup:empty { display: none; }

html[data-theme="clean"] .re-dup { font-weight: 600; color: var(--c-ink2); }

/* ================================================================================================
   SPEC-v2.15 "קטגוריות משלכם" (ui/family.js) — appended here, so no new file to link: "✏️ עריכת קטגוריות"
   (under the book's chips, in the PDF window by category, in "לאיזו קטגוריה?") and its sheet — a row per
   category (its emoji · name · how many, as a .cat-btn of the chooser) with ▲ ▼ 🗑️ (.order-btns /
   .mini-btn, as the menus' order); "📂 בלי קטגוריה" a quiet line under the list. The category editor is
   the menu editor's own parts (.input, ui/emoji.js's .emo — v27.css).
   ================================================================================================ */

/* "✏️ עריכת קטגוריות": a small link — on the fridge door under the chips; on a sheet's paper, blue */
.bk-cedit-row { display: flex; justify-content: flex-start; margin: -8px 0 10px; }
.bk-cedit { margin: 0; padding: 6px 4px; font-size: calc(15px * var(--ts)); }
.sheet .bk-cedit { color: var(--marker-blue); }
.bk-pdf-cedit { margin: 4px 0 0; }
.rcat-edit { margin-top: 14px; }
.rcat-empty, .cx-empty { margin-top: 12px; }

/* the sheet: a row per category — the row (a tap = its editor) + ▲ ▼ 🗑️ */
.cx-list { list-style: none; margin-top: 12px; }
.cx-li { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cx-row { flex: 1 1 auto; min-width: 0; padding-inline: 12px; }
.cx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cx-name { overflow-wrap: anywhere; }
.cx-n { font: 600 calc(13.5px * var(--ts))/1.3 var(--font); color: var(--ink-soft); }
.cx-btns { flex: none; gap: 4px; }

/* "📂 בלי קטגוריה · N מתכונים": not a category — only said */
.cx-none {
  margin-top: 16px; padding: 10px 12px; border-radius: 12px;
  font: 700 calc(15px * var(--ts))/1.3 var(--font); color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.05);
}
.cx-help { margin: 6px 2px 0; }

/* the clean look */
html[data-theme="clean"] .sheet .bk-cedit { color: var(--c-ink); }
html[data-theme="clean"] .cx-n { font: 500 calc(13.5px * var(--ts))/1.3 var(--c-sans); color: var(--c-ink2); }
html[data-theme="clean"] .cx-none { font-weight: 600; color: var(--c-ink2); background: var(--c-fill); }

/* ---------------- SPEC-v2.16 "⏰ נודניק" (ui/push.js, ui/more.js) ---------------- */
/* The sheet a reminder opens (/?snooze=<sid>) needs no code, so it may come up over the login screen
   (z-index 70): it stands above it — still under the question (80) and the toast (90). ui/core.js puts
   .over-login on the overlay while that sheet is open (a class, not :has(): older phones have none). */
#sheetOverlay.over-login { z-index: 75; }

/* 5 · 10 · 15 · 30 · 60 דק׳ · אחר… — three to a row (a 360px phone, the biggest text too) */
.snz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.snz-grid .opt-btn { min-width: 0; padding-inline: 6px; }
.snz-q { margin-top: 6px; }

/* "אחר…": the minutes and "⏰ להזכיר" side by side */
.snz-other { display: flex; gap: 8px; align-items: stretch; }
.snz-other .input { flex: 1 1 auto; min-width: 0; }
.snz-other .btn { flex: none; width: auto; margin-top: 0; }
.snz-in { text-align: center; }

/* "עוד" → the reminders card: "⏰ נודניק בהתראה" between "✓ פועלות" and its buttons */
.snz-set { margin: 14px 0 4px; }
.snz-set .field-label { margin-top: 0; }
.snz-set .muted { margin-top: 8px; }
