/* Compact overrides for alt-team-kanban.css; loads after it. Every selector is scoped to
   `.a-tb-compact` (always set on the board's scroll by alt-team-board-view.js).
   The card itself is the shared card's 'card' density (CSS/alt/alt-task-card.css); this sheet keeps
   only what the board does differently there. */

/* Lane width stays at comfy's 220px (this density spends height, not width). The <=1023px block
   below restates it so a narrow viewport is never wider than desktop. */
.alt-app .a-tb-compact .a-tb-lane{
  --a-tb-lane-w:220px;
  /* Enough gap that a multi-line card still reads as its own task; the same 6px the Fit planner assumes. */
  --a-tb-card-gap:6px;
}

/* ---------- the description ----------
   The shared card shows it only on hover or focus; the board's compact card keeps one line at rest. */
.alt-app .a-tb-compact .a-tb-card > .a-tcard-d{ display:-webkit-box; }

/* ---------- the topic: its dot alone; the name is in the chip's title and the card's name ---------- */
.alt-app .a-tb-compact .a-tb-card .a-tcard-place{ padding:0; border:0; height:auto; }
.alt-app .a-tb-compact .a-tb-card .a-tcard-place-l{ display:none; }

/* ---------- meta line: date, OKR flag, comment count, lane control ----------
   One nowrap row (the shared card's); the date never shrinks, the rest shrink and clip. `overflow:hidden`
   would clip the lane control's 3px focus ring, so `margin-right:-3px`/`padding-right:3px` makes room. */
.alt-app .a-tb-compact .a-tb-card-foot{
  align-self:center; flex-wrap:nowrap; overflow:hidden; gap:4px; margin-right:-3px; padding-right:3px;
}
/* No fixed track or ellipsis; the full date always draws. `margin-right:0` cancels comfy's auto. */
.alt-app .a-tb-compact .a-tb-due{
  flex:0 0 auto; margin-right:0; white-space:nowrap; font-size:var(--a-fs-11); line-height:var(--a-lh-ui);
}
/* Pinned right so it sits at the same x on every row. */
.alt-app .a-tb-compact .a-tb-card-foot > .a-tb-lane-btn{ margin-left:auto; }

/* Chips shrink first when the line is tight. Height is untouched: `button.a-chip{min-height:
   24px}` (alt-responsive.css) is the pointer floor. */
.alt-app .a-tb-compact .a-tb-card-foot .a-chip{
  font-size:var(--a-fs-11); padding:0 4px; gap:2px; flex:0 1 auto; min-width:0; overflow:hidden;
}
.alt-app .a-tb-compact .a-tb-card-foot .a-chip > svg{ width:11px; height:11px; }
/* The lane control is quiet until pointed at: only the dot shows at rest, the border returns on
   hover/focus/open. */
.alt-app .a-tb-compact .a-tb-card .a-chip-st.mini{
  min-width:24px; padding:0 2px; gap:2px;
  background:transparent; border-color:transparent;
}
.alt-app .a-tb-compact .a-tb-card .a-chip-st.mini > svg{ width:10px; height:10px; }
.alt-app .a-tb-compact .a-tb-card button.a-chip-st.mini:hover,
.alt-app .a-tb-compact .a-tb-card button.a-chip-st.mini:focus-visible,
.alt-app .a-tb-compact .a-tb-card .a-chip-st.mini[aria-expanded="true"]{
  background:var(--a-float); border-color:var(--a-st-line);
}
.alt-app .a-tb-compact .a-tb-watch{ width:14px; height:14px; flex:0 0 auto; }
.alt-app .a-tb-compact .a-tb-watch > svg{ width:12px; height:12px; }

/* ---------- not drawn at this density ----------
   altTBCard() builds no tag row or All-boards chip in compact, and the eye (painted in place by
   altTBPaintWatchEyes()) is hidden here; all three still reach the card's `aria-label`. */
.alt-app .a-tb-compact .a-tb-card-foot > .a-tb-watch{ display:none; }

/* `.a-tb-cards` min-height (comfy) is untouched so an empty lane can still take a drop. */
.alt-app .a-tb-compact .a-tb-lane-more{ padding:4px 8px; font-size:var(--a-fs-11); }
.alt-app .a-tb-compact .a-tb-lane-empty{ padding:7px 8px; font-size:var(--a-fs-11); }

/* ---------- compact in a wider lane ----------
   Comfy's `--a-tb-cols` grid and width formula serve both densities; nothing is restated here.
   Cards stay direct children of `.a-tb-cards` (contract §10, dragleave has no enter counter). */

/* ================= compact at every width =================
   Declare `--a-tb-lane-w` at every breakpoint comfy does: media queries add no specificity, so
   the unconditional rule above would otherwise override comfy's breakpoints. */
@media (max-width:1023px){
  .alt-app .a-tb-compact .a-tb-lane{ --a-tb-lane-w:220px; }
}
@media (max-width:479px){
  .alt-app .a-tb-compact .a-tb-lane{ --a-tb-lane-w:calc(100% - 8px); min-width:220px; }
  /* A folded lane is a 38px strip at every width (ties comfy's phone rule, wins on order). */
  .alt-app .a-tb-compact .a-tb-lane.collapsed{ width:38px; min-width:38px; }
}
