/*
 * SPBNU Roundcube – Stage 22.3.
 * Separate visual geometry for the official dark and light login logos.
 *
 * The original official PNG files are NOT transformed or replaced.
 * Only Roundcube Elastic's login-page #logo and #login-form are affected.
 * This replaces the incorrect shared geometry of Stage 22.1.
 */
html.dark-mode #layout-content #logo,
html.dark-mode #logo {
  -webkit-filter: none !important;
  filter: none !important;
}

/* Keep the native responsive layout on compact screens. */
@media screen and (min-width: 480px) and (min-height: 600px) {
  /* LIGHT: retain the existing colored logo size. */
  #layout-content #logo {
    height: 142px !important;
    max-height: 142px !important;
    width: auto !important;
    max-width: calc(100% - 32px) !important;
    object-fit: contain;
  }

  /* LIGHT: move the colored logo's form slightly closer. */
  #layout-content #login-form {
    margin-top: -20px !important;
  }

  /* DARK: the official white PNG fills more of its own image than the
     colored PNG. A smaller element height equalizes the *visible* size. */
  html.dark-mode #layout-content #logo {
    height: 118px !important;
    max-height: 118px !important;
  }

  /* DARK: match the *visible* logo-to-field gap measured from the two
     latest screenshots (dark ~10px vs light ~53px).
     Adjust only the dark login-form margin; logo sizes remain unchanged. */
  html.dark-mode #layout-content #login-form {
    margin-top: -5px !important;
  }
}
