/* Shared iPhone/Android bottom-sheet grip with a reliable touch target. */
@media (max-width:800px) {
  /* A closed dialog must never leave a transparent touch-blocking surface. */
  body > dialog:not([open]) {
    display:none!important;
    pointer-events:none!important;
  }
  /* The legacy sheet's ::before grip has a more specific selector (with
     :has() and !important). Disable it only after the functional grip exists. */
  html body dialog#modal#modal.nexo-sheet-gesture-ready[open]:has(#form[data-finance-type="transaction"])::before,
  html body dialog#modal#modal.nexo-sheet-gesture-ready[open]:not(:has(#form[data-finance-type="transaction"]))::before,
  html body dialog#mobile-tx-sheet#mobile-tx-sheet.nexo-sheet-gesture-ready[open]::before,
  html body dialog.nexo-sheet-gesture-ready[open]::before {
    display:none!important;
    content:none!important;
    height:0!important;
    margin:0!important;
  }
  body > dialog.nexo-sheet-gesture-ready[open] {
    touch-action:pan-y;
  }
  body > dialog.nexo-sheet-gesture-ready[open] > .nexo-sheet-drag-handle {
    appearance:none!important;
    -webkit-appearance:none!important;
    position:absolute!important;
    top:2px!important;
    left:50%!important;
    z-index:8!important;
    transform:translateX(-50%)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    width:90px!important;
    height:32px!important;
    min-height:32px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:12px!important;
    background:transparent!important;
    box-shadow:none!important;
    cursor:grab;
    touch-action:none;
    -webkit-user-select:none;
    user-select:none;
    -webkit-tap-highlight-color:transparent;
  }
  /* Referência única: Perfil > Nome completo (44 x 5 px). */
  body > dialog.nexo-sheet-gesture-ready[open] > .nexo-sheet-drag-handle > span {
    display:block;
    box-sizing:border-box;
    width:44px;
    height:5px;
    flex:none;
    background:#dfe2e7;
    border-radius:9px;
    pointer-events:none;
  }
  body > dialog.nexo-sheet-gesture-ready[open] > .nexo-sheet-drag-handle:focus-visible {
    outline:2px solid #607e9b!important;
    outline-offset:0!important;
  }
  body > dialog.nexo-sheet-gesture-ready[open] > .nexo-sheet-handle-spacer {
    display:block;
    height:9px;
    width:100%;
    pointer-events:none;
  }
  body > dialog.nexo-sheet-dragging[open] {
    overscroll-behavior:contain!important;
    -webkit-user-select:none!important;
    user-select:none!important;
  }
  body > .nexo-profile-bottom-sheet .nexo-profile-drag-target {
    position:relative!important;
    cursor:grab;
    touch-action:none;
    -webkit-user-select:none;
    user-select:none;
    -webkit-tap-highlight-color:transparent;
  }
  /* Os perfis titular e convidado compartilham o mesmo traço visível. */
  html body > .nexo-profile-bottom-sheet .nexo-profile-drag-target:is(.nexo-bottom-handle,.nexo-visitor-sheet-handle) {
    width:44px!important;
    height:5px!important;
    min-height:5px!important;
    border-radius:9px!important;
    background:#dfe2e7!important;
  }
  body > .nexo-profile-bottom-sheet .nexo-profile-drag-target::before {
    content:"";
    position:absolute;
    top:-13px;
    left:50%;
    width:100px;
    height:34px;
    transform:translateX(-50%);
  }
  body > .nexo-profile-bottom-sheet .nexo-profile-drag-target:focus-visible {
    outline:2px solid #607e9b;
    outline-offset:5px;
  }
  /* Preserve a visible focus ring for keyboard, but clear touch-only
     focus on the outer card when the payment dialog closes. */
  #app [data-statement-card]:focus:not(:focus-visible) {
    outline:none!important;
    box-shadow:none!important;
  }
}
