/* Side menu top and foot, like the Claude app's sidebar (Adi, 2026-11-10).
   Top: the Orbit mark and "<Name>'s Orbit" stay pinned while the menu scrolls, over a darker, blurred band.
   Foot: the account circle sits as far from the bottom as from the left. The add button is at the screen's bottom right.
   Loaded after account.css. */

/* ---------- Pinned top ---------- */
body.orbit-v27 #appSidebar { padding-top: 0 !important; }
/* The topmost layer of the menu, on its own compositing layer so nothing scrolling under it draws on top. The blur
   sits on the band itself: on a pseudo-element Chrome left text underneath sharp, and Safari drops a backdrop blur
   that is also masked. The band reaches the menu's edges through negative side margins equal to the menu's side
   padding (--sb-px, per menu size). */
body.orbit-v27 #appSidebar { --sb-px: 12px; }
@media (min-width: 900px) { body.orbit-v27.sidebar-slim #appSidebar { --sb-px: 14px; } }
@media (max-width: 899px) { body.orbit-v27.sidebar-rail:not(.sidebar-open) #appSidebar { --sb-px: 8px; } }
@media (max-width: 399px) { body.orbit-v27.sidebar-rail:not(.sidebar-open) #appSidebar { --sb-px: 4px; } }
body.orbit-v27 #appSidebar .sidebar-top {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 100;
  -webkit-transform: translateZ(0); transform: translateZ(0);
  display: flex; flex-direction: column; align-items: stretch;
  margin: 0 calc(-1 * var(--sb-px)); padding: calc(20px + env(safe-area-inset-top, 0px)) var(--sb-px) 12px;
  background: color-mix(in srgb, color-mix(in srgb, var(--sidebar, #111) 70%, #000) 80%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
}
@media (min-width: 900px) { body.orbit-v27:not(.sidebar-slim) #appSidebar .sidebar-top .sidebar-mode-button { right: calc(12px + var(--sb-px)); } }
/* A short fade under the band so the list does not end at a hard line. */
body.orbit-v27 #appSidebar .sidebar-top::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, color-mix(in srgb, var(--sidebar, #111) 70%, #000) 55%, transparent), transparent);
}
html[data-theme="light"] body.orbit-v27 #appSidebar .sidebar-top { background: color-mix(in srgb, color-mix(in srgb, var(--sidebar, #f0f0f2) 94%, #000) 70%, transparent); }
html[data-theme="light"] body.orbit-v27 #appSidebar .sidebar-top::after { background: linear-gradient(to bottom, color-mix(in srgb, color-mix(in srgb, var(--sidebar, #f0f0f2) 94%, #000) 60%, transparent), transparent); }
/* An old phone rule leaves z-index 50 on the menu's view list, and in the menu (a flex column) that still stacks it,
   so the list drew over the pinned band on phones and tablets. Nothing in the menu stacks above the band now. */
body.orbit-v27 #appSidebar > .tabs, body.orbit-v27 #appSidebar > .sidebar-section { z-index: auto; }
/* The rest of the menu used to start under the sidebar's own top padding. */
body.orbit-v27 #appSidebar .sidebar-top + .tabs { margin-top: 12px; }
/* Slim rail: everything in the top band is centered, like the icons under it. */
@media (min-width: 900px) { body.orbit-v27.sidebar-slim #appSidebar .sidebar-top { align-items: center; } }
@media (max-width: 899px) { body.orbit-v27.sidebar-rail:not(.sidebar-open) #appSidebar .sidebar-top { align-items: center; } }

/* ---------- Foot: account circle ---------- */
/* 20px under the circle (Adi, 2026-11-11: "a tad higher"). Ignoring the home-indicator inset is deliberate:
   Adi wants the circle low and even, and a tap there still works. */
body.orbit-v27 .sidebar-account { padding-bottom: 20px; }

/* ---------- Add button: back at the bottom right of the screen (Adi, 2026-11-11) ---------- */
/* It sat beside the account circle in the menu foot for a day; Adi wants it where thumbs and eyes expect it. */
body.orbit-v27 #taskFab, body.orbit-v27 .quick-add#taskFab {
  --fab: 56px;
  width: var(--fab) !important; height: var(--fab) !important; min-width: var(--fab) !important; min-height: var(--fab) !important;
  position: fixed; left: auto !important; z-index: 72;
  /* Same line as the account circle in the menu foot (Adi, 2026-11-11): that circle is 48px with 20px under it, so
     its center sits 44px up from the bottom edge, and so does this button's. */
  right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(44px - var(--fab) / 2) !important;
  transition: transform .15s ease;
}
/* No mic badge on the button; a long press still opens voice add. */
body.orbit-v27 #taskFab .fab-mic { display: none !important; }
/* The button stays crisp. Only the corner around it is frosted (Adi, 2026-11-13: not a strip across the whole
   bottom), so tasks scrolling under the + go soft right there and stay readable everywhere else. The disc is
   centered on the button (16px + 28px in from the right, 44px up) and lets taps through. */
body.orbit-v27 #mainContent::after {
  content: ""; position: fixed; z-index: 60; pointer-events: none;
  right: calc(env(safe-area-inset-right, 0px) - 4px); bottom: -4px; width: 96px; height: 96px; border-radius: 50%;
  background: rgba(0, 0, 0, .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent); mask-image: radial-gradient(closest-side, #000 62%, transparent);
}
html[data-theme="light"] body.orbit-v27 #mainContent::after { background: rgba(255, 255, 255, .3); }
@media (max-width: 899px) { body.orbit-v27.sidebar-open:not(.sidebar-docked) #mainContent::after { display: none; } }
body.orbit-v27 #taskFab .fab-plus svg { width: 26px; height: 26px; }
/* An open full menu on a phone covers the screen; the button waits until it closes. */
@media (max-width: 899px) { body.orbit-v27.sidebar-open:not(.sidebar-docked) #taskFab { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { body.orbit-v27 #taskFab { transition: none; } }
