/* Mobile auth modal: the login/register/forgot form must behave as a true full-screen view,
   not as a rounded bottom sheet. Imported after global card overrides to win the cascade. */
@media (max-width: 640px) {
  .app-modal:has(.auth-modal__content) {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: hidden !important;
  }

  .auth-modal__dialog {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .auth-modal__content {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .auth-modal__card {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(40px + env(safe-area-inset-top, 0px)) 24px calc(32px + env(safe-area-inset-bottom, 0px)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .auth-modal__dialog .app-modal__close {
    top: calc(16px + env(safe-area-inset-top, 0px)) !important;
    right: 16px !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}
