/* One popup theme for creation, workspace settings, and document actions. */
.funify-notes-page :is(.notes-workspace-create-menu, .site-header .site-menu, .tree-context-menu) {
  --notes-popup-hover: color-mix(
    in srgb,
    var(--notes-selection-background) 42%,
    var(--color-surface)
  );
  box-sizing: border-box;
  width: min(240px, calc(100vw - 16px));
  min-width: 0;
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 8px 24px rgb(53 78 135 / 9%);
  scrollbar-width: thin;
}

.funify-notes-page .notes-workspace-create-menu .notes-workspace-create-option,
.funify-notes-page .site-header .site-menu .notes-header-theme-menu-button,
.funify-notes-page .tree-context-menu button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.funify-notes-page .notes-workspace-create-menu .notes-workspace-create-option:hover:not(:disabled),
.funify-notes-page .site-header .site-menu .notes-header-theme-menu-button:hover:not(:disabled),
.funify-notes-page .tree-context-menu button:hover:not(:disabled) {
  background: var(--notes-popup-hover);
}

.funify-notes-page .notes-workspace-create-menu .notes-workspace-create-option:focus-visible,
.funify-notes-page .site-header .site-menu .notes-header-theme-menu-button:focus-visible,
.funify-notes-page .tree-context-menu button:focus-visible {
  outline: 1px solid var(--notes-selection-accent);
  outline-offset: -1px;
  background: var(--notes-popup-hover);
}

.funify-notes-page .tree-context-menu button[data-tree-action='delete'],
.funify-notes-page .site-header .site-menu .notes-clear-browser-menu-button {
  color: #c34459;
}

.funify-notes-page .notes-workspace-create-menu button:disabled,
.funify-notes-page .site-header .site-menu button:disabled,
.funify-notes-page .tree-context-menu button:disabled {
  opacity: 0.4;
  background: transparent;
  cursor: not-allowed;
}

.funify-notes-page .notes-workspace-create-context {
  margin: 0 0 12px;
  padding: 8px 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.notes-workspace-create-caption {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  line-height: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notes-workspace-create-path {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  overflow-wrap: anywhere;
}

.funify-notes-page .notes-workspace-create-path svg {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 4px;
}

.funify-notes-page .notes-workspace-create-option > svg,
.funify-notes-page .tree-context-menu button > svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--color-muted);
}

.funify-notes-page .site-header .site-menu .notes-header-theme-menu-button::before,
.funify-notes-page .tree-context-menu button:not(:has(svg))::before {
  content: '';
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: currentColor;
  opacity: 0.7;
  mask-image: var(--notes-popup-icon);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.funify-notes-page .tree-context-menu button[data-tree-action='edit'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%203l5%205M4%2020l4-1L20%207a3%203%200%200%200-4-4L4%2015z%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .tree-context-menu button[data-tree-action='rename'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%205h10M9%205v14M5%2019h8M16%2016l3%203%203-3M19%2011v8%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .tree-context-menu button[data-tree-action='delete'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18M9%206V3h6v3M5%206l1%2015h12l1-15M10%2010v7M14%2010v7%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .tree-context-menu button[data-tree-action='highlight'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203l2.8%205.7%206.2.9-4.5%204.4%201.1%206.2-5.6-3-5.6%203%201.1-6.2L3%209.6l6.2-.9z%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .tree-context-menu button[data-tree-action='create'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207v13h12M4%207V4h8l3%203h5v6M15%2018h7M18.5%2014.5v7%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .tree-context-menu button[data-tree-action='reset'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2010a9%209%200%201%201%201%208M3%204v6h6%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .tree-context-menu button[data-tree-action='upload'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V4m-4%204%204-4%204%204M4%2016v5h16v-5%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .tree-context-menu button[data-tree-action='download'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204v12m-4-4%204%204%204-4M4%2016v5h16v-5%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .site-header .site-menu .notes-header-theme-menu-button {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203a9%209%200%201%200%200%2018h1a2%202%200%200%200%201-3.7%201%201%200%200%201%20.5-1.8H17a4%204%200%200%200%204-4c0-4.4-4-7.5-9-7.5ZM7.5%209h.01M11%206.5h.01M15%207h.01M17%2010.5h.01%22%2F%3E%3C%2Fsvg%3E');
}

.funify-notes-page .site-header .site-menu .notes-clear-browser-menu-button {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%204h16v16H4zM4%209h16M8%206.5h.01M12%206.5h.01M9%2013l6%205M15%2013l-6%205%22%2F%3E%3C%2Fsvg%3E');
}

/* Header popups share one compact surface; content determines only their width. */
.funify-notes-page
  :is(
    .site-header .site-menu,
    .notes-workspace-notifications,
    .site-account-popover,
    .notes-header-theme-dialog
  ) {
  box-sizing: border-box;
  max-height: calc(100dvh - 24px);
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 8px 24px rgb(53 78 135 / 12%);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  scrollbar-width: thin;
}

.funify-notes-page .site-header .site-menu {
  width: min(216px, calc(100vw - 24px));
  padding: 4px;
}

.funify-notes-page .site-header .site-menu .notes-header-theme-menu-button {
  min-height: 32px;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 20px;
}

.funify-notes-page .site-header .site-menu .notes-header-theme-menu-button::before {
  flex-basis: 16px;
  width: 16px;
  height: 16px;
}

.funify-notes-page .notes-workspace-notifications {
  width: min(240px, calc(100vw - 24px));
}

.funify-notes-page .site-account-popover {
  width: min(260px, calc(100vw - 24px));
}

.funify-notes-page .notes-header-theme-dialog {
  width: min(480px, calc(100vw - 24px));
}

.funify-notes-page .notes-widget-picker {
  width: min(340px, calc(100vw - 24px));
}

.funify-notes-page :is(.notes-header-theme-dialog, .notes-workspace-notifications) h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.funify-notes-page .notes-header-theme-heading {
  gap: 8px;
  margin-bottom: 6px;
}

.funify-notes-page
  :is(.notes-header-theme-dialog, .site-account-popover)
  :is(.notes-btn, .site-account-action) {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  line-height: 18px;
}

.funify-notes-page
  :is(.notes-header-theme-dialog, .site-account-popover)
  :is(button, a):focus-visible {
  outline: 1px solid var(--notes-selection-accent);
  outline-offset: 2px;
}

.funify-notes-page .notes-widget-picker > p {
  margin: 0 0 6px;
  color: var(--color-muted);
  font-size: 11px;
}

.funify-notes-page .notes-widget-choices {
  border-top: 1px solid var(--color-border);
}

.funify-notes-page .notes-widget-choice {
  gap: 8px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
}

.funify-notes-page .notes-widget-choice:last-child {
  border-bottom: 0;
}

.funify-notes-page .notes-widget-choice strong {
  font-size: 12px;
  font-weight: 600;
}

.funify-notes-page .notes-widget-choice p {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

.funify-notes-page .notes-widget-icon svg {
  width: 18px;
  height: 18px;
}

.funify-notes-page .notes-widget-picker > .notes-widget-status {
  margin: 6px 0 0;
  font-size: 10px;
}

.funify-notes-page .notes-workspace-notifications h2 {
  margin-bottom: 4px;
}

.funify-notes-page .notes-workspace-notifications p {
  font-size: 11px;
  line-height: 1.4;
}

.funify-notes-page .site-account-summary {
  gap: 8px;
  margin-bottom: 8px;
}

.funify-notes-page .site-account-summary .site-account-avatar {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.funify-notes-page .site-account-summary > div {
  gap: 2px;
}

.funify-notes-page .site-account-summary strong {
  font-size: 12px;
}

.funify-notes-page .site-account-summary > div > span,
.funify-notes-page .site-account-status {
  font-size: 11px;
}

.funify-notes-page .site-account-status {
  margin-bottom: 8px;
  line-height: 1.4;
}

.funify-notes-page .notes-header-theme-help {
  margin: 0 0 10px;
  font-size: 11px;
}

.funify-notes-page .notes-theme-section-title {
  margin-bottom: 6px;
  font-size: 12px;
}

.funify-notes-page .notes-header-theme-options {
  gap: 6px;
}

.funify-notes-page .notes-header-theme-option {
  border-radius: 8px;
}

.funify-notes-page .notes-header-theme-preview {
  height: 36px;
  gap: 5px;
  padding: 6px;
}

.funify-notes-page .notes-header-theme-preview img {
  width: 20px;
  height: 20px;
}

.funify-notes-page .notes-header-theme-caption {
  gap: 4px;
  padding: 6px;
  font-size: 11px;
}

.funify-notes-page .notes-selection-colors {
  margin-top: 12px;
}

.funify-notes-page .notes-selection-help {
  margin-bottom: 6px;
  font-size: 11px;
}

.funify-notes-page .notes-selection-presets {
  gap: 6px;
}

.funify-notes-page .notes-header-theme-actions {
  margin-top: 10px;
}

.funify-notes-page .notes-header-theme-actions .notes-btn {
  min-width: 60px;
}

.funify-notes-page :is(.site-header .site-menu, .notes-workspace-notifications)::backdrop {
  background: rgb(13 25 52 / 45%);
}

.notes-inbox-move-heading {
  margin: 0;
  padding: 8px 12px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.notes-inbox-move-menu button > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.notes-folder-color-dialog {
  box-sizing: border-box;
  width: min(312px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 22px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 20px 60px rgb(0 0 0 / 20%);
}

.notes-folder-color-dialog::backdrop {
  background: rgb(13 17 23 / 38%);
}

.notes-folder-color-dialog h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.notes-folder-color-name {
  margin: 4px 0 16px;
  overflow-wrap: anywhere;
  color: var(--color-muted);
  font-size: 13px;
}

.notes-folder-color-palette {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.funify-notes-page .notes-folder-color-swatch {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.notes-folder-color-swatch::before {
  width: 26px;
  height: 26px;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 50%;
  background: var(--folder-color);
  content: '';
}

.funify-notes-page .notes-folder-color-swatch:is(:hover, [aria-pressed='true']) {
  border-color: var(--color-border);
  background: color-mix(in srgb, var(--folder-color) 15%, var(--color-surface));
}

.notes-folder-color-swatch:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.notes-folder-color-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.notes-folder-color-status {
  margin: 12px 0 0;
  color: var(--color-danger, #c34459);
  font-size: 13px;
}

.funify-notes-page .site-header .site-menu .notes-drive-rebuild-menu-button::before {
  display: none;
}

.funify-notes-page .site-header .site-menu .notes-drive-rebuild-menu-button svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.notes-folder-create-dialog {
  margin: auto;
}

.notes-folder-create-label {
  display: block;
  margin: 16px 0 8px;
  color: var(--color-muted);
  font-size: 13px;
}

.notes-folder-create-dialog input[type='text'] {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.notes-folder-create-dialog input[type='text']:focus-visible {
  outline: 2px solid var(--notes-selection-accent);
  outline-offset: 2px;
}

.notes-folder-create-dialog .notes-folder-color-actions {
  justify-content: flex-end;
}

.notes-trash-restore-dialog {
  width: min(360px, calc(100% - 32px));
  padding: 16px;
  border: 0;
  border-radius: 14px;
}

.notes-trash-restore-body {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.notes-trash-restore-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--notes-selection-accent) 10%, var(--color-surface));
  color: color-mix(in srgb, var(--notes-selection-accent) 70%, var(--color-text));
}

.notes-trash-restore-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes-trash-restore-dialog h2 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.notes-trash-restore-description {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 20px;
}

.notes-trash-restore-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.funify-notes-page .notes-trash-restore-dialog .notes-btn {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: color-mix(in srgb, var(--notes-selection-accent) 70%, var(--color-text));
  font-size: 13px;
  line-height: 20px;
}

.funify-notes-page .notes-trash-restore-dialog .notes-btn.primary {
  min-width: 90px;
  color: var(--notes-selection-text);
  border-color: var(--notes-selection-accent);
  background: var(--notes-selection-background);
}

.funify-notes-page .notes-trash-restore-dialog .notes-btn:hover {
  background: color-mix(in srgb, var(--notes-selection-accent) 10%, var(--color-surface));
}

.funify-notes-page .notes-trash-restore-dialog .notes-btn.primary:hover {
  background: var(--notes-selection-hover);
}

.funify-notes-page .tree-context-menu button[data-tree-action='move'] {
  --notes-popup-icon: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 7V5h6l2 2h10v3M3 7v13h18v-4M13 12h8m-3-3 3 3-3 3%22/%3E%3C/svg%3E');
}

/* Card and tree actions share one compact, theme-aware popover. */
.funify-notes-page .tree-context-menu.notes-card-actions {
  --notes-card-danger: #c34459;
  display: block;
  width: min(248px, calc(100vw - 16px));
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow:
    0 12px 40px rgb(15 23 42 / 16%),
    0 2px 6px rgb(15 23 42 / 5%);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.notes-card-action-header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px 12px;
  color: var(--color-muted);
}

.notes-card-action-header span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-card-action-section {
  padding-top: 5px;
  border-top: 1px solid var(--color-border);
}

.notes-card-action-section + .notes-card-action-section {
  margin-top: 5px;
}

.funify-notes-page .tree-context-menu.notes-card-actions :is(button, summary) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.funify-notes-page .tree-context-menu.notes-card-actions :is(button, summary)::before {
  content: none;
}

.funify-notes-page .notes-card-actions svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.funify-notes-page .tree-context-menu.notes-card-actions :is(button, summary) > :is(svg, img) {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: var(--color-muted);
}

.funify-notes-page .tree-context-menu.notes-card-actions :is(button, summary):hover:not(:disabled),
.funify-notes-page .tree-context-menu.notes-card-actions :is(button, summary):focus-visible {
  background: var(--notes-popup-hover);
}

.funify-notes-page .tree-context-menu.notes-card-actions :is(button, summary):focus-visible {
  outline: 1px solid var(--notes-selection-accent);
  outline-offset: -1px;
}

.funify-notes-page .tree-context-menu.notes-card-actions [data-tree-action='delete'],
.funify-notes-page .tree-context-menu.notes-card-actions [data-tree-action='delete'] > svg {
  color: var(--notes-card-danger);
}

.funify-notes-page[data-notes-theme='dark'] .tree-context-menu.notes-card-actions {
  --notes-card-danger: #fb8d9b;
}

.funify-notes-page .tree-context-menu.notes-card-actions details[open] > summary {
  background: var(--notes-popup-hover);
}

.notes-card-action-group > summary {
  list-style: none;
}

.notes-card-action-group > summary::-webkit-details-marker {
  display: none;
}

.funify-notes-page .tree-context-menu.notes-card-actions summary::after {
  content: '';
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-left: auto;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}

.funify-notes-page .tree-context-menu.notes-card-actions details[open] > summary::after {
  transform: rotate(45deg);
}

.funify-notes-page .notes-card-actions .notes-card-action-destinations {
  position: static;
  width: auto;
  max-height: none;
  margin: 3px 4px 7px 18px;
  padding: 2px 0 2px 8px;
  border: 0;
  border-left: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.funify-notes-page .tree-context-menu.notes-card-actions .notes-card-action-destinations button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
}

.notes-card-action-hint {
  margin: 0;
  padding: 8px;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

@media (pointer: coarse) {
  .funify-notes-page .tree-context-menu.notes-card-actions :is(button, summary) {
    min-height: 42px;
  }
}
