/*
 * TAG Legal Desk v2.1: "Also done when you press Send", line by line (register J136, the Director, 28 Sep 2026).
 * js\v21_actions.js draws it: the job's plain summary, the claim status line, then small headed groups (Claim status,
 * Claims, Conditions, Contact record, Notes, Contact History, WorkDrive, admin@ mail, Reminders and clocks, Emails
 * inside the firm, Client hold, Registers), "Already changed by Fred" and "Not done this time" (muted). A status or
 * field change shows its old value muted and struck, an arrow drawn here, and the new value strong. Every line has a
 * why tip on hover and keyboard focus (.v21-tip, placed by the script through the CSSOM). The desk's tokens only, so
 * Light, Dark, Eucalypt, Harbour, the v2.1 themes and High contrast all read; the desk's focus ring; reduced motion
 * and Calm (no movement at all); forced colours. Compact on a busy job, and wraps at phone widths. No inline styles.
 */

/* ---------- the section ---------- */
.acts { display: grid; gap: 10px; min-width: 0; padding: 12px 14px; border-radius: var(--r-card); }
.acts .act-ico { display: inline-flex; flex: none; color: var(--brand-text); }
.acts-sum { margin: 0; font-size: .875rem; line-height: 1.3rem; font-weight: 600; color: var(--ink); }
.acts-status { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 12px; font-size: .875rem; line-height: 1.3rem; font-weight: 700; color: var(--ink); background: var(--brand-soft); overflow-wrap: anywhere; }
.acts-status .act-ico { margin-top: 2px; }
.acts-status.is-none { font-weight: 600; color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--glass-rim); }
.acts-status.is-none .act-ico { color: var(--ok); }

/* ---------- a group ---------- */
.acts-grp { display: grid; gap: 4px; min-width: 0; }
.acts-h { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: .75rem; line-height: 1rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.acts-h .act-ico { color: var(--ink-3); }
.acts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; }
.act-li { min-width: 0; }
.acts-more { justify-self: start; }

/* ---------- a line ---------- */
.act { display: flex; align-items: flex-start; gap: 8px; width: 100%; min-height: 40px; margin: 0; padding: 7px 10px; border: 0; border-radius: var(--r-chip); background: transparent; color: var(--ink); font-size: .8125rem; line-height: 1.25rem; text-align: left; }
button.act { cursor: pointer; }
button.act:hover { background: var(--glass-2); box-shadow: 0 0 0 1px var(--glass-rim); }
.act .act-ico { margin-top: 2px; }
.act-body { display: grid; gap: 1px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.act-head { font-weight: 600; }
.act-sub { color: var(--ink-2); }
.act-why { color: var(--ink-2); font-style: italic; }
.act-move { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.act-field { color: var(--ink-2); font-weight: 600; }
.act-from { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.act-to { color: var(--ink); font-weight: 800; }
/* The arrow from the old value to the new one, drawn here (no icon, no character). */
.act-arrow { position: relative; display: inline-block; flex: none; width: 16px; height: 2px; margin: 0 5px 0 1px; background: var(--brand-text); }
.act-arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border-style: solid; border-width: 5px 0 5px 7px; border-color: transparent transparent transparent var(--brand-text); }
.act-tag { flex: none; align-self: center; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--ink-2); background: var(--solid-2); }

/* Skipped by the person: stays in place, struck through. */
.act.is-skipped .act-head, .act.is-skipped .act-move, .act.is-skipped .act-sub { text-decoration: line-through; color: var(--ink-3); }
.act.is-skipped .act-to { font-weight: 600; }
.act.is-skipped .act-ico { color: var(--ink-3); }
/* Not done this time (a switch off, or the email it needs is off): muted, with its reason. */
.acts-off .act { color: var(--ink-2); }
.acts-off .act-head, .acts-off .act-to { font-weight: 600; }
.acts-off .act .act-ico, .acts-off .acts-h .act-ico { color: var(--ink-3); }
.acts-off .act-arrow { background: var(--ink-3); }
.acts-off .act-arrow::after { border-left-color: var(--ink-3); }
/* Already changed by Fred: said plainly, with a tick. */
.acts-already .act .act-ico, .acts-already .acts-h .act-ico { color: var(--ok); }

/* ---------- the why tip ---------- */
.v21-tip { position: fixed; z-index: 95; left: 0; top: 0; pointer-events: none; max-width: min(320px, calc(100vw - 16px)); padding: 8px 12px; border-radius: 12px; font-size: .8125rem; line-height: 1.25rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; opacity: 0; transition: opacity var(--t-micro) var(--ease-out); }
.v21-tip.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .v21-tip { transition: none; } }
:root[data-motion="reduced"] .v21-tip, :root[data-calm="on"] .v21-tip { transition: none; }

/* ---------- narrow screens ---------- */
@media (max-width: 560px) {
  .acts { padding: 10px; }
  .act { padding: 8px 6px; }
  .act-tag { align-self: flex-start; }
}

/* ---------- high contrast and forced colours ---------- */
:root[data-theme="high_contrast"] .acts-status { background: #fff; border: 2px solid #000; }
:root[data-theme="high_contrast"] button.act:hover { background: #F2F2F2; box-shadow: 0 0 0 2px #000; }
:root[data-theme="high_contrast"] .act-tag { border: 1px solid #000; background: #fff; color: #000; }
:root[data-theme="high_contrast"] .act-from { color: #1B1B1B; }
:root[data-theme="high_contrast"] .act-arrow { background: #000; }
:root[data-theme="high_contrast"] .act-arrow::after { border-left-color: #000; }
:root[data-theme="high_contrast"] .v21-tip { border: 2px solid #000; background: #fff; color: #000; }
@media (forced-colors: active) {
  .act-arrow { background: CanvasText; }
  .act-arrow::after { border-left-color: CanvasText; }
  .v21-tip { border: 1px solid CanvasText; }
  .acts-status { border: 1px solid CanvasText; }
}
