/* Urban Food — teclado, zoom e altura em celular/tablet (carregado depois do CSS de cada tela) */

/* 1) Sem zoom ao tocar no campo.
   iPhone/iPad e alguns Androids dão zoom em qualquer campo com fonte menor que 16px.
   Vale para TODA tela de toque (inclui tablet deitado, que passa de 900px) e para telas estreitas. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation}
@media (pointer:coarse),(max-width:1100px){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=button]):not([type=submit]),
  select,textarea{font-size:16px!important}
}

/* 2) Altura certa: 100vh inclui as barras do navegador e "pula" quando o teclado abre; dvh acompanha a tela real */
@supports (height:100dvh){
  .auth,.center,.app,body.uf-login{min-height:100dvh}
}
@media (min-width:901px){
  @supports (height:100dvh){.side{height:100dvh}}
}

/* 3) Teclado aberto (a classe uf-kb e as medidas --uf-vvh / --uf-vvt vêm do mobile-fix.js).
   --uf-vvh = altura que sobrou acima do teclado; --uf-vvt = deslocamento da área visível. */
html.uf-kb .toast{bottom:auto;top:calc(12px + env(safe-area-inset-top,0px))}
html.uf-kb .fab-cart,html.uf-kb .fab-track{visibility:hidden;opacity:0;pointer-events:none;transition:none}

/* janelas e gavetas passam a ocupar só a área visível: nada fica escondido atrás do teclado nem "solto" */
html.uf-kb .track-overlay,html.uf-kb .pf-overlay,html.uf-kb .modal,html.uf-kb .cart-overlay{
  inset:auto;left:0;right:0;top:var(--uf-vvt,0px);height:var(--uf-vvh,100dvh);bottom:auto}
html.uf-kb .cart-drawer{top:var(--uf-vvt,0px);height:var(--uf-vvh,100dvh)}
html.uf-kb .track-sheet,html.uf-kb .pf-sheet{max-height:calc(var(--uf-vvh,100dvh) - 28px)}
html.uf-kb .sheet{max-height:calc(var(--uf-vvh,100dvh) - 32px)}

/* listas que usavam % da tela inteira encolhem para o campo de digitar continuar à vista */
html.uf-kb .tk-msgs{height:min(calc(var(--uf-vvh,100dvh)*.28),220px)}
html.uf-kb .cmsgs{height:min(calc(var(--uf-vvh,100dvh)*.30),240px)}
html.uf-kb .cart-drawer .drawer-items{max-height:min(calc(var(--uf-vvh,100dvh)*.2),140px)}

/* menu de baixo do painel (só existe no celular) some enquanto digita, senão ele "sobe" junto com o teclado */
@media (max-width:900px){
  html.uf-kb .side{visibility:hidden;opacity:0;pointer-events:none;transition:none}
}
