/* A modal scrolls its fields, keeping the decision buttons outside the scroll area. */
body #dialog:has(>.modal-fixed-actions){position:fixed!important;left:50%!important;right:auto!important;top:calc(var(--operation-viewport-top,0px) + var(--operation-viewport,100dvh)/2)!important;bottom:auto!important;margin:0!important;transform:translate(-50%,-50%)!important;padding:0!important;max-height:calc(var(--operation-viewport,100dvh) - 24px)!important;overflow:hidden!important}
body #dialog>.modal-fixed-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr) auto;max-height:calc(var(--operation-viewport,100dvh) - 26px);min-height:0;margin:0;gap:0!important;overflow:hidden}
body #dialog>.modal-fixed-actions>h2{margin:0;padding:22px 24px 12px}
body #dialog>.modal-fixed-actions>.glass-dialog-heading{margin:0;padding:22px 52px 14px 24px}
body #dialog>.modal-fixed-actions>.modal-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:16px;padding:8px 24px 20px}
body #dialog>.modal-fixed-actions>.dialog-actions{position:relative!important;inset:auto!important;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;margin:0!important;padding:14px 24px max(14px,env(safe-area-inset-bottom));border-top:1px solid var(--line,#b5ccd5);background:var(--surface,#f3f8fa);z-index:2;box-sizing:border-box}
body #dialog>.modal-fixed-actions>.dialog-actions button{min-height:48px;white-space:normal;line-height:1.35}
body #dialog>.modal-fixed-actions .field{min-width:0}
body #dialog>.order-open-form>.modal-scroll{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px;align-content:start}
body #dialog>.order-open-form>.modal-scroll>:not(.field):not(#attendance-kind){grid-column:1/-1}
body #dialog>.order-open-form>.modal-scroll>.field,body #dialog>.order-open-form>.modal-scroll #attendance-kind>.field{margin:0}
body #dialog>.product-add-form>.modal-scroll>.field{margin:12px 0 0;line-height:1.4}
body #dialog>.modal-fixed-actions input,body #dialog>.modal-fixed-actions select,body #dialog>.modal-fixed-actions textarea{scroll-margin-block:20px;max-width:100%;box-sizing:border-box}
.order-quick-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.order-quick-actions>button{min-height:48px}
.order-primary-actions{display:none}
@media(max-width:900px){
 .order-primary-actions{position:sticky;top:0;z-index:4;display:flex;flex-wrap:wrap;gap:8px;padding:10px;background:var(--surface,#f3f8fa);border:1px solid var(--line,#b5ccd5);border-radius:14px;margin-bottom:14px;box-shadow:0 5px 16px #071c2a12}
 .order-primary-actions>button{flex:1;min-width:120px;min-height:48px;margin:0;white-space:normal;line-height:1.35}
 .workspace .order-primary-actions{top:var(--operation-header-height,96px)}
 .order-primary-actions>.comanda-update-controls{display:contents}
 .order-primary-actions>.comanda-update-controls>.cancel-update-button{display:none}
 .order-primary-actions .send-floating{position:static!important;inset:auto!important;transform:none!important;max-width:100%;flex:1;min-width:120px;min-height:48px;white-space:normal}
 .order-panel{min-width:0}
 body #dialog>.modal-fixed-actions>.dialog-actions{padding-inline:16px}
 body #dialog>.modal-fixed-actions>.dialog-actions>button{flex:1;min-width:120px}
}
@media(max-width:540px){
 body #dialog:has(>.modal-fixed-actions){width:calc(100vw - 16px)!important;max-width:none!important;border-radius:18px!important}
 body #dialog>.modal-fixed-actions>h2{padding:18px 16px 10px}
 body #dialog>.modal-fixed-actions>.glass-dialog-heading{padding:18px 48px 10px 16px}
 body #dialog>.modal-fixed-actions>.modal-scroll{padding:6px 16px 16px}
 body #dialog>.order-open-form>.modal-scroll{grid-template-columns:minmax(0,1fr)}
}
@media print{
 body #dialog:has(>.modal-fixed-actions){position:static!important;inset:auto!important;transform:none!important;max-height:none!important;overflow:visible!important}
 body #dialog>.modal-fixed-actions{display:block!important;max-height:none!important;overflow:visible!important}
 body #dialog>.modal-fixed-actions>.modal-scroll{overflow:visible!important}
 .order-primary-actions{display:none!important}
}
