/* Touch layouts for the menu and administrative forms. */
html{width:100%;-webkit-text-size-adjust:100%;}
body{margin:0;min-width:0;}
#root{min-width:0;max-width:100%;}
img,video,canvas{max-width:100%;}
input,select,textarea{max-width:100%;}
@media(max-width:767px){
 html,body{overflow-x:clip;}
 #root{padding-bottom:env(safe-area-inset-bottom);}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;min-height:44px;}
 button,a{touch-action:manipulation;}
 main{min-width:0!important;max-width:100%;}
 [role=dialog]{max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 32px)!important;overflow-y:auto;overscroll-behavior:contain;}
 [role=dialog] form{min-width:0;}
 [class*="overflow-x-auto"]{max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;}
 :root:has(aside.fixed) main table{min-width:620px;}
 :root:has(aside.fixed) main th,:root:has(aside.fixed) main td{padding:10px 12px;}
 :root:has(aside.fixed) main form .grid{grid-template-columns:minmax(0,1fr)!important;}
 :root:has(aside.fixed) main form [class*="col-span"]{grid-column:auto!important;}
 :root:has(aside.fixed) main button{min-height:40px;}
 :root:has(aside.fixed) aside.fixed{max-width:calc(100vw - 44px);height:100dvh;padding-bottom:env(safe-area-inset-bottom);}
 :root:has(aside.fixed) aside.fixed nav{overscroll-behavior:contain;}
}
@media(max-width:479px){
 [role=dialog]{padding:16px!important;}
 :root:has(aside.fixed) main{padding:16px 12px!important;}
 :root:has(aside.fixed) main h1{font-size:24px;overflow-wrap:anywhere;}
 :root:has(aside.fixed) main .flex-wrap{row-gap:10px;}
}

/* Inventory detail fits the phone with two columns. */
table.hb-inventory-count{min-width:0!important;table-layout:fixed;width:100%;}
.hb-inventory-count th:first-child,.hb-inventory-count td:first-child:not([colspan]){width:65%;position:static!important;overflow-wrap:anywhere;}
.hb-inventory-count th:last-child,.hb-inventory-count td:last-child:not([colspan]){width:35%;}
.hb-inventory-count input{width:100%;min-width:0;box-sizing:border-box;}
.hb-inventory-count td[colspan]{width:auto;}

/* Customer order notes remain readable across appearance themes. */
textarea.hb-customer-observations{background:#fff!important;color:#111!important;-webkit-text-fill-color:#111!important;color-scheme:light;font-size:16px!important;caret-color:#111;min-height:80px;}
textarea.hb-customer-observations::placeholder{color:#6b7280!important;-webkit-text-fill-color:#6b7280!important;opacity:1;}
