/* =============================================================== EXEC TASKS
 * os.asgt.sa — Executive Office → Tasks.
 *
 * Every rule here is .os-tasks or .os-tasks__*. Nothing redefines an
 * .asgt-* class: the pagehead, card, entity, check, badge, well, button,
 * field and empty/placeholder components are used exactly as the design
 * system ships them and only POSITIONED from here. Colours, sizes, radii
 * and spacing are --asgt-* tokens, never literals.
 *
 * Its own file rather than a block in tokens-v2.css, which is being deleted
 * screen by screen; a new screen must not tie its life to that sheet.
 *
 * Logical properties throughout, so dir="rtl" is the whole Arabic change.
 */

/* The wrapper IS .asgt-container.asgt-stack (see os-tasks.js) — this adds
   only what a page mounted inside .workspace-body needs that neither of
   those two already gives it: its own scroll and block-direction padding. */
.os-tasks {
  block-size: 100%;
  overflow-y: auto;
  padding-block: var(--asgt-s-6);
}

/* Heading row above each group's list — the count (or, for Done, the
   show/hide button) sits right after its eyebrow. On the far edge it read as
   a stray number belonging to nothing (seen in the preview, 30 Sep 2026). */
.os-tasks__group-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: var(--asgt-s-3);
}
.os-tasks__group-count {
  font-family: var(--asgt-font-data);
  font-variant-numeric: tabular-nums;
  font-size: var(--asgt-t-xs);
  color: var(--asgt-text-faint);
}

/* While a checkbox save is in flight the whole card dims and stops taking
   input. RLS can refuse a write by returning zero rows rather than an
   error, so this state has to hold until that answer is actually back. */
.os-tasks__card[data-saving="true"] {
  opacity: .6;
  pointer-events: none;
}

/* A task's free-text detail. Pre-wrap: the owner's own line breaks are part
   of what he wrote, not something to collapse into one run-on line. */
.os-tasks__detail {
  white-space: pre-wrap;
  margin: 0;
}

/* The ready-to-send message lives in an .asgt-well; these rules are only
   the text face and the action row inside it. Deliberately NOT the data
   font — a message to a supplier is prose, not a spec, and reads as prose. */
.os-tasks__msg-eyebrow {
  margin: 0 0 var(--asgt-s-2);
}
.os-tasks__msg-body {
  white-space: pre-wrap;
  margin: 0 0 var(--asgt-s-3);
  font-size: var(--asgt-t-base);
  line-height: var(--asgt-lh-body);
}
.os-tasks__msg-actions {
  display: flex;
  gap: var(--asgt-s-2);
  flex-wrap: wrap;
}

/* "Done <date> by <email>" — the date and the email inside it carry
   .asgt-data themselves (see os-tasks.js); this only sizes the line. */
.os-tasks__done-line {
  margin: 0;
  font-size: var(--asgt-t-xs);
}

/* A refusal named beside the task it belongs to, never a blank or a silent
   revert. --asgt-out is the same "wrong" red the rest of the system uses
   for a failure — never the brand magenta, which is a primary action. */
.os-tasks__error {
  margin: var(--asgt-s-2) 0 0;
  font-size: var(--asgt-t-xs);
  font-weight: 700;
  color: var(--asgt-out);
}

/* The inline "Add task" form — a plain .asgt-card of .asgt-field rows.
   Nothing here but the row that ends it. */
.os-tasks__form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--asgt-s-2);
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .os-tasks__group-head { flex-wrap: wrap; }
}
