/* Release 2.1 task context menu + action toast (Kirby, kirby-premium/context-menu/spec.md). On top of theme.css. */
.ctx-menu { position: fixed; z-index: 95; min-width: 220px; max-width: 280px; padding: 6px 0; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-pop); }
[data-theme="dark"] .ctx-menu { background: var(--panel); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ctx-menu { background: var(--panel); } }
.ctx-item { display: flex; align-items: center; gap: 10px; width: calc(100% - 12px); height: 32px; margin: 0 6px; padding: 0 6px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: var(--type-menu); text-align: left; cursor: pointer; white-space: nowrap; }
.ctx-item .ctx-ic { width: 16px; height: 16px; flex: none; color: var(--text-2); }
.ctx-item .ctx-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ctx-item .ctx-hint { margin-left: 12px; color: var(--text-3); font: var(--type-menu-hint); }
.ctx-item:hover, .ctx-item:focus { background: var(--hover); outline: none; }
.ctx-item:hover .ctx-ic, .ctx-item:focus .ctx-ic { color: var(--text); }
.ctx-item:focus-visible { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.ctx-item.danger, .ctx-item.danger .ctx-ic { color: var(--danger); }
.ctx-item.danger:hover, .ctx-item.danger:focus { background: var(--error-bg); }
.ctx-item:disabled { opacity: .4; cursor: default; background: none; }
.ctx-sep { height: 1px; margin: 6px 12px; background: var(--hairline); }
.task.ctx-open, .task.ctx-open:hover { background: var(--selected); --row-bg: var(--selected); }
.task.flash { animation: ctx-flash 1.2s ease-out; }
@keyframes ctx-flash { from { background: var(--selected); --row-bg: var(--selected); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .task.flash { animation: none; background: var(--selected); } }

/* phone sheet: the 2.1 sheet (cell-edit.css .ce-sheet) with menu rows */
.ctx-sheet .ctx-sheet-title { font: var(--type-sheet-title); text-transform: none; letter-spacing: var(--type-track-none); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; margin: 0; }
.ctx-sheet-list { padding: 0 0 calc(8px + env(safe-area-inset-bottom)); overflow-y: auto; }
.ctx-sheet .ctx-item { width: 100%; margin: 0; height: 48px; padding: 0 16px; gap: 14px; border-radius: 0; font: var(--type-menu-touch); }
.ctx-sheet .ctx-item .ctx-ic { width: 20px; height: 20px; }
.ctx-sheet .ctx-sep { margin: 8px 0; }

/* the row ⋯: phone only (desktop uses right-click and the detail header ⋯) */
.task .row-more { display: none; }
@media (max-width: 899px) {
  main.grid .pt-inner .task .title-line > .row-more { display: inline-flex; order: 1; flex: none; width: 32px; height: 44px; margin: 0; padding: 0; align-items: center; justify-content: center; color: var(--text-3); background: none; border: 0; }
  main.grid .pt-inner .task .title-line > .row-more svg { width: 18px; height: 18px; }
  main.grid .pt-inner .task .title-line > .row-more:active { color: var(--text); }
}

/* action toast */
.act-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom) + var(--toolbar-h, 0px)); transform: translateX(-50%); z-index: 96;
  display: flex; align-items: center; gap: 8px; min-height: 40px; max-width: calc(100vw - 32px); padding: 0 8px 0 14px; border-radius: 10px;
  background: #111111; color: #F2F2F0; font: var(--type-toast); box-shadow: var(--shadow-pop); }
.act-toast[hidden] { display: none; }
.act-toast .act-msg { padding: 10px 6px 10px 0; }
.act-toast .act-undo { min-height: 44px; padding: 0 10px; border: 0; background: none; color: #8AB4F8; font: var(--type-toast-action); cursor: pointer; border-radius: 8px; }
.act-toast .act-undo:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
[data-theme="dark"] .act-toast { background: #F2F2F0; color: #111111; }
[data-theme="dark"] .act-toast .act-undo { color: #1A5FD0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .act-toast { background: #F2F2F0; color: #111111; } :root:not([data-theme="light"]) .act-toast .act-undo { color: #1A5FD0; } }
