/* panel-slidemenu.css
 *
 * The drill-in's pieces (panel-slidemenu.js), shared by the three menus that
 * have a submenu: the bar's model picker (.bp-row), the right-click menu
 * (.ctx-item) and the account menu (.pxsm-item). Linked after panel.html's
 * inline <style> and panel-settings-menu.css so these win over the row rules
 * at equal specificity, and before glass-surface.css, which loads last. */

/* The level on its way out, laid over the menu for the length of the slide.
   It lays its rows out as the menu does — the same padding, the same gap —
   so nothing moves at the instant it takes them over. */
.pxs-ghost {
  position: absolute; top: 0; left: 0;
  box-sizing: border-box;
  display: flex; flex-direction: column;
  padding: inherit; gap: inherit;
  pointer-events: none;
}
/* Only while a slide runs: the levels travel past the menu's edges. */
.pxs-moving { overflow: hidden; }

/* A row that opens a level gives a little under the press. scale rather than
   transform, so it never takes over a row's own transform. */
.pxs-door { transition: scale var(--dur-1) var(--ease-out); }
.pxs-door:active { scale: .985; }

/* The back row: the picked row's label, with a back chevron in a fixed slot
   before it. The chevron is the slot's only content, so the label never
   shifts when it fades in. */
.pxs-back { display: flex; align-items: center; justify-content: flex-start; gap: 8px; color: var(--t-primary); }
.pxs-mark { display: inline-flex; flex: none; width: 12px; justify-content: center; color: var(--t-secondary); }
.pxs-back .bp-chev svg { transform: scaleX(-1); }
.pxs-back .ctx-chev, .pxs-back .pxsm-chev { transform: translateY(-1px); }

/* The child level sits a step in from the back row above it. */
.bp-row.pxs-child { padding-left: 16px; }
.ctx-item.pxs-child { padding-left: 18px; }
.pxsm-item.pxs-child { padding-left: 18px; }
/* The account menu has no separator element; the back row draws its own
   hairline, as Sign out does above itself. */
.pxsm-back {
  margin-bottom: 2px;
  border-bottom: 1px solid var(--hair);
  border-radius: var(--r-md) var(--r-md) 0 0;
  padding-bottom: 11px;
}

@media (prefers-reduced-motion: reduce) {
  .pxs-door { transition: none; }
  .pxs-door:active { scale: none; }
}
