/* Last, narrow overrides for keyboard height and WebViews without dynamic viewport units. */
.easy-product .easy-order{display:block;margin:3px 0}
@media(max-width:760px){
 #action-dialog,#camera-dialog{max-height:calc(100vh - 16px);max-height:calc(var(--mobile-viewport-height,100dvh) - 16px);overflow-x:hidden;overscroll-behavior:contain;scroll-padding:12px 0 16px}
 #action-dialog input,#action-dialog select,#action-dialog textarea{min-width:0;max-width:100%;font-size:max(16px,1em)}
 #action-dialog .modal-head>div{min-width:0}
 #action-dialog .modal-card-detail,#action-dialog .generated-card,#action-dialog .easy-product>span{overflow-wrap:anywhere}
 .generated-card{flex-wrap:wrap;gap:10px}.generated-card>div{min-width:0;max-width:100%}.generated-card strong{overflow-wrap:anywhere}
 .field-scan-alternatives{flex-wrap:wrap}.field-scan-alternatives button{min-height:48px;font-size:18px}
}
/* Keep page inputs and their submit controls reachable above either mobile keyboard model. */
@media(max-width:999px){
 html{scroll-padding-bottom:calc(16px + var(--mobile-keyboard-inset,0px))}
 #main input,#main textarea,#main select{scroll-margin-block:20px}
 body.mobile-keyboard-open #navigation{display:none!important}
 body.mobile-keyboard-open #main{padding-bottom:calc(24px + var(--mobile-keyboard-inset,0px))}
 body.mobile-keyboard-open #action-dialog,
 body.mobile-keyboard-open #camera-dialog{top:calc(var(--mobile-viewport-offset-top,0px) + 8px);bottom:auto;margin-top:0;margin-bottom:0;max-height:calc(var(--mobile-viewport-height,100dvh) - 16px)}
 body.mobile-keyboard-open .toast{bottom:16px}
}
@media(max-width:600px){
 #action-dialog.easy-worker-dialog{height:100vh;max-height:100vh;height:var(--mobile-viewport-height,100dvh);max-height:var(--mobile-viewport-height,100dvh)}
 .easy-product>span{display:block;font-size:16px;line-height:1.4}
 #action-dialog .easy-report-form .easy-submit{position:static;bottom:auto}
 #action-dialog .easy-report-form .quantity-input{scroll-margin:12px 0}
 #action-dialog .result-view .button-wide{white-space:normal}
}
@media(max-height:480px) and (orientation:landscape){
 #camera-video{max-height:36vh;aspect-ratio:auto;object-fit:contain}
 #action-dialog.easy-worker-dialog{height:auto;max-height:calc(var(--mobile-viewport-height,100vh) - 12px)}
 .easy-worker-dialog .easy-report-head{margin-bottom:8px}
}
