/* Increment M — completing a Move: the Move form's open moves (the lead),
 * the Mark installed sheet, Close day's row buttons, and a Move card's
 * controls (Mark installed, "Link to PO 4711?", the rental once linked).
 *
 * In the wireframe's visual language (docs/ui/MOCKUP.html): the Move wash
 * (`--tint-move`) for what is a move, the cards' own text buttons
 * (recovered.css `.entry__extra`) for a card's controls, 44 px targets, and
 * colour from tokens.css only — light and dark alike. day.css and
 * capture.css take no new rules (NEXT-PLAN §6). */

/* ───────────────────────────────────────── the Move form's lead */

/* The margin is the lead's own: forms.js shows the box whenever the Move form
 * draws a lead, and a set with no open move draws it hidden — no blank band. */
.mv-lead {
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--tint-move);
  border-radius: var(--radius-sm);
}

.mv-lead__title {
  margin: 0 0 var(--space-1);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
}

.mv-lead__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mv-lead__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}

.mv-lead__row + .mv-lead__row {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.mv-lead__words {
  flex: 1 1 12rem;
  min-width: 0;
  color: var(--ink);
  font-size: var(--text-md);
  overflow-wrap: anywhere;
}

.mv-lead__mark {
  flex: none;
  margin-left: auto;
}

/* ───────────────────────────────────────── the sheet */

.mv-sheet__what {
  display: block;
  margin: 0 0 var(--space-3);
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.mv-sheet__when {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0 var(--space-3);
}

.mv-sheet__field .field__input {
  width: 100%;
  min-height: var(--touch);
}

.mv-sheet__error {
  margin: 0 0 var(--space-2);
  color: var(--danger);
  font-weight: 600;
}

/* ───────────────────────────────────────── Close day's rows */

/* Under the row's words, not beside them: a 44 px button inline would open
 * the line under its last word by half a row. */
.close__mark {
  display: block;
  margin: var(--space-1) 0 var(--space-2);
  padding: 0 var(--space-3);
}

/* ───────────────────────────────────────── a Move card's controls */

/* The rental's own span adds nothing to the row: its buttons are the row's. */
.move__rental {
  display: contents;
}

.move__link {
  color: var(--warn-ink);
}

.move__linked {
  align-self: center;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

/* A card's control while its answer is held behind the toast: aria-disabled,
 * never `disabled` (the focus stays), muted, and its tap refused — one move is
 * never held twice (toast.js hold()). Muted ink on the wash: 10.4:1 light, 6.6:1 dark. */
.move__extras .move__mark[aria-disabled='true'] {
  color: var(--ink-muted);
  cursor: default;
}

/* The cards' text buttons are --accent (recovered.css): 5.3:1 on the Move
 * wash in light, but 3.8:1 in dark — under AA for text this size. On a move
 * in dark, every accent control in the row takes --ok (5.6:1 on the dark
 * wash): Mark installed (and Mark left the yard, a .move__mark), and the
 * rental's picker, "Other rentals" / "Choose a rental" — the card's only
 * control when every proposal is doubtful (review round 1). Link to PO is
 * --warn-ink in both (7.0:1 dark). */
@media (prefers-color-scheme: dark) {
  .move__extras .move__mark,
  .move__extras .move__others {
    color: var(--ok);
  }
}
