/* The "Move to" button and menu. See public/js/moveto.js for why it exists.
 *
 * Its own sheet because six screens draw one and none of them owns it.
 *
 * The menu lives at the end of <body>, above modals (100) and the My To Do
 * dock (150) and below toasts (200), so a Move to inside the Edit deal form
 * or beside the dock is never clipped or covered.
 */

.mv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600;
  line-height: 1.3; white-space: nowrap;
}
.mv-btn:hover { border-color: var(--blue); color: var(--blue); }
.mv-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.mv-caret {
  width: 0; height: 0; flex: none;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .75;
}

/* A stage pill that is also the Move to button. It keeps the pill's look,
   because the colour is how the office reads a stage at a glance, and gains
   only the caret that says it opens. */
.mv-btn.pill { border: none; color: #fff; padding: 3px 9px 3px 10px; border-radius: 999px; }
.mv-btn.pill:hover { color: #fff; filter: brightness(1.08); }
.mv-btn.pill.plain { color: #475569; }

.mv-pop {
  position: fixed; z-index: 170; min-width: 220px; max-width: 320px;
  max-height: min(420px, 70vh); display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18); overflow: hidden;
}
.mv-title {
  padding: 10px 12px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted);
}
.mv-note { padding: 0 12px 8px; font-size: 12px; color: var(--muted); }
.mv-list { overflow-y: auto; padding: 0 0 6px; }
.mv-opt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; background: none; text-align: left; color: var(--text);
  padding: 8px 12px; font-size: 13.5px;
}
.mv-opt:hover:not(:disabled), .mv-opt:focus-visible { background: #eff6ff; outline: none; }
.mv-opt:disabled { cursor: default; color: var(--muted); }
.mv-opt.on { font-weight: 700; }
.mv-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mv-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-hint { font-size: 11px; color: var(--muted); font-weight: 500; }
.mv-empty { padding: 8px 12px 10px; font-size: 13px; color: var(--muted); }

.mv-toast { display: flex; align-items: center; gap: 12px; }
.mv-undo {
  border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff;
  border-radius: 7px; padding: 3px 10px; font-weight: 700;
}
.mv-undo:hover { background: rgba(255, 255, 255, .12); }

/* A phone: a sheet from the bottom, the same shape as the More sheet in
   phone.css, with rows tall enough for a thumb. 860px is phone.css's number. */
.mv-back { position: fixed; inset: 0; z-index: 169; background: rgba(15, 23, 42, .45); }
@media (max-width: 860px) {
  .mv-btn { padding: 7px 11px; font-size: 13px; }
  .mv-btn.pill { padding: 5px 11px 5px 12px; }
  .mv-pop.mv-sheet {
    left: 0; right: 0; bottom: 0; top: auto; max-width: none; min-width: 0;
    max-height: 78vh; border-radius: 16px 16px 0 0; border: none;
    padding: 8px 8px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(15, 23, 42, .35);
  }
  .mv-grab { width: 38px; height: 4px; border-radius: 999px; background: var(--border); margin: 2px auto 8px; flex: none; }
  .mv-sheet .mv-opt { padding-top: 13px; padding-bottom: 13px; font-size: 15px; }
  .mv-sheet .mv-cancel { margin: 6px 4px 0; }
}
