/* v27b.css — SPEC-v2.7 §1 ("הערה במשבצת", צבי): a cell's note on the board (ui/board.js) — the
   "📝 …" line at the bottom of a week note, the little handwritten scrap alone on an empty cell,
   the 📝 mark on a day of the month, the line under a meal of the day sheet, and the picker's
   "📝 הערה למשבצת" field with its ✕.
   Like v24.css / v26b.css: built only from the app's shared variables (style.css), which
   theme-clean.css points at its own tokens (--paper / --ink-soft / --font / --hand …), so the
   fridge look (default, where the whiteboard and the sheets stay light objects even in dark mode)
   and html[data-theme="clean"] (light and dark) both follow it; the few clean-only rules below
   just take away the fridge's paper tilt and shadow.
   Every font-size follows the text-size slider (var(--ts) / var(--ts2)); every tap target >= 44px. */

/* ---------------- the week: a note with dishes — a small soft line at its bottom ---------------- */
.wb .note.has-cnote:not(.empty) { flex-direction: column; gap: 3px; }
/* the dishes stay in the middle of the room above the line */
.wb .note.has-cnote:not(.empty) .nt { margin-block: auto; }
.note .cnote {
  flex: none; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font: 600 calc(11.5px * var(--ts2))/1.2 var(--font); color: var(--ink-soft); letter-spacing: 0;
  overflow-wrap: anywhere;
}
.note .cnote .cn-ic { font-size: 0.95em; }

/* ---------------- the week: an empty cell with only a note ---------------- */
/* in place of the big "+", inside the dashed spot (so it is clear nothing is eaten there):
   a little scrap of paper written by hand */
.note.empty.has-cnote { padding: 5px 4px; }
.note .cnote.solo {
  -webkit-line-clamp: 3;
  /* the room under the text is a (transparent) border, not padding: a clamped 4th line would
     peek through a bottom padding */
  padding: 4px 5px 0; border-bottom: 3px solid transparent; border-radius: 2px;
  font: 600 calc(12.5px * var(--ts2))/1.15 var(--hand); color: var(--ink-soft); letter-spacing: -0.2px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
  transform: rotate(-2deg);
}
/* four meals a day on a phone: the slimmest notes */
@media (max-width: 440px) {
  .wb.c4 .note .cnote { font-size: calc(10.5px * var(--ts2)); }
  .wb.c4 .note .cnote.solo { font-size: calc(11px * var(--ts2)); padding: 3px 3px 0; border-bottom-width: 2px; }
}
@media (min-width: 700px) {
  .note .cnote { font-size: calc(13px * var(--ts)); }
  .note .cnote.solo { font-size: calc(15px * var(--ts)); padding: 5px 7px 0; border-bottom-width: 4px; }
}

/* ---------------- the month: a small 📝 on a day that has a note ---------------- */
/* in the day's top corner, across from its number (the day sheet shows the note itself) */
.mday .mcn {
  position: absolute; top: 3px; inset-inline-end: 3px; z-index: 1;
  font-size: calc(10.5px * var(--ts2)); line-height: 1;
  pointer-events: none;
}
@media (min-width: 700px) {
  .mday .mcn { top: 6px; inset-inline-end: 6px; font-size: calc(13px * var(--ts2)); }
}

/* ---------------- the day sheet: the note under its meal ---------------- */
.day-slot.has-cnote { flex-wrap: wrap; row-gap: 5px; }
.ds-cnote {
  flex: 1 0 100%; min-width: 0;
  padding-inline-start: calc(88px * var(--ts2) + 12px);   /* under the meal's note, not under its name */
  font: 600 calc(14px * var(--ts))/1.35 var(--font); color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* ---------------- the picker: "📝 הערה למשבצת" at the top ---------------- */
.pk-cnote { margin: 0 0 12px; }
.pk-cnote .field-label { margin-top: 8px; }
.pk-cnote-row { display: flex; align-items: center; gap: 8px; }
.pk-cnote-row .input { flex: 1; min-width: 0; }
/* the ✕ only while there is something to delete */
.pk-cnote-row .input:placeholder-shown + .pk-cnote-x { display: none; }

/* ---------------- the clean look ("לבן ולימון") ---------------- */
/* no paper, tilt or shadow there: the scrap is a small tag of the sheet's colour with a hairline */
html[data-theme="clean"] .note .cnote.solo {
  transform: none; border-radius: 8px; letter-spacing: 0;
  box-shadow: 0 0 0 1px var(--c-line);
}
html[data-theme="clean"] .note .cnote { font-weight: 500; }
