/* Follow Up (public/js/followups.js) and the lead page's section links,
 * which came back on 18 Nov 2026 as a Settings > Options choice. */

/* ---- The section links ---- */
.jump-ribbon {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.jump-b {
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  border-radius: 999px; padding: 3px 11px; font-size: 12px; cursor: pointer;
}
.jump-b:hover { color: inherit; border-color: var(--muted); }
.jump-toggle { font-weight: 600; }
.jump-ribbon.jump-collapsed { padding-bottom: 6px; margin-bottom: 8px; }
.jump-ribbon.jump-collapsed .jump-b:not(.jump-toggle) { display: none; }

/* ---- The Follow Up button and its menu ---- */
.fu-wrap { position: relative; display: inline-flex; }
.btn.fu-due { border-color: #d97706; color: #92400e; }
.fu-pop {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  width: 300px; max-width: calc(100vw - 24px);
  background: var(--card, #fff); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 6px;
}
.fu-cur { padding: 6px 8px; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.fu-item {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left;
  background: none; border: none; border-radius: 8px; padding: 8px; cursor: pointer; color: inherit; font: inherit;
  min-height: 36px; box-sizing: border-box;
}
button.fu-item:hover:not([disabled]) { background: var(--bg); }
.fu-item[disabled] { cursor: default; opacity: .75; }
.fu-item input, .fu-item select { width: 100%; box-sizing: border-box; }
.fu-stop { color: #b91c1c; }

/* ---- The People list cell ---- */
.fu-cell { white-space: nowrap; }
.fu-cell.due { color: #b45309; font-weight: 600; }

/* ---- Admin > Follow Up plans ---- */
.fua-plan { margin-bottom: 10px; }
.fua-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; margin-top: 10px; }
.fua-wide { grid-column: 1 / -1; }
.fua-lbl { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.fua-num { display: flex; flex-direction: column; gap: 2px; font-size: 13px; margin-bottom: 6px; }
.fua-num input { max-width: 110px; }
.fua-stages { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.opt-row { align-items: flex-start; gap: 10px; padding: 8px 0; }

/* ---- Phone ---- */
@media (max-width: 860px) {
  /* The phone lead page has Details/Comms/Docs/Other tabs, which are the
   * section list already (phone-shell.js), so the links step aside there. */
  .jump-ribbon { display: none; }
  /* A sheet above the phone's bottom tab bar (about 64px tall). */
  .fu-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: auto; z-index: 1000; }
  .fu-item { min-height: 44px; }
  .fua-grid { grid-template-columns: 1fr; }
  /* The lead's header is a row of tiles on a phone (phone.css .person-head > .btn);
   * Follow Up sits in a wrapper for its menu, so the wrapper takes the tile's place. */
  .person-head > .fu-wrap { order: 3; flex: 1 1 13%; min-width: 0; align-self: stretch; }
  .person-head > .fu-wrap > .btn {
    width: 100%; flex-direction: column; gap: 4px; padding: 8px 2px; font-size: 11px; line-height: 1.15; white-space: normal;
    background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #fff;
  }
  .person-head > .fu-wrap > .btn svg { width: 18px; height: 18px; }
  .person-head .fu-pop { color: var(--text); }
}

/* Follow-up timing (18 Nov 2026): opt-out lines on the menu and Follow Ups Due. */
.fu-blocked { color: #b91c1c; }
.fu-pop .fu-cur.fu-blocked { color: #b91c1c; }
