/* Keep sidebar typography independent of the preview's 14px root font size. */
:is(.bmd-sidebar-top, .bmd-tree-section, .bmd-sidebar-bottom) {
  --font-size-body: var(--font-size-caption);
  --line-height-body: 18px;
  --line-height-caption: 18px;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

:is(.bmd-sidebar-top, .bmd-tree-section, .bmd-sidebar-bottom)
  :is(.bmd-brand-name, .bmd-user-name, .bmd-brand-mark, .bmd-brand-sub,
      .bmd-kbd-badge, .bmd-nav-count, .bmd-tree-heading, .bmd-theme-btn,
      .bmd-arc-avatar, .bmd-user-role) {
  font-size: var(--font-size-caption);
  line-height: 18px;
}

.bmd-tree-section .arc_tv_badge { display: flex; align-items: center; }
.bmd-tree-section .arc_tv_badge .bmd-project-indicators {
  width: 16px;
  height: 16px;
  justify-content: center;
}

.bmd-workspace-header { min-height: 32px; padding: 4px 6px; }
.bmd-wordmark { display: block; width: 117px; height: 23px; flex: none; }
.bmd-wordmark-dark, [data-theme='dark'] .bmd-wordmark-light { display: none; }
[data-theme='dark'] .bmd-wordmark-dark { display: block; }
.bmd-header-actions { display: flex; flex: none; align-items: center; gap: 4px; }
.bmd-header-actions > button { color: var(--text-secondary); }
.bmd-header-actions > button[data-state="open"],
.bmd-header-actions > button:active:not(:disabled):not([aria-disabled="true"]) { color: var(--text-primary); }
@media (hover: hover) and (pointer: fine) {
  .bmd-header-actions > button:hover:not(:disabled):not([aria-disabled="true"]) { color: var(--text-primary); }
}
.bmd-header-icon { width: 32px !important; height: 32px !important; min-height: 32px !important; padding: 0 !important; border: 0 !important; border-radius: var(--radius-sm); background: transparent; }
.bmd-header-icon > span { display: grid; place-items: center; }
.bmd-search-dialog {
  --text-xs: var(--font-size-caption);
  --text-sm: var(--font-size-body);
  --leading-body: 20px;
  --surface: var(--surface-popover);
  --surface-muted: var(--interaction-hover);
  --foreground: var(--text-primary);
  --text-muted: var(--text-secondary);
  --border: var(--border-input);
  --border-subtle: var(--border-default);
  --radius-panel: var(--radius-lg);
}
.bmd-search-dialog .arc_dlg_header {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
}
.bmd-search-dialog .arc_dlg_header .arc_dlg_close { display: none; }
.bmd-search-dialog .arc_dlg_body { padding: 0; }
.bmd-search-dialog .arc_cmd_palette { border: 0; border-radius: var(--radius-panel); box-shadow: none; }
.bmd-search-dialog :is(.arc_cmd_searchRow, .arc_cmd_commandKey, .arc_cmd_closeButton, .arc_cmd_shortcut kbd) { border-width: 0.5px; }
.bmd-search-dialog .arc_cmd_shortcut kbd { font-size: var(--font-size-caption); }
.bmd-search-dialog .arc_cmd_results { max-height: min(480px, calc(100dvh - 120px)); }
.bmd-arc-tree-wrap .bmd-sidebar-pin { min-width: 28px; width: 28px; min-height: 28px; height: 28px; padding: 0; }
/* Keep fixed slots for the pin and status indicator on every row. */
.bmd-arc-tree-wrap .arc_tv_item.arc_tv_hasAction { padding-right: 64px; }
.bmd-arc-tree-wrap .arc_tv_hasAction .arc_tv_badge { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.bmd-arc-tree-wrap .arc_tv_action { right: 31px; top: calc(50% + 1px); transform: translateY(-50%); }

.bmd-arc-tree-wrap.bmd-arc-pinned-wrap { flex: 0 0 auto; }
