/*
 * A lead question for Jonty and Steve (lane t22-leadask, 7 Oct 2026; js/v21_leadask.js): the third way under the lead's
 * status choices with its question box, the question's panel at the top of the open lead job (Accept, the send back
 * box, the instructions), and its one line on the board card. The desk's own tokens, so it follows every theme, light
 * and dark and High contrast. Nothing moves. No inline styles.
 */

/* ---------- the third way, under the four ---------- */
.lda-choice { display: grid; gap: 8px; margin-top: 2px; }
.lda-or { margin: 0; }
.lda-opt { border-style: dashed; }
.lda-opt.is-on { border-style: solid; }
.lda-dot { border-radius: 5px; }
.lda-box {
  display: grid; gap: 8px; padding: 12px; border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--brand-text) 40%, transparent); background: var(--solid);
}

/* ---------- the words boxes ---------- */
.lda-label { font-weight: 700; font-size: .9375rem; }
.lda-ta {
  width: 100%; min-height: 4.5rem; resize: vertical; padding: 8px 10px; border-radius: 10px;
  border: 2px solid var(--glass-rim); background: var(--solid); color: var(--ink); font: inherit; line-height: 1.4rem;
}
.lda-ta:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.lda-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lda-note, .lda-was, .lda-held { margin: 0; }
.lda-err { margin: 0; color: var(--danger); font-weight: 600; font-size: .875rem; }

/* ---------- the question at the top of the open job ---------- */
.ldj-topwrap { max-width: 1160px; margin: 0 auto 12px; display: grid; gap: 10px; }
.ldj-topwrap > .ldj-top { margin: 0; }
.lda-top {
  display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--solid); color: var(--ink);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-text) 55%, transparent);
}
.lda-top.lda-returned { box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 65%, transparent); }
.lda-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lda-head h2 { margin: 0; font-size: 1.0625rem; }
.lda-tag {
  flex: none; padding: 1px 8px; border-radius: 5px; background: var(--brand-text); color: var(--solid);
  font-size: .8125rem; font-weight: 800; letter-spacing: .06em;
}
.lda-returned .lda-tag, .lda-card-returned .lda-tag { background: var(--warn); }
.lda-q {
  margin: 0; padding: 8px 12px; border-left: 4px solid var(--brand-text); border-radius: 4px;
  background: var(--brand-soft); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.45rem;
}
.lda-returned .lda-q { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--solid)); }
.lda-line { margin: 0; font-size: .9375rem; line-height: 1.4rem; }

/* ---------- the board card ---------- */
.lda-card {
  display: flex; align-items: flex-start; gap: 6px; margin: 0 0 6px; color: var(--ink);
  font-size: .75rem; line-height: 1.125rem; font-weight: 600;
}
.lda-tag-card { font-size: .6875rem; padding: 0 6px; }
.lda-card-l { min-width: 0; overflow-wrap: anywhere; }
.is-leadask-wait { opacity: .78; }
.lda-card-l { display: grid; gap: 2px; }
.lda-card-rise { color: var(--warn); font-weight: 700; }
.lda-rise { margin: 0; color: var(--warn); font-weight: 700; font-size: .9375rem; }

/* ---------- the asker's stub: greyed, never opens, Withdraw on the card ---------- */
.is-leadask-stub { filter: grayscale(.55); }
.is-leadask-stub .card-hit { cursor: default; }
.lda-stub-row {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 6px 10px; grid-column: 1 / -1; margin-top: 6px;
}

/* ---------- High contrast and forced colours: borders carry it ---------- */
:root[data-theme="high_contrast"] .lda-top, :root[data-theme="high_contrast"] .lda-box { box-shadow: none; border: 3px solid #000; background: #fff; color: #000; }
:root[data-theme="high_contrast"] .lda-q { border-left-color: #000; background: #fff; color: #000; }
:root[data-theme="high_contrast"] .lda-tag { background: #000; color: #fff; }
:root[data-theme="high_contrast"] .is-leadask-wait { opacity: 1; }
:root[data-theme="high_contrast"] .is-leadask-stub { filter: none; border-style: dashed; }
@media (forced-colors: active) {
  .lda-top, .lda-box { border: 2px solid CanvasText; }
  .lda-tag { border: 1px solid CanvasText; }
  .is-leadask-wait { opacity: 1; }
}
