/* v12.81.2: keyboard-only layout. This file loads last for customer/driver portals. */
@media (max-width:800px) {
  body:is(.shuh-portal-customer,.shuh-portal-driver).shuh-mobile-keyboard-open {
    --shuh-active-keyboard-height:var(--shuh-mobile-vv-height,100dvh);
  }
  /* Overlays (including the driver's release-to-market confirmation) are sized
     to the visual viewport, not to the obscured 100vh layout viewport. */
  body:is(.shuh-portal-customer,.shuh-portal-driver).shuh-mobile-keyboard-open :is(
    .shuh-decision-modal,.shuh-price-offer-modal,.shuh-price-decision-modal,
    .shuh-payment-modal,.shuh-account-create-modal,.shuh-customer-drawer,
    .shuh-driver-drawer,.shuh-driver-market-drawer,.shuh-order-drawer
  ):not([hidden]) {
    position:fixed!important;
    top:var(--shuh-mobile-vv-top,0px)!important;
    bottom:auto!important;
    height:var(--shuh-active-keyboard-height)!important;
    max-height:var(--shuh-active-keyboard-height)!important;
    min-height:0!important;
  }
  body:is(.shuh-portal-customer,.shuh-portal-driver).shuh-mobile-keyboard-open .shuh-decision-modal:not([hidden]) .shuh-decision-card {
    max-height:calc(var(--shuh-active-keyboard-height) - 16px)!important;
    width:min(480px,calc(100vw - 24px))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    scroll-padding-bottom:18px;
  }
  body:is(.shuh-portal-customer,.shuh-portal-driver).shuh-mobile-keyboard-open .shuh-decision-card .shuh-decision-actions {
    position:sticky;
    bottom:0;
    z-index:2;
    background:#fff;
    padding-top:10px;
  }
  body:is(.shuh-portal-customer,.shuh-portal-driver).shuh-mobile-keyboard-open :is(
    .shuh-price-offer-sheet,.shuh-price-decision-sheet,.shuh-payment-sheet
  ) {
    max-height:calc(var(--shuh-active-keyboard-height) - 8px)!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    scroll-padding-bottom:18px;
  }
  /* Full-screen drawers retain independent scrolling above the IME. */
  body:is(.shuh-portal-customer,.shuh-portal-driver).shuh-mobile-keyboard-open :is(
    .shuh-customer-drawer-panel,.shuh-driver-drawer-panel,
    .shuh-driver-market-drawer-panel,.shuh-order-drawer-panel,
    .shuh-order-drawer-panel-v3,.shuh-driver-trip-drawer-v6,
    .shuh-driver-market-drawer-v6,.shuh-market-app-detail-panel-v1
  ) {
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  /* When the browser resizes only visualViewport (not the document), provide
     temporary scroll space so bottom-of-page fields can rise above the keyboard.
     No spacer is added for chat rooms or overlay dialogs. */
  body:is(.shuh-portal-customer,.shuh-portal-driver,.sh-auth-page).shuh-keyboard-page-edit::after {
    content:'';
    display:block;
    height:calc(var(--shuh-mobile-kb-gap,0px) + 24px);
    width:1px;
    pointer-events:none;
    flex:none;
  }
  body:is(.shuh-portal-customer,.shuh-portal-driver).shuh-keyboard-page-edit .shuh-main {
    padding-bottom:calc(105px + var(--shuh-mobile-kb-gap,0px))!important;
  }
  body.sh-auth-page.shuh-keyboard-page-edit .sh-auth-main,
  body.sh-auth-page.shuh-keyboard-page-edit .sh-auth-focus {
    padding-bottom:calc(40px + var(--shuh-mobile-kb-gap,0px))!important;
  }
  /* Preserve the user's text while the viewport is reduced: no forced body
     translate, focus/blur, overlay reparenting, or replacement DOM. */
  body:is(.shuh-portal-customer,.shuh-portal-driver,.sh-auth-page).shuh-mobile-input-focused
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),textarea,select):focus {
    font-size:max(16px,1em)!important;
    scroll-margin-block:12px 22px;
  }
}
