/* TRELLAN: the Work queue screens. Report 258.

   Boards Queue and m-queue. Decision 5: no outlined button per row; a
   quiet green "Review ›" / "Open ›" at a fixed width; the whole row opens
   the item, with Mist on hover; a task's "Mark done" is a check box at the
   start of its row (`.tr-check`, a real form). Every rule is scoped to the
   queue's own classes (`wq-*`). */

/* ── By due date: the table ─────────────────────────────────────────── */
.wq-table thead th {
  background: #FFFFFF; border-bottom: 1px solid var(--ink); padding: 14px 16px;
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 2.4px; text-transform: uppercase; color: var(--gray);
}
.wq-table thead th[aria-sort]:not([aria-sort="none"]) { color: var(--ink); }
.wq-th__arrow { font-size: 13px; }
.wq-table td { padding: 14px 16px; height: 84px; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.wq-td__title { font-weight: 400; color: var(--ink); font-size: 15px; }
.wq-td__meta { color: var(--gray); }
.wq-td--person, .wq-td--team { color: var(--charcoal); }
.wq-td--due { color: var(--charcoal); }
.wq-td--overdue { color: var(--alert-fg); font-weight: 700; }

/* The whole row opens the item: the title's link covers the row; the check
   box, the "Review ›" link and the assign form sit above it. */
.wq-tr { position: relative; }
.wq-tr a.wq-td__title { text-decoration: none; }
.wq-tr a.wq-td__title::after { content: ""; position: absolute; inset: 0; }
.wq-tr a.wq-td__title:focus-visible { outline: none; }
.wq-tr a.wq-td__title:focus-visible::after { outline: 2px solid var(--leaf); outline-offset: -2px; }
.wq-tr .wq-check, .wq-tr .wq-go, .wq-tr .task-assign, .wq-tr form { position: relative; z-index: 1; }
.wq-tr:hover > td { background: var(--mist); }
.wq-tr--late > td { background: #FFFBF9; }
.wq-tr--late > td:first-child { box-shadow: inset 3px 0 0 var(--alert-dot); }

/* The check box leads the "what to do" cell; the words line up after it. */
.wq-td--what { position: static; }
.wq-table .wq-td--what { padding-left: 52px; }
/* The box hangs in the 52 px gutter, so the words beside it and under it
   line up. */
.wq-table .wq-check { display: inline-flex; float: left; margin: 1px 0 0 -36px; }

/* The one quiet link, at a fixed width so the column lines up. */
.wq-td--act { text-align: right; }
.wq-go { display: inline-flex; justify-content: flex-start; width: 96px; }
.wq-go > span { font-size: 16px; letter-spacing: 0; margin-left: 4px; }
/* Assigning: a quiet "Assign ›" that opens the form as a small menu. */
.wq-assign { position: relative; z-index: 2; display: inline-block; text-align: left; }
.wq-tr .wq-assign { position: relative; z-index: 2; }
.wq-assign > summary { list-style: none; cursor: pointer; width: 96px; }
.wq-assign > summary::-webkit-details-marker { display: none; }
.wq-assign > summary > span { font-size: 16px; letter-spacing: 0; margin-left: 4px; }
.wq-assign[open] > summary > span { display: inline-block; transform: rotate(90deg); }
.wq-assign__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  width: 280px; padding: 12px; background: #FFFFFF;
  border: 1px solid var(--hairline); box-shadow: var(--menu-shadow);
}
.wq-assign__menu .task-assign { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.wq-assign__menu select { width: 100%; }
.wq-td--act .wq-assign__menu .task-assign { margin-left: 0; }
.wq-pinned { color: var(--alert-fg); }
.wq-pinned .ms { display: none; }
.wq-pinned::before { content: ""; width: 8px; height: 8px; background: var(--alert-dot); flex: none; }

/* ── By person: the cards ──────────────────────────────────────────── */
.wq-row--link:hover, .wq-row--with-act:hover { background: var(--mist); }
.wq-row__title { font-weight: 400; color: var(--ink); }
.wq-row__meta { color: var(--gray); }
.wq-row__due { color: var(--charcoal); font-weight: 600; }
.wq-row__due--overdue { color: var(--alert-fg); }
.wq-row .wq-check { float: none; margin: 0; }
.wq-person__name, .wq-card__name { color: var(--ink); }

/* Report 267. A white card on a hairline, no fill, so the hover shows. The
   head on hover, and an open card's head, take the rail's current-item
   signal: Mist and a 3 px green rule. Overdue keeps a brick rule. */
.wq-person { background: #FFFFFF; border: 1px solid var(--hairline); border-radius: 0; }
.wq-person__head:hover, .wq-person[open] > .wq-person__head {
  background: var(--mist); box-shadow: inset 3px 0 0 var(--green);
}
.wq-person--late > .wq-person__head,
.wq-person--late > .wq-person__head:hover,
.wq-person--late[open] > .wq-person__head { box-shadow: inset 3px 0 0 var(--alert-dot); }
.wq-person__meta, .wq-person__stand { color: var(--gray); }
.wq-person__due { color: var(--charcoal); }
.wq-person--late .wq-person__due { color: var(--alert-fg); }
/* The progress bar, journeys only (`.segs`, trellan.css 5.10). */
.wq-person__segs { width: 120px; min-width: 0; margin-top: 6px; }
/* The one act, in one fixed-width column. */
.wq-person__act { flex: none; width: 120px; display: flex; justify-content: flex-end; }
.wq-person__go > span { font-size: 16px; letter-spacing: 0; margin-left: 4px; }

/* ── Phone: two lines per row, the link at the top right ─────────── */
@media (max-width: 720px) {
  /* A row whose only act is the link: the link at the top right. A row
     that also carries the assign form keeps it on a line of its own. */
  .wq-table tbody tr.wq-tr {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "what act" "person due";
    padding: 14px 16px; border-bottom: 1px solid var(--hairline);
  }
  .wq-table tbody tr.wq-tr > .wq-td--act { text-align: right; }
  /* The row is a grid of cells: tint and rule the row, not each cell. */
  .wq-table tbody tr.wq-tr > td, .wq-tr:hover > td,
  .wq-tr--late > td, .wq-tr--late > td:first-child { background: transparent; box-shadow: none; }
  .wq-table tbody tr.wq-tr:hover { background: var(--mist); }
  .wq-table tbody tr.wq-tr--late { background: #FFFBF9; box-shadow: inset 3px 0 0 var(--alert-dot); }
  .wq-go { width: auto; }
  /* By person: the words keep the full width; the link goes on a line of
     its own under them, lined up with the words. */
  .wq-person__head { align-items: flex-start; }
  .wq-person__side:not(:has(.segs)):has(.wq-person__due:empty) { display: none; }
  .wq-person__act { order: 4; flex-basis: 100%; width: auto; justify-content: flex-start; padding-left: 48px; }
  /* REPORT 268 (S9). The 32 px gutter is for the check box, so only a row
     that has one keeps it; the rest start at the row's own padding. */
  .wq-table tbody tr.wq-tr > .wq-td--what,
  .wq-table tbody tr.wq-tr > .wq-td--person { padding-left: 0; }
  .wq-table tbody tr.wq-tr:has(.wq-check) > .wq-td--what,
  .wq-table tbody tr.wq-tr:has(.wq-check) > .wq-td--person { padding-left: 32px; }
  .wq-table .wq-check { margin-left: -32px; }
  /* "Open ›" and "Assign ›" side by side with room between them. */
  .wq-table tbody tr.wq-tr > .wq-td--act {
    display: flex; flex-wrap: wrap; justify-content: flex-end;
    align-items: baseline; gap: 4px 20px; padding-left: 12px; }
  .wq-table .wq-assign > summary { width: auto; }
  .wq-table tbody tr.wq-tr > .wq-td--person, .wq-table tbody tr.wq-tr > .wq-td--due { font-size: 13px; }
}

/* Phone: "Whose work" folds under Filters with the other fields, as the
   m-queue board (report 263; the fold is `of.toolbar`, trellan.css 6.10). */
@media (max-width: 720px) {
  .wq-chips:has(~ .of-fold:not(:checked)) { display: none; }
}
