#empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 32px;
  text-align: center;
}

.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  animation: empty-enter 240ms var(--transition-ease) both;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--sidebar);
  color: var(--muted);
}

.empty-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 2;
}

.empty-title {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 140%;
  overflow-wrap: anywhere;
}

.empty-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 160%;
  overflow-wrap: anywhere;
}

#tree {
  overflow-x: hidden;
  overflow-y: auto;
}

.tree-section,
.tree-node,
.tree-row,
.tree-children {
  min-width: 0;
}

.tree-children {
  margin-left: 8px;
  padding-left: 4px;
}

.tree-label {
  min-width: 0;
  overflow: hidden;
}

.tree-label .node-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-actions {
  flex-shrink: 0;
}

.block-controls {
  gap: 2px;
  padding-right: 8px;
}

.block-controls::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  bottom: 0;
  width: 16px;
}

.block-control {
  width: 22px;
  height: 28px;
  padding: 4px;
}

.block-more {
  cursor: pointer;
}

.block-more svg {
  width: 16px;
  height: 16px;
}

.block-more:hover,
.block-more[aria-expanded="true"] {
  background: var(--hover);
  color: var(--white);
}

#sidebar-open {
  flex-shrink: 0;
  min-width: 0;
}

#app.collapsed #sidebar-open {
  visibility: visible;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 6px;
  opacity: 1;
  pointer-events: auto;
}

#document-metadata {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}

.metadata-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.metadata-item svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.metadata-label {
  color: var(--secondary);
}

.metadata-item time {
  font-variant-numeric: tabular-nums;
}

.workspace {
  --block-controls-top: 100px;

  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
}

#document {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#editor {
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-width: 0;
}

.document-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--background);
}

.document-header::before {
  content: "";
  position: absolute;
  inset: 0 -80px;
  z-index: -2;
  background: var(--background);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 14;
  background: var(--background);
}

@keyframes empty-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}