.encryption-admin-only {
  display: none !important;
}

html.encryption-admin-active .encryption-admin-only {
  display: revert !important;
}

html.encryption-admin-active .encryption-admin-only.kanban-toolbar-actions {
  display: flex !important;
}

#encryption-admin-toast {
  position: fixed;
  z-index: 10000;
  top: 4.5rem;
  left: 1rem;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: 0.65rem 1rem;
  border-radius: var(--rounded-corner, 0.5rem);
  background: var(--bg-muted-1, #f4f4f5);
  border: 1px solid var(--border-color, #ccc);
  box-shadow: var(--shadow, 0 4px 12px rgba(0, 0, 0, 0.12));
  color: var(--fg-color, #222);
  font-size: var(--font-size-small, 0.875rem);
  line-height: 1.45;
  pointer-events: none;
}

html.encryption-protected-page:not(.encryption-admin-active) #site-sidebar .toc {
  display: none !important;
}

@media (hover: hover) {
  html.encryption-admin-active #site-sidebar-header.encryption-admin-header-hint {
    position: relative;
  }

  html.encryption-admin-active #site-sidebar-header.encryption-admin-header-hint::after {
    content: "你已经是管理员";
    position: absolute;
    left: 0;
    top: calc(100% + 0.35rem);
    z-index: 10001;
    padding: 0.125rem 0.5rem;
    border-radius: var(--rounded-corner-small, 0.375rem);
    background: var(--glass-bg-1, var(--bg-muted-1, #f4f4f5));
    box-shadow: var(--edge-highlight, none), var(--shadow, 0 4px 12px rgba(0, 0, 0, 0.12));
    color: var(--fg-muted-2, #555);
    font-size: var(--font-size-small, 0.875rem);
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.25rem);
    transition:
      opacity 0.15s ease,
      transform 0.15s ease,
      visibility 0.15s;
  }

  html.encryption-admin-active #site-sidebar-header.encryption-admin-header-hint:hover::after,
  html.encryption-admin-active #site-sidebar-header.encryption-admin-header-hint:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
