/* Slide the side menu on any screen: drag its edge (or, on a touch screen, swipe the menu sideways) and it snaps to
   hidden, slim or full. The edge strip stays put at the left of the screen while the menu is hidden, so it can be
   pulled back out. Loaded after sidebar-compact.css and sidebar-modes.css. */
body.orbit-v27 #sidebarResize:not([hidden]) {
  display: block;
  left: max(0px, calc(var(--rail) - 5px));
  width: 10px;
  min-width: 10px;
  cursor: ew-resize;
  touch-action: none;
  z-index: 66;
}
/* Phone: the full menu opens over the content, wider than the rail. */
body.orbit-v27.sidebar-open #sidebarResize:not([hidden]) { left: calc(min(310px, 100vw - 48px) - 5px); z-index: 72; }
/* Hidden: a thin strip at the very left that you pull from. */
body.orbit-v27 #sidebarResize[data-state="hidden"]:not([hidden]) { left: 0; width: 8px; min-width: 8px; }
/* The grip: a short pill in the middle of the edge. Faint until you point at it; always faintly there on touch screens. */
body.orbit-v27 #sidebarResize::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 4px; height: 40px; margin: -20px 0 0 -2px;
  border-radius: 2px; background: var(--o-muted, #8a8f98); opacity: 0; transition: opacity .15s ease;
}
body.orbit-v27 #sidebarResize:hover::before,
body.orbit-v27 #sidebarResize:focus-visible::before,
body.orbit-v27.sidebar-resizing #sidebarResize::before { opacity: .55; }
body.orbit-v27 #sidebarResize[data-state="hidden"]::before { left: 2px; margin-left: 0; }
body.orbit-v27.sidebar-resizing { cursor: ew-resize; }
@media (pointer: coarse) {
  body.orbit-v27 #sidebarResize:not([hidden]) { left: max(0px, calc(var(--rail) - 9px)); width: 18px; min-width: 18px; }
  body.orbit-v27.sidebar-open #sidebarResize:not([hidden]) { left: calc(min(310px, 100vw - 48px) - 9px); }
  body.orbit-v27 #sidebarResize[data-state="hidden"]:not([hidden]) { left: 0; width: 12px; min-width: 12px; }
  body.orbit-v27 #sidebarResize::before { opacity: .3; }
  /* Sideways swipes on the menu slide it; up and down still scroll it. */
  body.orbit-v27 .sidebar { touch-action: pan-y; }
}
/* A task open beside the list on an unfolded foldable hides the menu, so its edge goes too. */
body.orbit-v27.task-pane-open #sidebarResize { display: none !important; }

/* While sliding, the menu and the content move together instead of jumping. Not while the edge tracks the pointer
   inside the full menu, so the width keeps up with your finger. */
body.orbit-v27.sidebar-sliding .app-header,
body.orbit-v27.sidebar-sliding .sidebar { transition: width .2s ease, transform .2s ease, visibility .2s; }
body.orbit-v27.sidebar-sliding main { transition: left .2s ease; }
body.orbit-v27.sidebar-sliding #sidebarResize { transition: left .2s ease; }
body.orbit-v27.sidebar-tracking .app-header,
body.orbit-v27.sidebar-tracking .sidebar,
body.orbit-v27.sidebar-tracking main,
body.orbit-v27.sidebar-tracking #sidebarResize { transition: none; }
@media (prefers-reduced-motion: reduce) {
  body.orbit-v27.sidebar-sliding .app-header, body.orbit-v27.sidebar-sliding .sidebar,
  body.orbit-v27.sidebar-sliding main, body.orbit-v27.sidebar-sliding #sidebarResize { transition: none; }
}
