/*
 * TAG Legal Desk v2.1: staff asks (js\v21_staffask.js, contract\STAFF_ASK.md).
 * A step that waits on one person is a clear card on their own board: "For you: {ask}", the why under it, small tags
 * for the client and the time, and Do it, Done and "Add a note" on the right (under the words at phone width).
 * It is a card, not a button: no pointer hand and no lift, only its own buttons answer a press. Nothing on it moves, so
 * Calm, reduced motion and the quiet states change nothing. High contrast, forced colours and print have plain rules.
 */

.card.sa-card { cursor: default; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; }
.card.sa-card:hover { transform: none; }
.card.sa-card::before { display: none; }
.card.sa-card { box-shadow: inset 3px 0 0 var(--brand), inset 0 1px 0 var(--glass-hi), 0 0 0 1px var(--glass-rim), var(--shadow-1); }
.card.sa-card .glyph { margin-top: 2px; }
.card.sa-card > .body, .card.sa-card > .sa-acts { pointer-events: auto; }
.sa-body .l1, .sa-body .l2 { margin: 0; }
.sa-ask { overflow-wrap: anywhere; }
.sa-for { font-weight: 700; color: var(--brand-text); }
.sa-why { overflow-wrap: anywhere; }
.sa-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; max-width: 280px; }
.sa-doit { text-decoration: none; color: var(--ink); }
.sa-done[disabled] { opacity: .7; cursor: default; }
.sa-notebtn { min-height: 32px; }
.sa-notewrap { margin-top: 10px; }
.sa-note {
  width: 100%; max-width: 520px; min-height: 36px; padding: 6px 10px; border-radius: 10px; font: inherit; font-size: .875rem;
  color: var(--ink); background: var(--solid); border: 1px solid var(--glass-edge);
}
.sa-note:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.card.sa-card.is-busy { opacity: .85; }

/* ---------- phone width: the buttons go under the words ---------- */
@media (max-width: 599px) {
  .card.sa-card { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .card.sa-card .glyph { width: 32px; height: 32px; }
  .sa-acts { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
}

/* ---------- High contrast: white card, black edge and words ---------- */
:root[data-theme="high_contrast"] .card.sa-card { background: #FFFFFF; color: #000000; border: 2px solid #000000; box-shadow: inset 6px 0 0 #000000; }
:root[data-theme="high_contrast"] .sa-for, :root[data-theme="high_contrast"] .sa-why { color: #000000; }
:root[data-theme="high_contrast"] .sa-note { background: #FFFFFF; color: #000000; border: 2px solid #000000; }

/* ---------- forced colours: the system's own colours ---------- */
@media (forced-colors: active) {
  .card.sa-card { border: 2px solid CanvasText; background: Canvas; color: CanvasText; box-shadow: none; }
  .sa-for { color: CanvasText; }
  .sa-note { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
}

/* ---------- print: the words, a plain edge, no buttons ---------- */
@media print {
  .card.sa-card { background: none !important; border: 1px solid #000000 !important; box-shadow: none !important; color: #000000; }
  .sa-acts, .sa-notewrap { display: none !important; }
}
