/* Shared compact hierarchy surfaces. Read-only public trees never receive drag handlers. */
:root:root:root body .compact-tree :is(ul,li){list-style:none;padding:0;margin:0}
:root:root:root body .compact-tree .tree-children{margin:0 0 0 18px;padding-left:10px;border-left:1px solid var(--design-adminBorder,#aaa)}
:root:root:root body.admin-theme #main .tree-row,:root:root:root body.admin-theme #main .menu-tree-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px 6px;margin:3px 0;min-width:0;min-height:40px;border:1px solid var(--design-adminBorder,#aaa);border-radius:8px;background:var(--design-adminPanelBg,#fff);color:var(--design-adminPanelText,#303030);position:relative}
:root:root:root body.admin-theme #main .tree-row>input{flex:1 1 120px;width:auto!important;min-width:100px!important;max-width:100%;min-height:32px!important;font-size:14px!important;padding:3px 6px!important}
:root:root:root body.admin-theme #main .tree-icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;min-width:30px;min-height:32px;padding:5px!important;margin:0}
:root:root:root body.admin-theme #main .tree-icon-button svg,.tree-node-icon,.menu-tree-head>svg{width:18px;height:18px;flex:0 0 18px}
:root:root:root body.admin-theme #main .tree-grip{cursor:grab;touch-action:pan-y}
:root:root:root body.admin-theme #main .tree-grip:active{cursor:grabbing}
.tree-actions{display:flex;gap:3px;align-items:center;flex:none}.tree-count{font-size:12px;min-width:16px;text-align:center}.tree-toggle[aria-expanded=true] svg,.menu-tree-head>button[aria-expanded=true] svg{transform:rotate(90deg)}
:root:root:root body.admin-theme #main .tree-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
:root:root:root body.admin-theme #main .tree-move-chooser{display:flex;gap:6px;align-items:center;margin:0 4px 4px 68px;padding:6px;background:var(--admin-soft,#ececef);border-radius:8px}.tree-move-chooser select{min-width:0;flex:1}
:root:root:root body.admin-theme #main [data-tree-drop=before]{box-shadow:inset 0 3px var(--design-buttonHoverBg,#ffd414)}
:root:root:root body.admin-theme #main [data-tree-drop=after]{box-shadow:inset 0 -3px var(--design-buttonHoverBg,#ffd414)}
:root:root:root body.admin-theme #main [data-tree-drop=inside]{outline:2px solid var(--design-buttonHoverBg,#ffd414);outline-offset:-2px;background:var(--admin-soft,#ececef)}
.is-tree-dragging{opacity:.5}
:root:root:root body.admin-theme #main #menu-entries .compact-menu-node{padding:4px 6px;margin:4px 0;border:1px solid var(--design-adminBorder,#aaa);border-radius:8px;background:var(--design-adminPanelBg,#fff);color:var(--design-adminPanelText,#303030);min-width:0}
:root:root:root body.admin-theme #main .menu-tree-head{border:0;margin:0;padding:2px;min-height:36px}
.menu-tree-title{flex:1;min-width:90px;font-size:14px;white-space:normal!important}.menu-tree-head .tree-grip{flex:none}
:root:root:root body.admin-theme #main .compact-menu-node[data-collapsed=true]>*:not(.menu-tree-head){display:none!important}
:root:root:root body.admin-theme #main .compact-menu-node>.menu-children{margin:4px 0 0 18px;padding-left:8px;border-left:1px solid var(--design-adminBorder,#aaa)}
:root:root:root body.admin-theme #main .compact-menu-node>label{display:inline-flex;vertical-align:top;flex-direction:column;gap:3px;width:calc(50% - 8px);margin:4px;min-width:0}
:root:root:root body .sitemap-tree{display:flex;flex-direction:column;gap:3px;margin:10px 0}
:root:root:root body .sitemap-tree :is(a,summary){display:flex;gap:6px;align-items:center;padding:6px 10px;min-height:38px;border-radius:8px;line-height:1.4;white-space:normal}
:root:root:root body .sitemap-tree>.nav-group{padding:0;margin:2px 0;border:1px solid var(--design-panelBorder,#aaa);border-radius:8px}
:root:root:root body .sitemap-tree .submenu{position:static;display:flex;gap:2px;box-shadow:none;min-width:0;margin:0 8px 5px 20px;padding-left:8px;border-left:1px solid var(--design-panelBorder,#aaa)}
:root:root:root body .sitemap-tree .nav-group:not([open])>.submenu{display:none}
:root:root:root body .sitemap-tree summary{cursor:pointer}
:root:root:root body .sitemap-tree summary::before{content:'›';font-size:20px;line-height:1}.sitemap-tree details[open]>summary::before{transform:rotate(90deg)}
:root:root:root body.admin-theme .commerce-flyout :is(a,h3,summary){padding-block:5px;margin-block:2px;line-height:1.4}
[hidden].tree-move-chooser{display:none!important}
@media(max-width:760px){:root:root:root body.admin-theme #main .tree-icon-button{min-width:44px;min-height:44px;flex-basis:44px}.tree-actions{margin-left:auto}:root:root:root body .compact-tree .tree-children{margin-left:8px;padding-left:6px}:root:root:root body.admin-theme #main .compact-menu-node>label{width:calc(100% - 8px)}:root:root:root body .sitemap-tree :is(a,summary){min-height:44px}}
@media(prefers-reduced-motion:reduce){.tree-toggle svg,.menu-tree-head svg{transition:none!important}}
