/* side-dock.css — the right-edge stack of tabs for open panels (King 2026-10-12).
   Tabs sit on the RIGHT so they never cover Grasp's top header / back arrow. */

#side-dock-rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2147483000;          /* above Grasp, below a full panel (which uses +1) */
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;          /* the rail itself is transparent; tabs catch taps */
  max-height: 80vh;
  overflow: visible;
}
#side-dock-rail.has-tabs { pointer-events: none; }

.side-dock-tab {
  --sd-accent: #7c5cff;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 44px;               /* collapsed: just a sliver with the dot/label */
  padding: 10px 8px 10px 12px;
  background: rgba(20, 22, 32, 0.92);
  color: #e8e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.18s ease, background 0.18s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  border-left: 3px solid var(--sd-accent);
}
.side-dock-tab:hover,
.side-dock-tab.is-full { max-width: 180px; background: rgba(32, 34, 48, 0.96); }
.side-dock-tab.is-full { box-shadow: -2px 2px 14px rgba(0, 0, 0, 0.5); }

/* On a phone every open tab shows its label so he can tell them apart at a glance. */
@media (max-width: 820px) {
  .side-dock-tab { max-width: 160px; }
}

.side-dock-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--sd-accent);
  flex: 0 0 auto;
  box-shadow: 0 0 6px var(--sd-accent);
}
.side-dock-label {
  flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis;
}
.side-dock-badge {
  flex: 0 0 auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--sd-accent); color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.side-dock-x {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #e8e8f0;
  font-size: 15px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.side-dock-x:hover { background: rgba(255, 80, 80, 0.85); color: #fff; }

/* Respect iOS safe areas so the stack isn't under the home indicator. */
@supports (padding: max(0px)) {
  #side-dock-rail { bottom: env(safe-area-inset-bottom, 0); }
}
