/*
 * Help requests (lane t22-help, 15 Oct 2026; js/v3_help.js 1.0.0). Only the desk's own tokens, so every theme follows
 * (light, dark, Eucalypt, Harbour, High contrast). No inline styles. Nothing here draws while features.helpRequests is
 * off: every rule hangs off .v3h-*, which only that file adds.
 */

/* ---------- the help card on the board ---------- */
.card.v3h-card {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; min-height: 0;
  padding: 16px 20px 14px; cursor: default; color: var(--ink);
  box-shadow: inset 4px 0 0 var(--brand), inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim), var(--shadow-1);
}
.card.v3h-card:hover { transform: none; }
.card.v3h-card::before { display: none; }
.card.v3h-card.is-leads { box-shadow: inset 4px 0 0 var(--warn), inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim), var(--shadow-1); }
.card.v3h-card.is-busy { opacity: .82; }

.v3h-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; font-size: .8125rem; line-height: 1.25rem; }
.v3h-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-text); font-weight: 700;
}
.v3h-card.is-leads .v3h-chip { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--warn); }
.v3h-who { font-weight: 700; color: var(--ink); }
.v3h-client { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.v3h-time { margin-left: auto; color: var(--ink-3); white-space: nowrap; }

.v3h-request {
  margin: 2px 0 0; font-size: 1.25rem; line-height: 1.75rem; font-weight: 650; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.v3h-by { margin: -4px 0 0; font-size: .8125rem; color: var(--ink-3); }

.v3h-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.v3h-msg {
  padding: 10px 12px; border-radius: 12px; background: var(--glass-1); border: 1px solid var(--glass-rim);
  max-width: 92%; justify-self: start;
}
.v3h-msg.is-mine { justify-self: end; background: var(--brand-soft); border-color: transparent; }
.v3h-msg-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .75rem; line-height: 1.125rem; color: var(--ink-2); }
.v3h-msg-h b { color: var(--ink); font-weight: 700; }
.v3h-at { color: var(--ink-3); }
.v3h-msg-t { margin: 4px 0 0; font-size: .9375rem; line-height: 1.375rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.v3h-more { justify-self: start; min-height: 32px; padding: 0 6px; }

.v3h-note { margin: 0; font-size: .875rem; line-height: 1.3125rem; color: var(--ink-2); }
.v3h-lab { display: block; margin: 4px 0 -4px; font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.v3h-ta, .v3h-sel {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--edge-strong);
  background: var(--solid); color: var(--ink); font: inherit; font-size: .9375rem; line-height: 1.375rem;
}
.v3h-ta { resize: vertical; min-height: 76px; }
.v3h-sel { min-height: 44px; }
.v3h-ta:focus-visible, .v3h-sel:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.v3h-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.v3h-acts .btn { min-height: 40px; }
.v3h-foot { display: flex; justify-content: flex-start; margin-top: -2px; }
.v3h-src { min-height: 32px; padding: 0 6px; color: var(--ink-2); }

/* ---------- "I need help with this" ---------- */
.v3h-ask { position: relative; z-index: 2; pointer-events: auto; white-space: nowrap; }
.v3h-bar { margin-left: auto; display: flex; align-items: center; }
.cc-btns[data-v3h] { flex-wrap: wrap; }
.v3h-sheet { display: grid; gap: 10px; }
.v3h-sheet-wait { margin: 8px 0; color: var(--ink-2); }
.v3h-about { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; color: var(--ink); }
.v3h-msg-line { min-height: 1.25rem; margin: 0; font-size: .875rem; color: var(--ink-2); }
.v3h-sheet-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

@media (max-width: 600px) {
  .card.v3h-card { padding: 14px 14px 12px; }
  .v3h-request { font-size: 1.125rem; line-height: 1.625rem; }
  .v3h-time { margin-left: 0; }
  .v3h-msg { max-width: 100%; }
  .v3h-acts .btn { flex: 1 1 auto; justify-content: center; }
  .v3h-bar { margin-left: 0; }
  .cc-btns[data-v3h] > .v3h-ask { flex: 1 1 100%; justify-content: center; order: 3; }
}

:root[data-theme="high_contrast"] .card.v3h-card { box-shadow: inset 6px 0 0 #000; border: 2px solid #000; }
:root[data-theme="high_contrast"] .v3h-msg, :root[data-theme="high_contrast"] .v3h-ta, :root[data-theme="high_contrast"] .v3h-sel { border: 2px solid #000; }

/* ---------- "What looks wrong?" (t22-helppicks, js/v3_help.js 1.1.0): drawn only while GET /v21/help/people lists
   picks (desk.help.picks on), and on a help card made with a pick ---------- */
.v3h-pickset { display: grid; gap: 8px; }
.v3h-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.v3h-pick-b { min-height: 40px; white-space: normal; text-align: left; }
.v3h-pick-b[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 2px var(--brand); font-weight: 700; }
.v3h-pick-b:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.v3h-pick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; justify-self: start; margin: 2px 0 0; padding: 6px 12px;
  border-radius: 12px; background: var(--glass-1); border: 1px solid var(--glass-rim); color: var(--ink);
  font-size: .9375rem; line-height: 1.375rem; overflow-wrap: anywhere;
}
.v3h-pick .ico { flex: none; color: var(--warn); }
.v3h-pick-q { color: var(--ink-2); }
.v3h-pick b { font-weight: 700; }
.v3h-pick.is-big { font-size: 1.125rem; line-height: 1.625rem; }
@media (max-width: 600px) {
  .v3h-pick-b { flex: 1 1 100%; justify-content: flex-start; }
}
:root[data-theme="high_contrast"] .v3h-pick-b[aria-pressed="true"] { outline: 3px solid #000; }
