/* v23.css — SPEC-v2.2 "תוספת 2.3" (Tzvi's board requests): board zoom 🔍− / 🔍+, "🧹 ניקוי הלוח",
   and dragging a note to copy it (lifted note, ghost, drop target, the "להחליף / להוסיף" window).
   The fridge look by default, from the app's own variables (style.css); the clean theme
   (theme-clean.css, html[data-theme="clean"] …) restyles these classes. Every font-size follows
   the text-size slider (var(--ts)). At zoom 100% the board is drawn exactly as before. */

/* ---------------- board zoom: 🔍− [100%] 🔍+ above the board ---------------- */
.bz-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  margin: -4px 2px 8px;
}
.bz-btn, .bz-pct {
  flex: none; min-width: 44px; min-height: 40px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--g-round-white); box-shadow: var(--sh-round); color: var(--ink);
  font: 700 calc(14.5px * var(--ts))/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bz-btn { font-size: calc(15px * var(--ts)); letter-spacing: -1px; }
.bz-pct { min-width: calc(58px * var(--ts2)); }
.bz-pct.on { background: var(--g-lemon); box-shadow: var(--rim-lemon); color: var(--lemon-ink); }
.bz-btn:disabled { opacity: 0.4; box-shadow: none; }
.bz-btn:active:not(:disabled), .bz-pct:active { transform: translateY(1px); box-shadow: var(--rim-pressed); }

/* the board itself grows / shrinks (notes, days, text); it scrolls sideways when it gets wider
   than the screen, and the page scrolls down as it gets taller */
.wb[data-bz] .wgrid { zoom: var(--bz, 1); }
.wb[data-bz]:not(.month-wb) { max-width: calc((var(--dayw) + var(--cols, 3) * 196px) * var(--bz, 1) + 50px); }
.month-wb[data-bz] {
  max-width: calc(var(--maxw-wide, 980px) * var(--bz, 1));
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: #C7CCD4 transparent;
}
.month-wb[data-bz] .mgrid { zoom: var(--bz, 1); min-width: calc(7 * 44px); }

/* ---------------- "🧹 ניקוי הלוח" (under the board, by "העתקת השבוע שעבר") ---------------- */
.btn.clear-board {
  width: fit-content; max-width: 100%; min-height: 44px;
  margin: -6px auto 18px; padding: 8px 18px;
  font-size: calc(15.5px * var(--ts)); border-width: 1.5px;
}

/* ---------------- drag a note to copy it ---------------- */
.tap-hint .h-drag { color: inherit; }
/* a long press is ours: no text selection / phone menu on the notes (looks the same) */
#weekScroll .note { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
body.v23-dragging { -webkit-user-select: none; user-select: none; }
body.v23-dragging, body.v23-dragging * { cursor: grabbing !important; }

/* the note that was picked up "lifts" off the board */
.wb .note.drag-src {
  z-index: 4;
  transform: scale(1.06) rotate(-1.5deg);
  box-shadow: 3px 12px 18px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
}
/* the cell under the finger */
.wb .note.drop-on {
  z-index: 4;
  outline: 3px solid var(--marker-blue); outline-offset: 3px;
  transform: scale(1.04);
}
.wb .note.empty.drop-on { border-color: var(--marker-blue); color: var(--marker-blue); background: rgba(36, 86, 201, 0.08); }

/* the ghost that follows the finger (a copy of the note, above the finger) */
.note.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 96; margin: 0;
  max-width: none; pointer-events: none;
  opacity: 0.95; transition: none; will-change: transform;
  box-shadow: 4px 16px 26px rgba(0, 0, 0, 0.32), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
}

/* the target already has dishes: a note pinned to the fridge with three buttons */
.drop-ask { z-index: 85; }
.drop-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.drop-btns .btn { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .wb .note.drag-src, .wb .note.drop-on { transform: none; }
}

/* ---------------- SPEC-v2.2: the "עיצוב" chooser in "עוד" (fridge look; theme-clean.css restyles it) ---------------- */
.theme-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.theme-opt {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 8px 8px 10px; border: 2.5px solid transparent; border-radius: 14px; text-align: center;
  background: var(--g-white); box-shadow: var(--sh-white); color: var(--ink); font: inherit;
}
.theme-opt.on { border-color: var(--marker-blue); }
.theme-opt:active { transform: translateY(1px); }
.theme-name { font: 800 calc(15.5px * var(--ts))/1.2 var(--font); }
.theme-sub { font: 600 calc(12.5px * var(--ts))/1.25 var(--font); color: var(--ink-soft); }
.theme-check {
  position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--marker-blue); color: #fff; font: 800 14px/1 var(--font);
}
.theme-check:empty { display: none; }
/* the two small previews always show the look they stand for */
.theme-prev { display: block; height: 64px; border-radius: 10px; overflow: hidden; }
.theme-prev i { display: block; }
.tp-fridge { padding: 7px; background: linear-gradient(90deg, #EDEAE2, #F8F6F1 40%, #E6E2D9); }
.tp-fridge .tp-b {
  height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: #FFFFFF; border: 3px solid #CDD2D8; border-radius: 5px;
}
.tp-fridge .tp-n { border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22); }
.tp-n.y { background: #FFE45C; transform: rotate(-3deg); }
.tp-n.o { background: #FFC27C; transform: rotate(2deg); }
.tp-n.b { background: #A9D2FF; transform: rotate(2deg); }
.tp-n.g { background: #B4E6A0; transform: rotate(-2deg); }
.tp-clean { display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #FFFFFF; border: 1px solid rgba(0, 0, 0, 0.08); }
.tp-clean .tp-r { flex: 1; display: flex; align-items: center; gap: 5px; padding: 0 5px; background: #F4F4F6; border-radius: 5px; }
.tp-clean .tp-today { background: #FFFFFF; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16); }
.tp-clean .tp-d { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #C9C9CE; }
.tp-clean .tp-today .tp-d { background: #FFE13B; }
.tp-clean .tp-c { flex: 1; height: 4px; border-radius: 2px; background: #DADADF; }