/* Vchat 0.62.24-alpha — Inbox modal interaction + desktop composer hardening
   Scope: shared Vchat modal click/touch targets and Inbox send button geometry.
   No canonical IDs, listeners, request logic or composer actions are replaced. */

/* -------------------------------------------------------------------------
   Shared modal interaction surface
   ------------------------------------------------------------------------- */
#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open{
  pointer-events:auto!important;
  touch-action:manipulation!important;
}

#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-dialog{
  position:relative!important;
  isolation:isolate!important;
  pointer-events:auto!important;
}

#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-head{
  position:sticky!important;
  top:0!important;
  z-index:30!important;
  pointer-events:auto!important;
  background:#fff!important;
}

#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-head [data-vchat-modal-close]{
  position:relative!important;
  z-index:32!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 auto!important;
  width:36px!important;
  min-width:36px!important;
  max-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  margin:0!important;
  padding:0!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  cursor:pointer!important;
  user-select:none!important;
  -webkit-user-select:none!important;
  -webkit-tap-highlight-color:transparent!important;
}

#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-body{
  position:relative!important;
  z-index:2!important;
  pointer-events:auto!important;
}

#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:25!important;
  pointer-events:auto!important;
  background:#fff!important;
}

#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-actions [data-vchat-modal-close],
#vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-actions button{
  position:relative!important;
  z-index:26!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  cursor:pointer!important;
  -webkit-tap-highlight-color:transparent!important;
}

/* iPhone / mobile bottom-sheet: keep the two actions completely tappable and
   above the safe area. This also prevents transparent page layers from ever
   occupying their hit box. */
@media (max-width:900px), (max-width:1024px) and (orientation:portrait){
  #vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open{
    z-index:2147483000!important;
  }

  #vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-dialog{
    z-index:2147483001!important;
    max-height:min(88dvh,760px)!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }

  #vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-actions{
    margin-left:0!important;
    margin-right:0!important;
    padding:14px 0 max(16px,env(safe-area-inset-bottom))!important;
    border-top:1px solid #ece9f5!important;
  }

  #vchat-frontend-app.vchat-frontend-app #vchat-modal.vchat-modal.is-open .vchat-modal-actions button{
    min-height:48px!important;
  }
}

/* -------------------------------------------------------------------------
   Desktop composer send button
   0.62.20 compacted the button to 48px while desktop still rendered the word
   “Enviar”, which caused the label to overflow. Desktop keeps the label and
   gets a proper fixed action column; mobile continues using the arrow icon.
   ------------------------------------------------------------------------- */
@media (min-width:901px){
  #vchat-frontend-app.vchat-frontend-app .vchat-inbox-shell .vchat-composer{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 78px!important;
    align-items:end!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  #vchat-frontend-app.vchat-frontend-app .vchat-inbox-shell .vchat-composer textarea{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  #vchat-frontend-app.vchat-frontend-app .vchat-inbox-shell #vchat-send-message{
    position:static!important;
    inset:auto!important;
    transform:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 78px!important;
    width:78px!important;
    min-width:78px!important;
    max-width:78px!important;
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    margin:0!important;
    padding:0 12px!important;
    border:0!important;
    border-radius:14px!important;
    background:linear-gradient(135deg,#7257ef,#586df0)!important;
    color:#fff!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    pointer-events:auto!important;
    cursor:pointer!important;
  }

  #vchat-frontend-app.vchat-frontend-app .vchat-inbox-shell #vchat-send-message .vchat-send-label{
    display:block!important;
    max-width:100%!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:850!important;
    line-height:1!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  #vchat-frontend-app.vchat-frontend-app .vchat-inbox-shell #vchat-send-message .vchat-send-icon{
    display:none!important;
  }
}
