/* Result menu on the "Not Resulted" pill. v1.9.2
   The pill was already the red status chip; it is now the control, so it
   has to look pressable without becoming a different element on the card. */
.hdr-resulted--pick {
  cursor: pointer;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3px;
  transition: filter 120ms, box-shadow 120ms;
}
.hdr-resulted--pick:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.55);
}

/* v1.9.17 — CENTRED, BIGGER, AND IT SCROLLS PROPERLY.
   Rep: "make resulting ... pop up pages a bit larger and more centered,
   easier to read and scroll."

   This was an absolutely-positioned 320px dropdown anchored under the pill.
   On a phone that put it wherever the pill was -- frequently half off the
   bottom edge -- and the rep was scrolling a 290px box inside a page that
   was also scrolling. `position: fixed` with a translate centres it on the
   viewport regardless of where the card is, so the JS no longer has to guess
   a position that fits (it now skips setting top/left entirely). */
.rm-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10500;
  width: 460px;
  max-width: 94vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #14181d;
  color: #ECEFF1;
  border: 1px solid #37474F;
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  /* 13.5px from 12.5px: these are short codes and descriptions a rep reads
     at arm's length, on a doorstep, in daylight. */
  font-size: 13.5px;
}

/* A backdrop, so the page behind stops taking the scroll and the tap that
   dismisses the menu has something to land on. Inserted by result_menu.js
   alongside the menu. */
.rm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10499;
  background: rgba(0, 0, 0, 0.55);
}
.rm-head {
  padding: 9px 13px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: #1B2229;
  border-bottom: 1px solid #2A3239;
}
.rm-load, .rm-err, .rm-ok { padding: 15px 13px; }
.rm-err { color: #EF9A9A; }
.rm-ok  { color: #95cbe6; font-weight: 800; }
.rm-ok-sub { color: #90A4AE; font-weight: 600; font-size: 11px; margin-top: 4px; }

/* What the lead actually has. Three states, not two — "not checked" is
   its own chip because an unreadable Photo App is not zero photos. */
.rm-ev { display: flex; gap: 6px; padding: 8px 11px; flex-wrap: wrap;
         border-bottom: 1px solid #2A3239; }
.rm-chip { font-size: 10.5px; font-weight: 800; padding: 3px 8px;
           border-radius: 11px; white-space: nowrap; }
.rm-chip--ok  { background: rgba(76,142,175, 0.16); color: #95cbe6;
                border: 1px solid rgba(76,142,175, 0.35); }
.rm-chip--no  { background: rgba(244, 67, 54, 0.14); color: #EF9A9A;
                border: 1px solid rgba(244, 67, 54, 0.32); }
.rm-chip--unk { background: rgba(120, 144, 156, 0.16); color: #B0BEC5;
                border: 1px solid rgba(120, 144, 156, 0.35); }

/* v1.9.17 — the list is the scroll area and it gets most of the screen.
   `overscroll-behavior: contain` is the fix for the real complaint: without
   it, a flick that reaches the end of this list carries on and scrolls the
   page underneath, which is what makes a small scroller feel unusable on a
   touch screen. */
.rm-list {
  max-height: 62vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}
.rm-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; color: #ECEFF1;
  /* ~40px tall: this is tapped with a thumb, and a mis-tap here results an
     appointment as the wrong thing. */
  padding: 12px 14px; min-height: 40px; cursor: pointer; font: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.rm-item:hover:not(.is-disabled) { background: #1E262D; }
.rm-item-lbl { display: block; font-weight: 800; }
.rm-item-sub { display: block; font-size: 10.5px; color: #90A4AE;
               margin-top: 2px; line-height: 1.35; }
/* Disabled, NOT hidden — the rep needs to see the option exists and why
   it is off, or they never learn what brings it back. */
.rm-item.is-disabled { cursor: not-allowed; opacity: 0.55; }
.rm-item.is-disabled .rm-item-lbl { color: #78909C; }
.rm-item.is-disabled .rm-item-sub { color: #EF9A9A; }

.rm-note-wrap { padding: 9px 11px; border-top: 1px solid #2A3239; }
.rm-note-lbl { display: block; font-size: 10.5px; font-weight: 800;
               color: #B0BEC5; margin-bottom: 4px; }
.rm-note-code { color: #6cb7dc; font-weight: 700; }
.rm-note { width: 100%; background: #0E1216; color: #ECEFF1;
           border: 1px solid #37474F; border-radius: 7px; padding: 6px 8px;
           font: inherit; font-size: 12px; resize: vertical; }
.rm-foot { padding: 7px 13px; font-size: 10.5px; color: #78909C;
           background: #10151A; border-top: 1px solid #2A3239; }

/* v1.9.5 — stage picked, then its own form. The reasons CRM allows
   depend on the result chosen, so the second step cannot be skipped. */
.rm-item.is-picked {
  background: #1c2e37;
  box-shadow: inset 3px 0 0 #4c8eaf;
}
.rm-item.is-picked .rm-item-lbl { color: #95cbe6; }

.rm-detail { padding: 9px 11px; border-top: 1px solid #2A3239; }
.rm-reason {
  width: 100%; background: #0E1216; color: #ECEFF1;
  border: 1px solid #37474F; border-radius: 7px; padding: 6px 8px;
  font: inherit; font-size: 12px; margin-bottom: 4px;
}

/* One leg vs both parties. Two buttons rather than a checkbox: "one leg"
   unticked is ambiguous between "both parties" and "never answered", and
   the difference matters to how a lost demo reads later. */
.rm-leg { display: flex; gap: 6px; margin-bottom: 4px; }
.rm-leg-btn {
  flex: 1; background: #0E1216; color: #B0BEC5;
  border: 1px solid #37474F; border-radius: 7px; padding: 6px 8px;
  font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.rm-leg-btn:hover { background: #1A2128; color: #ECEFF1; }
.rm-leg-btn.is-on {
  background: #1565C0; color: #fff; border-color: #0D47A1;
}

.rm-go {
  width: 100%; margin-top: 8px; padding: 8px 10px;
  background: linear-gradient(135deg, #1a4459, #2c5e77);
  color: #fff; border: none; border-radius: 8px;
  font: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer;
  letter-spacing: 0.3px;
}
.rm-go:hover { filter: brightness(1.12); }
