/* ── Sidebar Panel — overlay panel with text nav tabs ── */

.pb-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--pb-surface);
  color: var(--pb-text);
  border-radius: var(--pb-radius-island);
}

/* ── Tab bar ── */

.pb-sidebar-nav {
  display: flex;
  border-bottom: 1px solid var(--pb-border);
  flex-shrink: 0;
}

.pb-sidebar-nav [role="tab"] {
  flex: 1;
  padding: var(--pb-space-4) var(--pb-space-5);
  font-size: var(--pb-font-md);
  font-weight: 500;
  color: var(--pb-text-dim);
  border-bottom: 2px solid transparent;
  transition: color var(--pb-transition), border-color var(--pb-transition);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.pb-sidebar-nav [role="tab"]:hover {
  color: var(--pb-text);
}

.pb-sidebar-nav [role="tab"]:focus-visible {
  outline: 2px solid var(--pb-accent);
  outline-offset: -2px;
}

.pb-sidebar-nav [role="tab"][aria-selected="true"] {
  color: var(--pb-accent);
  border-bottom-color: var(--pb-accent);
}

/* ── Content body ── */

.pb-sidebar-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.pb-sidebar-pane {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.pb-sidebar-pane.pb-sidebar-pane-active {
  display: flex;
}

/* ── SectionList sidebar mode inside pane ── */

.pb-sidebar-pane .pb-sl.pb-sl-sidebar-mode {
  height: 100%;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .pb-sidebar-nav [role="tab"] {
    padding: var(--pb-space-4) var(--pb-space-1);
    font-size: var(--pb-font-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-sidebar-nav [role="tab"] {
    transition: none;
  }
}
