/*
 * RELOOP Account Center | login viewport fit.
 * Only the signed-out login view is changed. Workspace, pricing,
 * product picker and auth actions keep their original layouts/logic.
 *
 * The previous account frame had a fixed 748px height and a separately
 * scrolling .auth-view; legal copy was clipped on 768–900px tall laptops.
 */
@media (min-width:901px){
  body[data-account-view="signedOutState"]{
    display:flex;
    flex-direction:column;
    min-height:100dvh;
    overflow-y:auto;
  }

  body[data-account-view="signedOutState"] > main{
    flex:1 0 auto;
    min-height:0;
    padding:clamp(11px,2vh,20px) clamp(18px,3vw,40px) 8px;
    align-items:center;
    justify-content:center;
  }

  /* The frame grows with its content instead of forcing an inner scroller. */
  body[data-account-view="signedOutState"] #accountFrame.auth-shell{
    height:auto;
    min-height:min(652px,calc(100dvh - 104px));
    max-height:none;
    overflow:hidden;
    align-items:stretch;
  }

  body[data-account-view="signedOutState"] .auth-form-panel{
    padding:clamp(18px,2.8vh,25px) clamp(20px,2.6vw,29px) 20px 8px;
    justify-content:center;
  }

  body[data-account-view="signedOutState"] #signedOutState.auth-view{
    overflow:visible;
    flex:0 0 auto;
    min-height:0;
    padding:0 4px 2px 0;
    scrollbar-width:auto;
  }

  body[data-account-view="signedOutState"] .auth-brand-row{
    margin-bottom:clamp(12px,2.3vh,19px);
  }
  body[data-account-view="signedOutState"] .reloop-product-back{
    margin-bottom:10px;
    min-height:35px;
  }
  body[data-account-view="signedOutState"] .auth-heading{
    margin-bottom:14px;
  }
  body[data-account-view="signedOutState"] .auth-overline{
    margin-bottom:5px;
  }
  body[data-account-view="signedOutState"] .auth-heading h1{
    line-height:1.28;
    margin-bottom:5px;
  }
  body[data-account-view="signedOutState"] .auth-heading p{
    line-height:1.65;
  }
  body[data-account-view="signedOutState"] .auth-google{
    height:46px;
    min-height:46px;
  }
  body[data-account-view="signedOutState"] .auth-divider{
    margin:13px 0;
  }
  body[data-account-view="signedOutState"] #accountLoginForm{
    gap:11px;
  }
  body[data-account-view="signedOutState"] #accountLoginForm label{
    margin-bottom:5px;
  }
  body[data-account-view="signedOutState"] #accountLoginForm .auth-input{
    height:45px;
  }
  body[data-account-view="signedOutState"] #accountLoginForm .auth-submit{
    min-height:46px;
  }
  body[data-account-view="signedOutState"] .auth-show-password{
    top:3px;
  }
  body[data-account-view="signedOutState"] .auth-switch{
    margin-top:13px;
    line-height:1.65;
  }
  body[data-account-view="signedOutState"] .auth-legal{
    margin-top:12px!important;
    line-height:1.7!important;
  }
  body[data-account-view="signedOutState"] > footer{
    flex:0 0 auto;
    padding:8px 12px 12px;
  }
}

/* Allow normal page scrolling on short or zoomed desktop viewports.
   Do not truncate errors, password recovery or legal content. */
@media (min-width:901px) and (max-height:720px){
  body[data-account-view="signedOutState"] > main{
    padding:12px 20px 8px;
    align-items:flex-start;
  }
  body[data-account-view="signedOutState"] #accountFrame.auth-shell{
    min-height:0;
  }
  body[data-account-view="signedOutState"] .auth-form-panel{
    padding-top:17px;
    padding-bottom:16px;
  }
  body[data-account-view="signedOutState"] .auth-brand-row{
    margin-bottom:12px;
  }
  body[data-account-view="signedOutState"] #signedOutState .auth-divider{
    margin:10px 0;
  }
}

/* Mobile retains its existing single-column view; avoid nested scroll
   when mobile browser chrome changes the visible viewport height. */
@media (max-width:900px){
  body[data-account-view="signedOutState"] #accountFrame.auth-shell{
    height:auto;
    min-height:0;
    max-height:none;
  }
  body[data-account-view="signedOutState"] #signedOutState.auth-view{
    overflow:visible;
    max-height:none;
  }
}
