/* ===========================================================================
   The action queue.

   One job per group, and inside a group one block per way of reaching people,
   because "send eleven mockups" splits into the ones you can email in a batch
   and the ones you have to ring one at a time. Rows are wide and flat rather
   than carded: this is a worklist to go down, not a thing to compare.
   =========================================================================== */

.aq-top {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.1rem;
}
.aq-title { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.aq-sub { margin: .2rem 0 0; font-size: .85rem; color: var(--text-dim); }

.aq-filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.aq-chip {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: .05rem; min-width: 4.4rem; padding: .4rem .7rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text-dim);
  font: inherit; font-size: .72rem;
}
.aq-chip b { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.aq-chip:hover { border-color: var(--border-strong); }
.aq-chip.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.aq-chip.on b { color: var(--accent); }

/* ---------------------------------------------------------------- a group */

.aq-group {
  border: 1px solid var(--border); border-left: 3px solid var(--tone, var(--border-strong));
  border-radius: var(--radius-md); background: var(--bg-card);
  padding: .85rem 1rem 1rem; margin-bottom: 1rem;
}
.aq-group.tone-warning { --tone: var(--warning); }
.aq-group.tone-info    { --tone: var(--info); }
.aq-group.tone-purple  { --tone: var(--purple); }
.aq-group.tone-muted   { --tone: var(--border-strong); opacity: .82; }

.aq-group-head { display: flex; align-items: baseline; gap: .6rem; }
.aq-group-head h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.aq-group-count {
  font-size: .76rem; font-weight: 700; color: var(--tone);
  background: var(--bg-elev); border-radius: 999px; padding: .1rem .5rem;
}
.aq-group-value { margin-left: auto; font-size: .82rem; font-weight: 700; color: var(--text-dim); }
.aq-group-blurb { margin: .2rem 0 .7rem; font-size: .8rem; color: var(--text-dim); }

.aq-chanblock + .aq-chanblock { margin-top: .8rem; }
.aq-chanhead {
  margin: 0 0 .35rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint);
}

/* ------------------------------------------------------------------ a row */

.aq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }

.aq-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "who chan value" "do do do";
  gap: .25rem .7rem; align-items: center;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .55rem .7rem;
}
.aq-row.is-going { opacity: .4; transition: opacity .2s var(--ease-out); }

.aq-who { grid-area: who; min-width: 0; }
/* The business name is one unbreakable run — "Quality Home Remodeling NJ"
   does not wrap at 360px — so it is clipped rather than allowed to push the
   row wider than the phone. */
.aq-who b {
  display: block; font-size: .92rem; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aq-why {
  display: block; font-size: .74rem; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.aq-chan {
  grid-area: chan; font-size: .68rem; font-weight: 700; white-space: nowrap;
  padding: .1rem .45rem; border-radius: 4px;
  background: var(--bg-hover); color: var(--text-dim);
}
.aq-chan.chan-email { background: var(--accent-soft); color: var(--accent); }
.aq-chan.chan-facebook, .aq-chan.chan-instagram { background: var(--purple-soft); color: var(--purple); }
.aq-chan.chan-none { background: var(--danger-soft); color: var(--danger); }

.aq-value { grid-area: value; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.aq-value em { font-style: normal; font-size: .72rem; color: var(--text-dim); margin-left: .25rem; }

.aq-do {
  grid-area: do; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center;
  margin-top: .35rem; padding-top: .4rem; border-top: 1px solid var(--border);
}

.aq-reach, .aq-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-dim);
  padding: .3rem .6rem; font: inherit; font-size: .76rem; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.aq-reach { border-color: var(--accent); color: var(--accent); }
.aq-reach:hover { background: var(--accent-soft); }
.aq-reach.is-none { border-color: var(--border); color: var(--text-faint); cursor: default; }
.aq-btn:hover { border-color: var(--border-strong); color: var(--text); }
.aq-done { margin-left: auto; border-color: var(--success); color: var(--success); }
.aq-done:hover { background: var(--success-soft); color: var(--success); }

/* A lead that has already had the pitch. The row composes the nudge instead, and
   the tag is there so that is obvious before you press anything. */
.aq-tag {
  display: inline-block; margin-right: .3rem; vertical-align: baseline;
  padding: .05rem .35rem; border-radius: var(--radius-sm);
  border: 1px solid var(--info); color: var(--info);
  font-size: .62rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
}

/* Shown only when a send run and the board disagree, which should be never. */
.aq-warn {
  border: 1px solid var(--warning); border-left: 3px solid var(--warning);
  border-radius: var(--radius-md); background: var(--bg-card);
  padding: .75rem .9rem; margin-bottom: 1rem;
}
.aq-warn b { display: block; font-size: .9rem; color: var(--warning); }
.aq-warn p { margin: .3rem 0 0; font-size: .78rem; color: var(--text-dim); line-height: 1.45; }
.aq-warn-names { color: var(--text) !important; font-weight: 600; }

/* ------------------------------------------------------- the download bar

   Sits under the filters rather than beside them: it applies to the whole list
   below it, including the channel filter, and a button that changes what a file
   contains should be next to the thing it describes. Quiet styling on purpose —
   this is a once-a-batch job, not the work.
   ---------------------------------------------------------------------------- */

.aq-export {
  display: flex; flex-wrap: wrap; gap: .75rem 1rem;
  align-items: center; justify-content: space-between;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
  background: var(--bg-card); padding: .7rem .9rem; margin-bottom: 1.1rem;
}
.aq-export-words { min-width: 0; max-width: 62ch; }
.aq-export-words b { display: block; font-size: .88rem; color: var(--text); }
.aq-export-words span { display: block; margin-top: .15rem; font-size: .78rem; color: var(--text-dim); line-height: 1.45; }
.aq-export-btns { display: flex; gap: .4rem; flex-shrink: 0; }

.aq-empty { padding: 3rem 1rem; text-align: center; color: var(--text-dim); }

/* Wide enough for the row to be one line, which is how a worklist should read. */
@media (min-width: 900px) {
  .aq-row {
    grid-template-columns: minmax(0, 1fr) auto auto minmax(0, auto);
    grid-template-areas: "who chan value do";
  }
  .aq-do { margin-top: 0; padding-top: 0; border-top: 0; justify-content: flex-end; }
  .aq-done { margin-left: .3rem; }
}

@media (pointer: coarse) {
  .aq-reach, .aq-btn { min-height: 44px; padding: .3rem .75rem; }
  .aq-chip { min-height: 52px; justify-content: center; }
}
