/* ===========================================================================
   Add a lead / Add a company
   =========================================================================== */

.hairline { height: 1px; background: #EDEDED }

/* Two mutually exclusive ways to name the company. A segmented control rather
   than chips, because picking one hides the other's fields. */
/* A segmented control: one grey track, the chosen half lifted out of it in
   white with a faint edge, the way the Deals bar marks its chosen chip. */
/* The track is one control the height and corner of the fields it sits
   among (44, --r-btn); the halves inside nest 2px in, so their corner is
   --r-btn less 2 (design/corners-and-spacing.md). Inside, the standard
   button: 13px type, an 18px icon 8px from its label, 16 / 12 sides. */
.segment {
  display: flex; gap: 2px; padding: 2px;
  border-radius: var(--r-btn); background: var(--page);
}
.segment__btn {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: calc(max(44px, var(--control-h)) - 4px); padding: 4px 16px; font-family: inherit;
  font-size: 13px; font-weight: var(--weight-strong); line-height: 1.25; text-align: left;
  border-radius: calc(var(--r-btn) - 2px); cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--muted);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.segment__btn .ms { font-size: 18px }
.segment__btn:has(> .ms:first-child) { padding-left: 12px }
.segment__btn:hover { color: var(--text) }
.segment__btn[aria-pressed="true"] { background: var(--card); border-color: var(--hair); color: var(--text) }
.segment__btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px }

/* Rows split by hairlines straight under the search, not a stack of bordered
   cards: the chosen one takes the grey wash and its tick. */
.picklist {
  margin-top: 8px; max-height: 216px;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
}
.pickrow {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 10px; border-radius: 10px; cursor: pointer; font-family: inherit; color: var(--text);
  border: 0; background: none; position: relative;
  transition: background .14s ease;
}
.pickrow + .pickrow::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 1px; background: var(--hair);
}
.pickrow:hover, .pickrow[aria-pressed="true"] { background: var(--page) }
.pickrow:hover::before, .pickrow:hover + .pickrow::before,
.pickrow[aria-pressed="true"]::before, .pickrow[aria-pressed="true"] + .pickrow::before { opacity: 0 }
.pickrow:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px }
.pickrow__mark {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  background: var(--coral); color: var(--on-coral);
  display: grid; place-items: center; font-size: 11px; font-weight: var(--weight-strong);
}
.pickrow__name { font-size: 13.5px; font-weight: var(--weight-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.pickrow__site { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
/* Present at all times so picking one does not shift the row. */
.pickrow__tick { font-size: 18px; color: transparent }
.pickrow[aria-pressed="true"] .pickrow__tick { color: var(--text) }
