/*
 * HarshAI AUTH UX LOCK
 * --------------------
 * Protected surface: #authGate / #auth-card / authentication controls.
 *
 * Do not modify these rules as part of normal workspace/chat UI changes.
 * If authentication UX must intentionally change, update this file deliberately.
 * It is loaded AFTER the scoped workspace visual layer so future workspace
 * changes cannot accidentally undo the auth viewport/scroll contract.
 */

#authGate.hidden{
  display:none!important;
}

#authGate{
  position:relative!important;
  min-height:100dvh!important;
  height:auto!important;
  width:100%!important;
  display:grid!important;
  place-items:center!important;
  align-content:center!important;
  padding:22px 22px 34px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable!important;
  -webkit-overflow-scrolling:touch!important;
}

#authGate .auth-card{
  position:relative!important;
  flex:0 0 auto!important;
  width:min(430px,100%)!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

#authGate .auth-card input,
#authGate .auth-card button{
  box-sizing:border-box!important;
  max-width:100%!important;
}

#authGate .auth-message{
  overflow-wrap:anywhere!important;
}

@media (max-height:760px), (max-width:760px){
  #authGate{
    place-items:start center!important;
    align-content:start!important;
    padding-top:18px!important;
    padding-bottom:36px!important;
  }

  #authGate .auth-card{
    margin-bottom:12px!important;
  }
}

@media (max-height:520px){
  #authGate{
    padding-top:12px!important;
    padding-bottom:24px!important;
  }

  #authGate .auth-card{
    padding-top:22px!important;
    padding-bottom:22px!important;
  }
}

/*
 * Auth page owns scrolling while visible.
 * The workspace remains viewport-locked after authentication.
 */
body:has(#authGate:not(.hidden)){
  overflow-x:hidden!important;
  overflow-y:auto!important;
}

body:has(#authGate.hidden){
  overflow:hidden!important;
}
