.action-dialog{width:min(560px,calc(100vw - 32px));max-width:560px;max-height:calc(100svh - 32px);padding:0;border:1px solid var(--border,#ccd7cc);border-radius:12px;background:var(--surface,#fff);color:var(--text,#17251c);box-shadow:0 18px 70px #0004;overflow:auto}
.action-dialog::backdrop{background:#071b12a6}
.action-dialog>header{position:static;display:block;padding:20px 24px;background:transparent;border:0;border-bottom:1px solid var(--border,#ccd7cc)}
.action-dialog h2{margin:0;font-size:1.3rem;line-height:1.4;overflow-wrap:anywhere}
.action-dialog-body{padding:24px;white-space:pre-line;overflow-wrap:anywhere;line-height:1.6}
.action-dialog>.dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;margin:0;padding:16px 24px;border-top:1px solid var(--border,#ccd7cc)}
.action-dialog>.dialog-actions>button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;max-width:100%;margin:0;padding:10px 18px;line-height:1.4;font:inherit;border-radius:8px;border:1px solid #b6c6bd;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.action-dialog>.dialog-actions>.secondary{color:var(--text,#17251c);background:transparent}
.action-dialog>.dialog-actions>.secondary:hover{background:var(--bg,#f4f6f3)}
.action-dialog>.dialog-actions>.dialog-primary{background:#176a3b;border-color:#176a3b;color:#fff}
.action-dialog>.dialog-actions>.dialog-primary:hover{background:#10532d;border-color:#10532d}
.action-dialog>.dialog-actions>.dialog-danger{background:#b4232b;border-color:#b4232b;color:#fff}
.action-dialog>.dialog-actions>.dialog-danger:hover{background:#901b22;border-color:#901b22}
.action-dialog button:focus-visible{outline:3px solid #b87500;outline-offset:3px}
/* Modal focus trapping does not by itself prevent background scrolling. */
html{scrollbar-gutter:stable}
html:has(dialog:modal),html.has-modal,html.workspace-has-modal{overflow:hidden;overscroll-behavior:none}
body:has(dialog:modal),html.has-modal>body,html.workspace-has-modal>body{overflow:hidden;overscroll-behavior:none}
dialog:modal{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
html dialog:modal::backdrop{background:rgb(7 20 16 / 55%);overscroll-behavior:none;touch-action:none}
dialog:modal :is([role=listbox],.media-picker-grid){overscroll-behavior:contain}
html.workspace-has-modal .admin-sidebar>nav{overflow:hidden}
html.workspace-has-modal .admin-footer{position:relative}
html.workspace-has-modal :is(.admin-topbar,.admin-sidebar,.admin-footer)::after{content:'';position:absolute;inset:0;background:rgb(7 20 16 / 55%);z-index:1000;pointer-events:auto}
