/* Minimalist ("Developer Focus"), tasks.html's third presentation. Owns the left nav, the grid
   `order` reassigning the three .a-main tracks, folding the top nav, and compacting beyond
   `.a-compact`. Scope under body.a-minimal, never a bare shared class (notes.html and
   calendar.html style `.a-nav` too). */

/* ---------- the three tracks, reassigned by order alone ----------
   The DOM never moves: grid auto-placement follows `order` for children with no explicit
   grid-column. Visual order: nav, its grip, the list, the drawer's grip, the drawer. */
body.a-minimal #altMain > .a-right{ order:0; }
body.a-minimal #altMain > #altGripRight{ order:1; }
body.a-minimal #altMain > .a-centre{ order:2; }
body.a-minimal #altMain > #altGripLeft{ order:3; }
body.a-minimal #altMain > #altLeft{ order:4; }

/* The border side and grip side (see JS/alt/alt-panels.js) don't apply: both panes are
   fully-bordered floating cards, so there is no side to swap. */

/* ---------- the nav's grip must still occupy its grid cell while disabled ----------
   alt-shell.css hides disabled grips with `display:none`, dropping them from auto-placement so
   the list lands in the grip's narrow track. Shown here as a static divider; two ids beat one
   class+attribute, so no `!important`. */
body.a-minimal #altMain > #altGripRight[aria-disabled="true"]{
  display:block; cursor:default; pointer-events:none;
}
body.a-minimal #altMain > #altGripRight[aria-disabled="true"]::after{ display:none; }

/* ---------- the nav itself ----------
   #altRail is also drawn into by the utility widgets; alt-minimal.js adds this class only
   while it owns the content and removes it via altMinimalTeardownNav(). */
.a-minimal-nav{ display:flex; }
.a-minimal-nav > nav{
  display:flex; flex-direction:column; gap:2px; width:100%;
  padding:2px; background:var(--a-panel); border:1px solid var(--a-line-soft);
  border-radius:var(--a-r-lg);
}
.a-minimal-nav-item{
  display:flex; align-items:center; gap:10px; height:38px; padding:0 11px;
  border-radius:var(--a-r-sm); border:1px solid transparent; border-left:3px solid transparent;
  background:none; color:var(--a-dim); font:inherit; font-size:var(--a-fs-ctl); font-weight:var(--a-fw-ctl);
  text-decoration:none; cursor:pointer; width:100%; text-align:left;
}
.a-minimal-nav-item:hover{ color:var(--a-text); background:var(--a-raised); }
.a-minimal-nav-item:focus-visible{ outline:2px solid var(--a-ring); outline-offset:-2px; }
/* Current is blue with a bar, the same two signals as `.a-nav [aria-current="page"]`; colour
   is never the only signal (sys_design-system.md §18). */
.a-minimal-nav-item.on,
.a-minimal-nav-item[aria-current="page"]{
  color:var(--a-blue-text); background:var(--a-blue-soft); border-left-color:var(--a-blue);
  cursor:default;
}
.a-minimal-nav-ico{ display:inline-flex; flex:0 0 auto; }
.a-minimal-nav-ico svg{ width:15px; height:15px; }
.a-minimal-nav-lbl{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- below 1024 ----------
   alt-responsive.css already forces one column, so regions stack in order-modified order. Seven
   full-width nav rows is a lot of scrolling, so here they wrap as chips. */
@media (max-width:1023px){
  .a-minimal-nav > nav{ flex-direction:row; flex-wrap:wrap; }
  .a-minimal-nav-item{ width:auto; flex:0 0 auto; }
  .a-minimal-nav-lbl{ display:none; }
}

/* ================= PRODUCT-OWNER SCOPE, ROUND TWO ================= */

/* ---------- 1. the top nav folds away with the left nav ----------
   Keep the upper-right items (Create, Today, Focus, refresh, reminders, theme, dropdowns).
   #altTop holds .a-brand, #altNav (folded), search and .a-top-right (kept); brand and search
   stay since neither duplicates the left nav and search must stay reachable (core rule 5). */
body.a-minimal #altTop #altNav{ display:none; }

/* ---------- 2. Comfy and Compact are untouched ----------
   Every rule is scoped under body.a-minimal, which altApplyTasksMode() clears when the mode is
   off (see sys_architecture.md "Minimalist Mode"). */

/* ---------- 3. "Work at a glance" stays narrow at any width ----------
   Reuses alt-tasks.css's compact one-row rendering (its ALT_NARROW_MAX query) unconditionally,
   with the same button, filters and population. */
body.a-minimal .a-analytics{
  flex-direction:row; align-items:center; flex-wrap:nowrap;
  gap:var(--a-3); padding:var(--a-2) var(--a-3);
}
body.a-minimal .a-analytics > .a-sec-h{ flex:0 0 auto; margin:0; }
body.a-minimal .a-analytics > .a-glance{ flex:1 1 auto; }
body.a-minimal .a-glance .a-stats{ display:flex; gap:var(--a-2); }
body.a-minimal .a-stat{
  flex:1 1 0; flex-direction:row; align-items:baseline; gap:6px;
  min-height:0; padding:3px 9px;
}
body.a-minimal .a-stat b{ font-size:var(--a-fs-16); }
body.a-minimal .a-stat span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.a-minimal .a-stat[data-stat="starred"], body.a-minimal .a-stat[data-stat="donewk"]{ display:none; }
/* The "More" button shows at every width in Minimalist (alt-tasks.css hides it above 1280px).
   Two ids plus a class beat one id, so no `!important`; the shared rule is untouched. */
body.a-minimal #altStripMore{ display:inline-flex; }

/* ---------- 4. rows shorter than `.a-compact` alone ----------
   altApplyDensity() forces body.a-compact during Minimalist; the list's own row height is lowered below. */
body.a-minimal .a-row{ padding-top:2px; padding-bottom:2px; }
body.a-minimal.a-compact #altList .a-row{ min-height:calc(var(--z-row1) - 4px); padding-top:2px; padding-bottom:2px; }

/* ---------- 5. Utilities ----------
   The region is already gone (section 1); the remaining toolbar toggle is JS/alt/alt-tasks.js's
   own markup, unreachable from here without its id. */

/* ---------- 6. the row's own drag handle ----------
   Not `.a-grip` (the splitter): reusing it is the collision css-class-collision-check.py
   catches. Never opacity:0 at rest, so it stays reachable without hover. */
.a-minimal-row-grab{
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 16px;
  margin-top:3px; color:var(--a-faint); opacity:.55; cursor:grab;
}
.a-minimal-row-grab svg{ width:14px; height:14px; }
body.a-minimal .a-row:hover .a-minimal-row-grab,
body.a-minimal .a-row:focus-within .a-minimal-row-grab{ opacity:1; color:var(--a-dim); }
