/* Compiled from login-mobile.scss — mobile responsiveness overrides for the login page.
   Additive only; does not modify login.css. */

/* Ensure the gradient background covers the whole page on mobile,
   and no element can push horizontal scroll. */
@media (max-width: 768px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
  .login_page_new_ui img,
  .login_page_new_ui svg {
    max-width: 100%;
    height: auto;
  }
  /* Final safety net: no descendant of the login page can exceed the
     login container width on mobile. Targeted to the page only so we
     don't affect anything else. */
  .login_page_new_ui,
  .login_page_new_ui * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Tablet / small laptop */
@media (max-width: 1024px) {
  .login_page_new_ui .left .ls-logo {
    width: 320px !important;
    height: auto !important;
    max-width: 100%;
  }
  .login_page_new_ui .left h2 {
    font-size: 22px;
    line-height: 28px;
    padding: 0 24px;
  }
  .login_page_new_ui .left h3 {
    font-size: 15px;
    line-height: 22px;
    padding: 0 24px;
  }
  .login_page_new_ui .left .by {
    bottom: 32px;
    left: 32px;
  }
  .login_page_new_ui .tips {
    margin: 12vh 32px 0 32px;
  }
}

/* Tablet portrait — stack columns */
@media (max-width: 768px) {
  .login_page_new_ui {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .login_page_new_ui .left {
    flex: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 40px 16px 24px;
    box-sizing: border-box;
  }
  .login_page_new_ui .left .ls-logo {
    width: 220px !important;
    height: auto !important;
    max-width: 100%;
  }
  .login_page_new_ui .left h2 {
    font-size: 20px;
    line-height: 26px;
  }
  .login_page_new_ui .left h3 {
    font-size: 14px;
    line-height: 20px;
    margin-top: 6px;
  }
  .login_page_new_ui .left .by {
    position: static;
    align-items: center;
    text-align: center;
    margin-top: 16px;
    line-height: 20px;
  }
  .login_page_new_ui .right {
    flex: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 0 16px 40px;
    box-sizing: border-box;
  }
  .login_page_new_ui .tips {
    max-width: 100%;
    margin: 16px;
    padding: 14px;
    box-sizing: border-box;
  }
  .login_page_new_ui .toggle {
    width: 100%;
    box-sizing: border-box;
  }
  .login_page_new_ui .toggle > * {
    font-size: 0.9375rem;
    padding: 0.625rem 0;
  }
  .form-wrapper {
    width: 100% !important;
    max-width: 22rem;
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-sizing: border-box;
  }
  .form-wrapper h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .auto-generated form input {
    height: 42px;
    min-height: 42px;
    font-size: 0.9375rem;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .login_page_new_ui form {
    grid-gap: 0.75rem;
    width: 100%;
  }
  .login_page_new_ui form input,
  .login_page_new_ui form select {
    padding: 12px 14px;
    font-size: 0.9375rem;
    box-sizing: border-box;
    max-width: 100%;
  }
  .login_page_new_ui form button {
    padding: 12px 0;
    font-size: 0.9375rem;
    box-sizing: border-box;
    max-width: 100%;
  }
  .text-wrapper {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
    padding: 0 16px;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .login_page_new_ui .left {
    padding: 28px 12px 16px;
  }
  .login_page_new_ui .left .ls-logo {
    width: 170px !important;
    height: auto !important;
    max-width: 100%;
  }
  .login_page_new_ui .left h2 {
    font-size: 18px;
    line-height: 24px;
  }
  .login_page_new_ui .left h3 {
    font-size: 13px;
    line-height: 18px;
  }
  .login_page_new_ui .right {
    padding: 0 12px 28px;
  }
  .login_page_new_ui .toggle > * {
    font-size: 0.875rem;
  }
  .form-wrapper {
    max-width: 100%;
    padding: 1.25rem;
    border-radius: 0.625rem;
    box-shadow: 0 0 8px rgba(23, 20, 13, 0.12);
  }
  .form-wrapper h2 {
    font-size: 1.375rem;
  }
  .auto-generated form input {
    height: 40px;
    min-height: 40px;
    font-size: 0.875rem;
  }
  .login_page_new_ui form input,
  .login_page_new_ui form select {
    padding: 11px 12px;
    font-size: 0.875rem;
  }
  .login_page_new_ui form button {
    padding: 11px 0;
    font-size: 0.875rem;
  }
  .text-wrapper {
    font-size: 0.8125rem;
    gap: 3px;
  }
  .input-wrapper label,
  label {
    font-size: 0.8rem !important;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .login_page_new_ui .left .ls-logo {
    width: 140px !important;
    height: auto !important;
    max-width: 100%;
  }
  .login_page_new_ui .left h2 {
    font-size: 16px;
    line-height: 22px;
  }
  .login_page_new_ui .left h3 {
    font-size: 12px;
  }
  .form-wrapper {
    padding: 1rem;
  }
  .form-wrapper h2 {
    font-size: 1.25rem;
  }
}

/* Landscape phones — keep the stacked layout breathable */
@media (max-height: 480px) and (orientation: landscape) and (max-width: 900px) {
  .login_page_new_ui {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  .login_page_new_ui .left {
    padding: 16px;
  }
  .login_page_new_ui .left .ls-logo {
    width: 140px !important;
    height: auto !important;
    max-width: 100%;
  }
  .login_page_new_ui .left h2 {
    font-size: 16px;
    line-height: 20px;
  }
  .login_page_new_ui .left h3 {
    font-size: 12px;
    line-height: 16px;
  }
  .login_page_new_ui .left .by {
    position: static;
    margin-top: 8px;
  }
  .login_page_new_ui .right {
    padding: 0 16px 16px;
  }
  .form-wrapper {
    margin-top: 0.75rem;
    padding: 1.25rem;
  }
}
