/* ═══════════════════════════════════════════════════════════════════════════
   WEMASTER — CUSTOMER DOMAIN ADDITIONS (CUS-01 … CUS-20)
   The shared design system covers nearly everything. Four scoped helpers are
   added here: a vertical section rail, the compact-inbox override, a mobile
   grid floor, and two mobile refinements for the wizard and the classroom.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── section rail — settings sidebar (CUS-18) and the eleven-section expert
   application (CUS-19). Mirrors .tab semantics but reads as a vertical index
   with per-section completeness. ─────────────────────────────────────── */
.cus-sect{
  display:flex;align-items:center;gap:10px;width:100%;text-align:left;
  padding:9px 10px;border-radius:var(--r-md);border:1px solid transparent;
  transition:background var(--d-fast) var(--e-out),border-color var(--d-fast) var(--e-out);
}
.cus-sect:hover{background:var(--surface-2)}
.cus-sect.is-on{background:var(--brand-50);border-color:var(--brand-100)}
.cus-sect .ic{color:var(--ink-4);flex:none}
.cus-sect.is-on .ic{color:var(--brand-700)}
.cus-sect.is-on .t-sm{color:var(--ink)}
.cus-sect-n{
  width:22px;height:22px;border-radius:99px;display:grid;place-items:center;flex:none;
  font-size:var(--t-2xs);font-weight:600;background:var(--surface-2);color:var(--ink-3);
}
.cus-sect-n .ic{width:12px;height:12px}
.cus-sect.is-complete .cus-sect-n{background:var(--brand-700);color:#fff}
.cus-sect.is-needs .cus-sect-n{background:var(--danger-bg);color:var(--danger)}
.cus-sect.is-progress .cus-sect-n{background:var(--warn-bg);color:var(--warn)}
.cus-sect.is-on .cus-sect-n{background:var(--ink);color:#fff}

/* the section rail participates in the shared tab runtime so panel switching
   works and the active row is reflected. These overrides neutralise the
   underline styling that .tab brings with it. */
.cus-sect.tab{
  padding:9px 10px;border-radius:var(--r-md);font-size:var(--t-md);font-weight:400;
  color:var(--ink-2);white-space:normal;
}
.cus-sect.tab:hover{color:var(--ink)}
.cus-sect.tab.is-on{color:var(--ink);font-weight:400}
.cus-sect.tab.is-on::after{display:none}

/* ── conversation host (CUS-08 / CUS-09): the shell replaces the whole
   .conv-pane on thread switch, so it needs a sized host element. ─────── */
.cus-threadpane{display:flex;flex-direction:column;min-height:0;min-width:0}
.cus-threadpane > .conv-pane{flex:1;min-height:0}

/* mobile: the rail becomes one horizontally scrollable strip of sections */
.cus-sectnav{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:4px}
.cus-sectnav::-webkit-scrollbar{display:none}
.cus-sectnav .cus-sect{min-width:196px;flex:none;border-color:var(--line);background:var(--surface)}
.cus-sectnav .cus-sect.is-on{background:var(--brand-50);border-color:var(--brand-100)}

/* ── split inbox (CUS-08): the thread list stays beside the conversation at
   every width above the mobile breakpoint, including compact frames. ─── */
@container frame (min-width:769px){
  .cus-inbox{grid-template-columns:minmax(280px,352px) 1fr}
  .cus-inbox .inbox-list{display:flex}
  .cus-inbox .conv-pane{display:flex}
}

/* ── mobile: desktop grids and wizards collapse cleanly ────────────────── */
@container frame (max-width:768px){
  /* a 1fr track is minmax(auto,1fr) and grows past its container when a child
     has a large min-content. Pin the floor to zero so the column can shrink. */
  .grid.gc-2,.grid.gc-3,.grid.gc-4,.grid.gc-5{grid-template-columns:minmax(0,1fr)}
  .grid > *{min-width:0}
  /* desktop two-column layouts authored inline (rail + content) also collapse */
  .grid[style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important}

  /* step indicators wrap instead of pushing off-screen */
  .cus-steps .steps{flex-wrap:wrap;row-gap:10px}
  .cus-steps .steps .step-line{display:none}
  .cus-steps .steps .step{font-size:var(--t-sm)}

  /* classroom top bar keeps the session title, timer and leave button only */
  .cus-cr-extra{display:none!important}
}
