body.login-modal-open {
  overflow: hidden !important;
}

body.login-modal-open #page-login.auth-page {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
  display: grid !important;
  width: 100% !important;
  min-height: 100svh !important;
  place-items: center !important;
  overflow: hidden !important;
  background: transparent !important;
  animation: login-modal-fade-in .24s ease both;
}

#page-login .login-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, .52) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  cursor: default;
}

#page-login .auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 0;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

#page-login .auth-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100svh - 48px);
  overflow: auto;
  border-color: rgba(255, 255, 255, .82) !important;
  background: #fff !important;
  opacity: 1 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  pointer-events: auto;
  animation: login-card-enter .32s cubic-bezier(.22, .61, .36, 1) both;
}

#page-login .login-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #666;
  background: #f3f3f3;
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

#page-login .login-modal-close:hover {
  color: #fff;
  background: #eb5518;
  transform: rotate(4deg);
}

#page-login .login-modal-close:focus-visible {
  outline: 3px solid rgba(235, 85, 24, .24);
  outline-offset: 3px;
}

@keyframes login-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes login-card-enter {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 680px) {
  #page-login .auth-shell { padding: 16px; }
  #page-login .auth-card {
    width: min(100%, 460px);
    max-height: calc(100svh - 32px);
    padding-top: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.login-modal-open #page-login.auth-page,
  #page-login .auth-card { animation: none; }
  #page-login .login-modal-close { transition: none; }
}
