/* Shared icon-only controls. Keep labelled buttons, badges and editor canvases
   out of this rule: an invisible text node must never reserve a flex gap. */
.lucide{flex:0 0 auto;aspect-ratio:1;height:auto}
:is(.portal-icon-button,.icon-btn,.nav-collapse,.modal-x,
    .notification-button,.entity-actions,.table-tab-action,.table-tab-menu,
    .view-rail-actions,.view-group-actions,.record-layout-button,.rp-icon-button,
    .form-field-toolbar button,.view-rail>header button,.recipients-head button,
    .inspector-title button,.colour-rule-style button,.config-rule>button,
    .summary-condition>button,.layout-builder-section>header button,.layout-field-row>button,
    .iw-section-heading button,.iw-layout-field-actions button,.help-section-tools button,
    .universal-search-tools button,.form-preview>.library-archive-button,
    .esign-library-row>.library-archive-button,.popover-head button,[data-close-menu]
):has(>svg.lucide):not([hidden]) {
    align-items:center!important;justify-content:center!important;
    gap:0!important;line-height:1;box-sizing:border-box;flex-shrink:0;
}
:is(.portal-icon-button,.icon-btn,.nav-collapse,.modal-x,
    .notification-button,.entity-actions,.table-tab-action,.table-tab-menu,
    .view-rail-actions,.view-group-actions,.record-layout-button,.rp-icon-button,
    .form-field-toolbar button,.view-rail>header button,.recipients-head button,
    .inspector-title button,.colour-rule-style button,.config-rule>button,
    .summary-condition>button,.layout-builder-section>header button,.layout-field-row>button,
    .iw-section-heading button,.iw-layout-field-actions button,.help-section-tools button,
    .universal-search-tools button,.form-preview>.library-archive-button,
    .esign-library-row>.library-archive-button,.popover-head button,[data-close-menu]
)>svg.lucide {
    display:block;flex:none!important;margin:0 auto!important;vertical-align:middle;
}
.portal-icon-button {
    display:inline-flex!important;flex-shrink:0;width:30px;height:30px;min-width:30px;min-height:30px;
    padding:0!important;overflow:hidden;border-radius:50%;
}
.portal-icon-button>svg.lucide{width:15px!important;height:15px!important}
.wf-rule>.portal-icon-button,.pr-item>.portal-icon-button,.pr-item-heading>.portal-icon-button {
    width:32px;height:32px;min-width:32px;min-height:32px;
}
.view-rail>header button>svg.lucide,.view-rail-actions>svg.lucide {
    width:15px;height:15px;
}
/* Older module rules set only width; give these glyphs matching dimensions. */
:is(.entity-actions,.table-tab-menu,.view-search,.view-rail-item-main,.create-view-link)>.lucide {
    width:15px;height:15px;
}
.list-filter>.lucide:last-child{width:12px;height:12px}
:is(.mp-row-open,.mp-filters>label)>.lucide{width:17px;height:17px}
:is(.mp-post-placeholder,.mp-platform-logo)>.lucide{width:23px;height:23px}
.portal-icon-button:focus-visible{outline:2px solid #377859;outline-offset:3px}
.cm-circle{width:29px;min-width:29px;height:29px;min-height:29px;flex-shrink:0}
/* Let the search field yield space before compressing circular header buttons. */
@media(max-width:700px){
    .stage>header{gap:10px}
    .stage>header>:is(strong,.base-identity){min-width:0;flex:0 1 auto;overflow:hidden}
    .stage>header>.header-actions{flex:1 0 158px;min-width:0;justify-content:flex-end}
    .stage>header .search.universal-search{flex:1 1 0;min-width:38px;width:auto;max-width:none}
    .stage>header .user-menu{flex-shrink:0}
}
@media(pointer:coarse){
    .wf-step-editor header .portal-icon-button,.wf-rule>.portal-icon-button,
    .pr-section>header .portal-icon-button,.pr-item>.portal-icon-button,.pr-item-heading>.portal-icon-button {
        width:36px;height:36px;min-width:36px;min-height:36px;
    }
}
