body,
html {
  height: 100%;
  --main-panel-max-width: 450px;
}

.auth-container {
  align-content: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.auth-container footer,
.auth-container header,
.auth-container main {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.auth-container main {
  margin-bottom: 32px;
  margin-top: 32px;
}

@media (min-height: 768px) {
  .auth-container:after,
  .auth-container:before {
    content: " ";
  }
}

.school-logo-svg {
  min-height: 50px;
  min-width: 50%;
}

.school-organization {
  font-weight: 700;
  line-height: 1.2;
  padding: 16px;
}

.school-domain {
  font-size: 18px;
}

.logo-iserv {
  display: block;
  margin: 0 auto 15px;
  position: relative;
  right: 16px;
  width: 135px;
}

body {
  background: var(--body-bg-secondary);
  color: var(--text-color);
}

.iserv-loading-indicator {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  margin-top: 64px;
}

body.body-embedded {
  height: auto;
  padding: 0;
}

.body-embedded .login-actions {
  display: flex;
  justify-content: space-between;
}

.body-embedded p {
  margin-top: 0;
}

.login-buttons-container {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--main-panel-max-width);
}

.login-buttons-container a {
  white-space: normal;
}

.or-container {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  margin-top: 8px;
  max-width: var(--main-panel-max-width);
  width: 100%;
}

.hr-container {
  flex: 1;
  margin: 0 8px;
}

.main-panel > .panel-footer {
  align-items: center;
  background-color: var(--body-bg-secondary);
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  padding: 12px;
}

.login-button:disabled > .login-icon-bracket,
.login-button:enabled > .login-icon-spin {
  display: none;
}

button {
  background-color: transparent;
  border: 0;
}

#pw-invisible,
#pw-visible {
  display: block;
  width: 17.5px;
}

.form-control-feedback {
  right: 42px;
}

.has-feedback .form-control {
  border-width: 1px;
}

.input-group-addon {
  border-left: 0;
  border-radius: 2px;
}

.column {
  display: flex;
  flex-direction: column;
}

.bootstrap-button-icon,
.bootstrap-link-icon {
  margin-right: 6px;
}

#waiting-seconds {
  display: inline;
  font-family: monospace;
  margin: 1em 0;
  white-space: pre;
}

#form-username input[name="_username"] {
  text-transform: lowercase;
}

#form-username input[name="_username"]::placeholder {
  text-transform: none;
}

body, body.light-theme {
    --lightness: 70%;
}

body.dark-theme {
    --lightness: 25%;
}

@media (prefers-color-scheme: dark) {
  body, body.dark-theme {
    --lightness: 25%;
  }

  body.light-theme {
    --lightness: 70%;
  }
}

.dynamic-color-overlay {
    background: hsl(from #00437A h s var(--lightness));
}

body picture.dark,
body.light-theme picture.dark {
  display: none;
}

body picture.light,
body.dark-theme picture.dark,
body.light-theme picture.light {
  display: flex;
}

body.dark-theme picture.light {
  display: none;
}

@media (prefers-color-scheme: dark) {
  body,
  body.dark-theme {
    --brand-dots-overwrite: #fff;
  }

  body picture.dark,
  body.dark-theme picture.dark {
    display: flex;
  }

  body picture.light,
  body.dark-theme picture.light {
    display: none;
  }

  body.light-theme {
    --brand-dots-overwrite: unset;
  }

  body.light-theme picture.dark {
    display: none;
  }

  body.light-theme picture.light {
    display: flex;
  }
}

aside {
  height: 100%;
  position: relative;
  width: 66.6666%;
}

@media (orientation: portrait) {
  aside {
    height: 20%;
    top: 0;
    width: 100%;
  }
}

@media (max-aspect-ratio: 3/2) and (orientation: landscape) {
  aside {
    width: 50%;
  }
}

@media (resolution > 1.5dppx) and (orientation: landscape) {
  aside {
    width: 50%;
  }
}

aside .background-logo {
  filter: blur(2px);
  height: 100%;
  object-fit: cover;
  width: 100%;
}

aside .color-overlay {
  left: 0;
  opacity: .9;
  z-index: 2;
}

aside .color-overlay,
aside header {
  height: 100%;
  position: absolute;
  top: 0;
  width: 100%;
}

aside header {
  align-items: center;
  display: flex;
  justify-content: center;
  z-index: 3;
}

aside header .logo-desktop,
aside header .logo-mobile {
  height: fit-content;
  justify-content: center;
  margin: auto;
  max-height: 60%;
  max-width: 60%;
  width: fit-content;
}

@media (orientation: portrait) {
  aside header .logo-desktop,
  aside header .logo-mobile {
    max-height: 80%;
    max-width: fit-content;
  }

  aside header .logo-mobile {
    display: flex;
  }

  aside header .logo-desktop {
    display: none;
  }
}

@media (orientation: landscape) {
  aside header .logo-mobile {
    display: none;
  }

  aside header .logo-desktop {
    display: flex;
  }
}

aside header .school-logo {
  height: auto;
  margin: auto;
  max-height: 100%;
  max-width: 100%;
  width: auto;
}

aside header img[src$=".svg"] {
  height: var(--max-logo-height, auto);
  width: var(--max-logo-width, auto);
}

aside header .logo-text {
  font-size: clamp(3rem, 5vw, 10rem);
  font-weight: 700;
  justify-content: center;
  word-wrap: break-word;
  color: var(--body-color-default);
}

aside header .logo-text,
main {
  display: flex;
  flex-direction: column;
  height: 100%;
}

main {
  align-items: center;
  background-color: var(--body-bg-secondary);
  gap: 32px;
  padding: 32px 64px;
  position: absolute;
  right: 0;
  top: 0;
  width: 33.3333%;
  z-index: 4;
}

@media (orientation: landscape) {
  main {
    overflow-y: auto;
  }
}

@media (orientation: portrait) {
  main {
    height: 80%;
    padding: 16px 32px;
    top: 20%;
    width: 100%;
  }
}

@media (max-aspect-ratio: 3/2) and (orientation: landscape) {
  main {
    padding: 32px;
    width: 50%;
  }
}

@media (resolution > 1.5dppx) and (orientation: landscape) {
  main {
    padding: 8px;
    width: 50%;
  }
}

main picture {
  justify-content: center;
}

main picture .avatar {
  max-width: 100%;
}

main picture img {
  max-width: 75%;
}

@media (orientation: portrait) and (max-width: 640px) {
  main picture img {
    max-width: 50%;
  }
}

main .main-content {
  align-items: center;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 10%;
  width: 100%;
}

main .main-content > :first-child {
  margin-top: auto;
}

main .main-content > :last-child {
  margin-bottom: auto;
}

main .main-content.full-width {
  max-width: 100%;
  padding: 0;
}

@media (orientation: portrait) {
  main .main-content {
    max-width: 60%;
    padding: 0;
  }
}

@media (orientation: portrait) and (max-width: 640px) {
  main .main-content {
    max-width: 100%;
  }
}

main .main-content .login-logo-iserv {
  margin-bottom: 10%;
}

main .main-content .main-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

main .main-content .main-heading .help-link {
  font-size: 14px;
  line-height: 20px;
}

main .main-content .main-heading .badge {
  align-items: center;
  display: flex;
}

main .main-content .main-heading .badge > span {
  text-align: left;
  vertical-align: unset;
  white-space: break-spaces;
}

main .main-content .main-panel {
  width: 100%;
}

main .main-content .main-panel.compact {
  max-width: var(--main-panel-max-width);
}

main .main-content #form-otp .form-group {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
  width: auto;
}

main .main-content #form-otp .otp-input {
  flex: 0 0 auto;
  font-size: 20px;
  height: 5rem;
  text-align: center;
  width: 5rem;
}

@media (max-width: 420px) {
  main .main-content #form-otp .otp-input {
    height: 3.5rem;
    width: 3.5rem;
  }
}

main .main-content #form-otp .form-action-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-bottom: 0;
}

main footer {
  flex-direction: column;
  text-align: center;
}

main footer,
main footer .legal-group {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-bottom: 8px;
}

main footer .legal-group .legal-notice {
  text-align: right;
}

main footer .legal-group .brand-dots {
  display: flex;
}

@media (max-width: 310px) {
  main footer .legal-group .brand-dots {
    flex-direction: column;
  }
}

main footer .legal-group .brand-dots > span {
  font-size: 8px;
  line-height: 10px;
  margin: 0 2px;
}

main footer .legal-group .brand-dots > span:first-child {
  color: var(--brand-dots-overwrite, #faba00);
}

main footer .legal-group .brand-dots > span:nth-child(2) {
  animation-delay: .1s;
  color: var(--brand-dots-overwrite, #7296c8);
}

main footer .legal-group .brand-dots > span:last-child {
  animation-delay: .2s;
  color: var(--brand-dots-overwrite, #00447c);
}

.device-ipad aside {
  height: 20%;
  top: 0;
  width: 100%;
}

.device-ipad aside header .logo-desktop,
.device-ipad aside header .logo-mobile {
  max-height: 80%;
  max-width: fit-content;
}

.device-ipad aside header .logo-mobile {
  display: flex;
}

.device-ipad aside header .logo-desktop {
  display: none;
}

.device-ipad main {
  height: 80%;
  padding: 16px 32px;
  top: 20%;
  width: 100%;
}

.device-ipad main picture img {
  max-width: 75%;
}

@media (max-width: 640px) {
  .device-ipad main picture img {
    max-width: 50%;
  }
}

.device-ipad main .main-content {
  max-width: 60%;
  padding: 0;
}