/* Login page layout: anchors sign-in card to artwork white space */
.login-page {
  background: #353535;
  min-height: 90vh;
}

.login-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.login-stage__img {
  display: block;
  width: 100%;
  height: auto; /* Maintains intrinsic ratio for percentage alignment */
}

/* Desktop: card sits in the white block at the image's top-right */
.login-stage .login-card {
  position: absolute;
  top: 4%;
  right: 2.5%;
  float: none;
  margin: 0;
  width: 20%;
  min-width: 210px;
  box-sizing: border-box;
}

/* Narrow: white space is too small, stack the card above the artwork */
@media (max-width: 1000px) {
  .login-stage {
    display: flex;
    flex-direction: column;
  }

  .login-stage .login-card {
    position: static;
    order: -1;
    width: min(320px, calc(100% - 32px));
    min-width: 0;
    margin: 16px auto;
  }
}

/* =============================================================================
   DESKTOP LOGIN VIEWPORT FIT
   Constrain header, artwork, and footer within browser viewport on laptop/desktop
   displays without disabling vertical scrolling on mobile/narrow layouts.
   ============================================================================= */

/* Remove inline baseline gap beneath the login stage image */
.login-stage__img {
  display: block;
}

/* On desktop and laptop screens (1024px+), constrain page height to 100dvh
   and scale the artwork image to fit remaining vertical space */
@media (min-width: 1024px) {
  html,
  body {
    height: 100%;
  }

  body {
    margin: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .login-page {
    min-height: 0;
    overflow: hidden;
  }

  .login-stage {
    height: 100%;
    min-height: 0;
    background: #ffffff;
  }

  .login-stage__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left top;
  }
}

/* Google OAuth Button Alignment */
.google-signin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 15px;
}
