/* Shared action spacing, including secondary controls outside the preceding form. */
:root{--bh-action-gap:12px;--bh-action-section-gap:18px}
:is(#app,#modal) :is(.actions,.wf-actions,.form-footer,.ach-row-actions,.bh-table-actions,.bh-work-actions,.bh-photo-actions,.bh-footer-actions,.bh-team-actions,.bh-hero-actions,.bh-camera-control,.bh-photo-confirm,.voice-bar){gap:var(--bh-action-gap)!important;row-gap:var(--bh-action-gap)!important}
:is(#app,#modal) :is(.actions,.wf-actions,.form-footer,.ach-row-actions,.bh-table-actions,.bh-work-actions,.bh-photo-actions,.bh-footer-actions,.bh-team-actions)>:is(button,a.button,.wf-print-link){margin:0!important;max-width:100%;white-space:normal}
/* A Save footer and a following Back button are separate elements, not one flex row. */
:is(#app,#modal) :is(form,.form-footer,.actions,.wf-actions)+:is(button,a.button,a.wf-print-link,.actions,.wf-actions){margin-block-start:var(--bh-action-gap)!important}
:is(#app,#modal) :is(.actions,.wf-actions,.form-footer)+:is(form,.field,.fields){margin-block-start:var(--bh-action-section-gap)!important}
#modal>:is(button,a.button,a.wf-print-link)+:is(button,a.button,a.wf-print-link){margin-inline-start:var(--bh-action-gap)!important;margin-block-start:var(--bh-action-gap)!important}
:is(#app,#modal) .bh-item-gallery figure{display:flex;flex-direction:column;gap:10px;min-width:0}
:is(#app,#modal) .bh-item-gallery .bh-photo-remove-slot{margin:0;gap:10px}
:is(#app,#modal) .bh-selected-photos{gap:var(--bh-action-gap)}
:is(#app,#modal) .bh-selected-photos figure{gap:10px}
:is(#app,#modal) .bh-item-photo-columns>section>[data-bh-item="photos"]{margin-block-start:var(--bh-action-gap)!important}
:is(#app,#modal) .form-footer{flex-wrap:wrap}
:is(#app,#modal) .form-footer>:is(button,a){min-width:0}
/* Compact header controls retain their established spacing. */
#app .topbar .actions{gap:8px!important;row-gap:8px!important}
@media(max-width:600px){#modal>:is(button,a.button,a.wf-print-link)+:is(button,a.button,a.wf-print-link){margin-inline-start:0!important;margin-inline-end:var(--bh-action-gap)!important}}

/* Keep photo Remove/Delete controls clear of the following field or action. */
:is(#app,#modal) .bh-selected-photos:not(:empty){margin-block-start:12px!important;margin-block-end:20px!important}
:is(#app,#modal) .bh-selected-photos figure{gap:10px!important}
:is(#app,#modal) .bh-selected-photos figure>button{margin:0!important}
:is(#app,#modal) .bh-photo-remove-slot{gap:10px!important;margin-block-start:10px!important;margin-block-end:18px!important}
:is(#app,#modal) .bh-item-gallery{margin-block-end:20px!important;row-gap:16px}
:is(#app,#modal) .bh-item-gallery .bh-photo-remove-slot{margin:0!important}
:is(#app,#modal) .bh-photo-confirm{gap:10px!important}
