/* P3.2201 Done placeholder rows (done-rows.js). A collapsed, button-free
   row where an acted card was. Its min-height (a class from done-rows.js
   DONE_HEIGHTS) covers where that card's buttons were, so no other card's
   button lands under the pointer. Classes only: the CSP is style-src 'self'. */

.done-row { background: #eef2f5; color: #4d5d6c; border: 1px dashed #b8c4ce; border-radius: 8px; padding: 8px 18px; margin-bottom: 8px; font-size: 0.85rem; font-weight: 600; overflow-wrap: anywhere; transition: min-height 0.1s ease, padding 0.1s ease; }
.done-h-40 { min-height: 40px; }
.done-h-64 { min-height: 64px; }
.done-h-88 { min-height: 88px; }
.done-h-112 { min-height: 112px; }
.done-h-136 { min-height: 136px; }
.done-h-160 { min-height: 160px; }
.done-h-200 { min-height: 200px; }
.done-h-240 { min-height: 240px; }
.done-h-280 { min-height: 280px; }
.done-h-320 { min-height: 320px; }
/* Round 4: a card with an open confirm (the cover now reaches its buttons). */
.done-h-400 { min-height: 400px; }
.done-h-480 { min-height: 480px; }

/* P3.2287: after the move guard (or at a render after it) the Done row is one
   line (about 34 px). A label too long for the width ends in an ellipsis; the
   row's title and its text (read by screen readers) keep the whole sentence.
   done-rows.js removes the cover class when it adds this one. */
.done-h-compact { min-height: 0; padding-top: 7px; padding-bottom: 7px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }

/* P3.2201: "N new since the last refresh" before a list's first row, and a
   left accent on the cards it counts. Items are never held back or moved. */
.new-items-line { margin: 0 0 8px; padding: 6px 12px; border-radius: 6px; background: #e8f1fb; color: #1f4e79; border: 1px solid #b9d3ee; font-size: 0.85rem; font-weight: 600; }
.card.is-new { box-shadow: inset 4px 0 0 #2b6cb0, 0 1px 3px rgba(0,0,0,.1); }

/* P3.2300: a text chip on each new card (first in the badge column), so the
   mark does not rely on colour and stays readable beside the red URGENT edge
   and label. Also used by the legend row. */
.new-chip { display: inline-block; background: #1f4e79; color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: .04em; line-height: 1.3; padding: 2px 8px; border-radius: 4px; margin: 0 0 4px; white-space: nowrap; }
.card-side .new-chip + .urgent-label { margin-left: 4px; }
.legend-badge .new-chip { margin: 0; }

/* P3.2616: "N items were dealt with by someone else since the last refresh:
   …" (moved-away.js), just before the list the items left. Quiet: grey, not
   the blue of the N-new line, and no accent on any card (the cards are gone).
   Replaced or cleared on the next refresh. */
/* Round 11 (P3.2976): easier to spot: left border in product blue, 0.9rem, a
   bold lead. The lead is a ::before because search.js rewrites the line's
   textContent on every search pass (a real <strong> would be wiped). */
.moved-away-line { margin: 0 0 8px; padding: 6px 12px; border-radius: 6px; background: #f3f4f6; color: #4a5563; border: 1px solid #d5d9df; border-left: 4px solid #2e86c1; font-size: 0.9rem; font-weight: 500; overflow-wrap: anywhere; }
.moved-away-line strong { font-weight: 700; color: #1a5276; }

/* Round 9 (P3.2862 row 1): below about 600 px the compact Done row wraps to
   two lines (then an ellipsis) so the medicine name shows; title and text keep
   the whole sentence. From 600 px it stays one line. */
@media (max-width: 599px) {
  .done-h-compact { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
  /* Round 11: the clamp is on the inner span (no padding), so no pixel of a
     third line shows; the padded row only holds it. */
  .done-h-compact .done-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
}

/* P3.2877 row 3: faint "Sent" label in the cover; gone once the row is compact. */
.done-sent { display: block; margin-top: 4px; font-size: 0.75rem; font-weight: 500; color: #6b7a88; }
/* Round 14 (P3.2877 row 3): the compact row keeps a small check-mark label
   after the text; the text takes the ellipsis, the label never wraps away. */
.done-h-compact:has(.done-sent) { display: flex; align-items: baseline; }
.done-h-compact:has(.done-sent) .done-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.done-h-compact .done-sent { display: block; flex: none; margin: 0 0 0 8px; white-space: nowrap; }
@media (max-width: 599px) {
  .done-h-compact:has(.done-sent) .done-text { white-space: normal; }
}

/* P3.2866 row 1: the cover collapses to the one-line row with a short
   transition (class change only); none for people who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
  .done-row { transition: none; }
}
