/*
 * Lead reminders with a countdown, the lead's number, the next step and stars on cards (lane t22-leadux, 7 Oct 2026;
 * js/v21_leadux.js 1.0.0, js/v21_leadjob.js 1.6.0). The desk's own tokens, so every theme follows, light and dark and
 * High contrast; borders carry each state under forced colours. No inline styles. Nothing animates but the hover.
 */

/* ---------- the star on any card: its own column at the right of the card, above the card's press ---------- */
.card.lux-has-star { grid-template-columns: 40px minmax(0, 1fr) auto 32px; }
.lux-star {
  position: relative; z-index: 2; align-self: start; justify-self: end; display: inline-grid; place-items: center;
  width: 32px; height: 32px; margin: -6px -10px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: var(--ink-3); cursor: pointer;
}
.lux-star:hover { color: var(--ink); background: var(--glass-hover); }
.lux-star:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.lux-star.is-on { color: var(--warn); }
.lux-star.is-on .lux-ico { fill: currentColor; }
.lux-star[disabled] { opacity: .6; cursor: progress; }
/* a held card (the card lock's 56 px critter column, styles/v21_cardlock.css) and a staff ask card keep the star's column */
:root:not([data-quiet="on"]) .card.kcl-on.lux-has-star { grid-template-columns: 56px minmax(0, 1fr) auto 32px; }
.card.sa-card.lux-has-star { grid-template-columns: 40px minmax(0, 1fr) auto 32px; }
/* phone width: the card is two columns (styles/desk.css); the star takes a third, narrow one on the title's row */
@media (max-width: 599px) {
  .card.lux-has-star { grid-template-columns: 40px minmax(0, 1fr) 32px; }
  .card.lux-has-star > .lux-star { grid-column: 3; grid-row: 1; }
  .card.lux-has-star > .side, .card.lux-has-star > .holder { grid-column: 2 / 4; }
  :root:not([data-quiet="on"]) .card.kcl-on.lux-has-star { grid-template-columns: 44px minmax(0, 1fr) 32px; }
  .card.sa-card.lux-has-star { grid-template-columns: 32px minmax(0, 1fr) 32px; }
  .lux-c { grid-column: 2 / -1; margin-top: 0; }
}
.card.is-lux-starred { box-shadow: inset 3px 0 0 var(--warn), inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim), var(--shadow-1); }

/* ---------- the lead row on the card: the countdown, the hint, the number ---------- */
.lux-c {
  grid-column: 2 / -1; position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 10px; margin-top: -6px; pointer-events: none;
}
.lux-c > * { pointer-events: auto; }
.lux-c .lux-chip { pointer-events: none; }
.lux-c-note { color: var(--ink-2); font-size: .8125rem; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.lux-ico { flex: none; }

.lux-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 8px; border-radius: 999px;
  border: 1.5px solid currentColor; font-size: .8125rem; line-height: 1.25rem; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--ink-2); background: var(--solid);
}
.lux-chip.is-later { color: var(--info); background: color-mix(in srgb, var(--info) var(--tint-alpha, 10%), var(--solid)); }
.lux-chip.is-soon { color: var(--warn); background: color-mix(in srgb, var(--warn) var(--tint-alpha, 12%), var(--solid)); }
.lux-chip.is-due { color: var(--solid); background: var(--warn); border-color: var(--warn); }
.lux-chip.is-overdue { color: var(--solid); background: var(--danger); border-color: var(--danger); }
.lux-chip-job { font-size: .9375rem; padding: 4px 12px 4px 10px; }

.lux-hint {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 10px; border-radius: 999px;
  border: 1.5px dashed var(--glass-rim); background: transparent; color: var(--ink-3); font: inherit; font-size: .8125rem;
  font-weight: 600; cursor: pointer;
}
.lux-hint:hover { color: var(--ink); border-color: var(--ink-3); }
.lux-hint:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

.lux-phone { display: inline-flex; align-items: center; gap: 4px; }
.lux-tel {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 10px; border-radius: 999px;
  color: var(--brand-text); background: var(--brand-soft); font-size: .8125rem; font-weight: 700; text-decoration: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.lux-tel:hover { text-decoration: underline; }
.lux-tel:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.lux-tel.is-plain { color: var(--ink-2); background: transparent; }
.lux-copy {
  display: none; align-items: center; gap: 4px; min-height: 28px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--glass-rim); background: var(--solid); color: var(--ink-2); font: inherit; font-size: .75rem;
  font-weight: 600; cursor: pointer;
}
.lux-copy:hover { color: var(--ink); }
.lux-copy:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
/* Copy is for a computer (a mouse); on a phone the number itself rings */
@media (hover: hover) and (pointer: fine) {
  .lux-copy { display: inline-flex; }
}
.lux-phone-job .lux-tel { font-size: .9375rem; min-height: 32px; padding: 4px 12px; }

/* ---------- the next step, under the sticker of the open lead job ---------- */
.lux-next {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; margin-top: 8px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--glass-rim); background: var(--solid);
}
.lux-next-k {
  padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); border: 1.5px solid currentColor; white-space: nowrap;
}
.lux-next-l { font-size: 1rem; line-height: 1.4rem; font-weight: 600; color: var(--ink); }
.lux-next-x { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.lux-next.is-now { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.lux-next.is-now .lux-next-k { color: var(--warn); }
.lux-next.is-wait .lux-next-k { color: var(--info); }
.lux-next.is-plan .lux-next-k { color: var(--brand-text); }
@media (max-width: 760px) {
  .lux-next { grid-template-columns: minmax(0, 1fr); }
  .lux-next-x { justify-content: flex-start; }
}

/* ---------- t22-fixQ: the contract's signing under the Waiting line (lead.signWatch, js/v21_leadux.js 1.1.0): the
   contract's own line, each signer with their status and time, and the Activity list, newest first ---------- */
.lux-next > .lux-sw { grid-column: 1 / -1; }
.lux-sw { display: grid; gap: 8px; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--glass-rim); }
.lux-sw-line { margin: 0; color: var(--ink-2); font-size: .875rem; line-height: 1.3rem; }
.lux-sw-who { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lux-sw-p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .875rem; line-height: 1.3rem; }
.lux-sw-n { min-width: 15rem; color: var(--ink); }
.lux-sw-st {
  display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; border: 1.5px solid currentColor;
  font-size: .8125rem; font-weight: 700; white-space: nowrap; color: var(--ink-2); background: var(--solid);
}
.lux-sw-st.is-wait { color: var(--info); background: color-mix(in srgb, var(--info) var(--tint-alpha, 10%), var(--solid)); }
.lux-sw-st.is-warm { color: var(--warn); background: color-mix(in srgb, var(--warn) var(--tint-alpha, 12%), var(--solid)); }
.lux-sw-st.is-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) var(--tint-alpha, 12%), var(--solid)); }
.lux-sw-st.is-bad { color: var(--danger); background: color-mix(in srgb, var(--danger) var(--tint-alpha, 10%), var(--solid)); }
.lux-sw-st.is-quiet { color: var(--ink-3); border-style: dashed; }
.lux-sw-at, .lux-sw-w { font-variant-numeric: tabular-nums; }
.lux-sw-act { display: grid; gap: 4px; }
.lux-sw-h { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.lux-sw-act-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.lux-sw-act-l:not(.is-all) > .is-extra { display: none; }
.lux-sw-a {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline;
  font-size: .8125rem; line-height: 1.25rem;
}
.lux-sw-k { font-size: .6875rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.lux-sw-a.is-sign .lux-sw-k { color: var(--brand-text); }
.lux-sw-t { color: var(--ink); overflow-wrap: anywhere; }
.lux-sw-w { white-space: nowrap; }
.lux-sw-more { justify-self: start; }
.lux-sw-older { margin: 0; font-size: .75rem; }
@media (max-width: 760px) {
  .lux-sw-n { min-width: 0; }
  .lux-sw-a { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .lux-sw-w { grid-column: 2; white-space: normal; }
}

/* ---------- the lead job laid out around its next step: the status across the top, the reminder and the form
   answers side by side under it, the notes and the emails under them; one column on a phone ---------- */
.ldj-418.lux-lay { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.ldj-418.lux-lay > [data-leadjob="choice"] { grid-column: 1 / -1; grid-row: 1; }
.ldj-418.lux-lay > [data-leadjob="remind"] { grid-column: 1; grid-row: 2; }
.ldj-418.lux-lay > .ldj-form { grid-column: 2; grid-row: 2; max-height: 30rem; overflow: auto; overscroll-behavior: contain; }
.ldj-418.lux-lay:not(.has-form) > [data-leadjob="remind"] { grid-column: 1 / -1; }
.ldj-418.lux-lay > .l418-wrap { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .ldj-418.lux-lay { grid-template-columns: minmax(0, 1fr); }
  .ldj-418.lux-lay > [data-leadjob="choice"], .ldj-418.lux-lay > [data-leadjob="remind"], .ldj-418.lux-lay > .ldj-form,
  .ldj-418.lux-lay > .l418-wrap { grid-column: 1; grid-row: auto; }
  .ldj-418.lux-lay > [data-leadjob="choice"] { order: 1; }
  .ldj-418.lux-lay > [data-leadjob="remind"] { order: 2; }
  .ldj-418.lux-lay > .ldj-form { order: 3; max-height: none; }
  .ldj-418.lux-lay > .l418-wrap { order: 4; }
}

/* ---------- the reminder box ---------- */
.lux-rem {
  display: grid; gap: 8px; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--solid);
  border: 1px solid var(--glass-rim);
}
.lux-rem.is-due, .lux-rem.is-overdue { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.lux-rem.is-overdue { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.lux-rem-h { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.lux-rem-h h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.lux-hintline, .lux-shut { margin: 0; font-size: .875rem; line-height: 1.3rem; color: var(--ink-2); }
.lux-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lux-now-w { font-size: .9375rem; }
.lux-note { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--glass-1, var(--brand-soft)); font-size: .875rem; overflow-wrap: anywhere; }
.lux-asked {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border-radius: 8px;
  border: 1px dashed var(--info); font-size: .875rem;
}
.lux-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lux-lbl { margin: 4px 0 0; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.lux-lbl-in { display: block; margin-bottom: 4px; }
.lux-what { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lux-seg, .lux-pick {
  min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--glass-rim); background: var(--solid);
  color: var(--ink); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; text-align: center;
}
.lux-seg:hover, .lux-pick:hover { border-color: var(--ink-3); }
.lux-seg:focus-visible, .lux-pick:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.lux-seg.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.lux-seg[disabled], .lux-pick[disabled] { opacity: .55; cursor: not-allowed; }
.lux-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 6px; }
.lux-pick { display: grid; gap: 1px; text-align: left; }
.lux-pick-l { font-weight: 700; }
.lux-pick-w { color: var(--ink-2); font-size: .8125rem; font-weight: 500; }
.lux-in {
  width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--glass-rim);
  background: var(--solid); color: var(--ink); font: inherit; font-size: .875rem;
}
.lux-in:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.lux-dt { width: auto; min-width: 14rem; color-scheme: light dark; }
.lux-ok { margin: 0; color: var(--ink-2); font-size: .8125rem; font-weight: 600; }
.lux-err { margin: 0; color: var(--danger); font-size: .8125rem; font-weight: 600; }
.lux-hist summary { cursor: pointer; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.lux-hist summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.lux-hist-l { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: .8125rem; line-height: 1.25rem; }
@media (max-width: 760px) {
  .lux-what { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lux-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lux-dt { width: 100%; }
  .lux-acts .btn { flex: 1 1 auto; }
}

/* ---------- forced colours: every state keeps its border ---------- */
@media (forced-colors: active) {
  .lux-chip, .lux-next, .lux-rem, .lux-seg, .lux-pick, .lux-tel, .lux-sw-st { border: 1px solid CanvasText; }
  .lux-star.is-on .lux-ico { fill: Highlight; }
}
