/* Karen OS: Leads (leads.js). The page is the shared Leads template (styles.css "Shared patterns"); this file only adds the
   To book rows, the filters, the history list and the small forms inside the pop-up. Tokens only, no inline styles. */

/* The To book list: brand mark, who and what, when to call, whose it is, how long it has waited, the one thing to do */
.ld-bar { justify-content: flex-start; }
.ld-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.ld-pick button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 0; min-height: 40px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; }
.ld-pick button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--green-900); }
.ld-pick i { width: 1px; height: 18px; background: var(--line); }
.list.ld-list { --lrow-cols: 24px minmax(0, 1fr) 190px 84px 170px 72px; }
.ld-list .lrow-mark { overflow: visible; }
.ld-best, .ld-owner { font-size: 14px; color: var(--grey-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld .sechead { margin: 20px 0 8px; }
.ld-wait { margin-top: 20px; }
.ld-wait > summary { font-weight: 700; color: var(--ink); }
.ld-wait > summary .n { font-size: 14px; font-weight: 500; color: var(--muted); }
.ld-badge { flex: none; border-radius: 50%; display: block; }

/* History in the pop-up */
.ld-hist { min-width: 0; }
.ld-hl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ld-hl li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 2px 12px; font-size: 14px; overflow-wrap: anywhere; }
.ld-ht { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* The small forms (pop-up and settings) */
.ld-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ld-f > label, .ld-l { font-size: 13px; font-weight: 600; color: var(--grey-ink); }
.ld-f input[type=number] { width: 120px; min-height: 44px; padding: 0 12px; border: 1px solid var(--input); border-radius: var(--r-ctl); font: inherit; background: var(--surface); }
.ld-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.ld-fa { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ld-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.ld-check { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.ld-pre { margin: 0; white-space: pre-wrap; font: 14px/1.5 var(--font); color: var(--ink); background: var(--ground); border-radius: var(--r-ctl); padding: 12px 14px; overflow-wrap: anywhere; }
.ldset .setfoot { flex-wrap: wrap; }
.ld-saved { margin-right: auto; }

@media (max-width: 1100px) { .list.ld-list { --lrow-cols: 24px minmax(0, 1fr) 84px 170px 72px; } .ld-best { display: none; } }
@media (max-width: 720px) {
  .list.ld-list > .lrow { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .ld-list .lrow-mark, .ld-list .lrow-when { grid-column: auto; }
  .ld-owner, .ld-list .lrow-act { display: none; }
  .ld-grid { grid-template-columns: minmax(0, 1fr); }
  .ld-hl li { grid-template-columns: minmax(0, 1fr); }
}

/* The lead pop-up: a band across the top in the brand's colours */
dialog.pop.ld-pop { padding-top: 0; overflow-x: hidden; }
.ld-band { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  margin: 0 -36px 20px; padding: 18px 64px 16px 36px; background: #F6F6F6; border-bottom: 3px solid #01A3B3; }
.ld-band .ld-badge { grid-row: 1 / span 2; }
.ld-bandname { font-size: 16px; font-weight: 800; color: #323232; }
.ld-bandsrc { font-size: 13px; color: #6D6D6D; overflow-wrap: anywhere; }
.ld-pop.b-c2u .ld-band { background: #560F1C; border-bottom: 5px solid #FDB91C; }
.ld-pop.b-c2u .ld-bandname { color: #FFFFFF; }
.ld-pop.b-c2u .ld-bandsrc { color: #E9D6D9; }
.ld-pop.b-ed .ld-band { background: #FFFFFF; border-bottom-color: #EB6D20; }
.ld-pop.b-ed .ld-bandname { color: #17153A; }
.ld-pop.b-wtg .ld-band { border-bottom-color: #1310E0; }
.ld-pop .pop-x { position: absolute; z-index: 1; }
.ld-pop.b-c2u .pop-x { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
@media (max-width: 720px) { .ld-band { margin: 0 -18px 16px; padding: 14px 56px 12px 18px; } }
/* What the customer wrote, straight under the heading: their words, then when to call. Nothing about ads or pages here. */
.ld-msg { margin: -4px 0 16px; min-width: 0; }
.ld-msg:empty { display: none; }
.ld-msg { display: flex; flex-direction: column; gap: 10px; }
.ld-quote > small { display: block; margin-bottom: 2px; font-size: 13px; color: var(--muted); }
.ld-flag { margin: 0; padding: 10px 14px; background: var(--amber-bg); color: var(--amber); border-radius: var(--r-ctl); font-size: 14px; overflow-wrap: anywhere; }
.ld-out { display: flex; flex-direction: column; gap: 8px; }
.ld-out .btn { justify-content: flex-start; text-align: left; min-height: 44px; }
.ld-seg .btn[aria-pressed="true"] { border-color: var(--green-700); background: var(--green-100); }
.ld-quote { margin: 0; padding: 12px 16px; background: var(--ground); border-left: 3px solid var(--input); border-radius: var(--r-ctl); font-size: 16px; line-height: 1.5; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.ld-callwhen { margin: 0 2px; font-size: 14px; color: var(--grey-ink); }
/* Where it came from: folded away, label and value pairs */
.ld-src { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 8px; font-size: 14px; }
.ld-src dt { color: var(--muted); }
.ld-src dd { margin: 0; overflow-wrap: anywhere; }
.ld-raw { margin-top: 4px; }
