#loader-template {
  position: fixed;
  inset-block-start: 0;
  inset-block-end: 0;
  width: 100vw;
  height: 100vh;
  /* An overlay that does not paint is not an overlay: the destination app mounts
     its own loader behind this one while it boots, and a transparent layer shows
     both loaders at the same time. Same value as body, so handing over is not a
     visible change of background. .login-page paints its gradient over this. */
  background: var(--background);
  /* Above every app's chrome: launchpad's sidenav reaches 2100 and the highest
     z-index across the apps is 10001. Below that the sidebar mounts on top of the
     boot overlay and the user sees both at once. */
  z-index: 100000;
}

.login-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  position: relative;
  background: linear-gradient(180deg, #e5f5ff 0%, #ffefe9 100%);
}

/* BACKGROUND BALLS */
.login-page::before {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  translate: calc(-50% * var(--x-direction, 1)) -50%;
  width: 343px;
  height: 224px;
  flex-shrink: 0;
  border-radius: 343px;
  background: #ff5f1f;
  filter: blur(150px);
}

.login-page::after {
  content: "";
  position: absolute;
  width: 426px;
  height: 242px;
  inset-block-start: 50%;
  translate: calc(40% * var(--x-direction, 1)) -50%;
  flex-shrink: 0;
  border-radius: 426px;
  background: #005c99;
  filter: blur(150px);
}

@-moz-document url-prefix() {
  .login-page::before,
  .login-page::after {
    opacity: 0.5;
  }
}

.login-page__header {
  position: absolute;
  inset-block-start: 32px;
  text-align: center;
  display: flex;
  align-items: center;
}

.login-page__header .logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* WHITE CONTAINER */
.login-page__container {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  width: 544px;
  z-index: 1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0px 8px 22px 0px rgba(41, 45, 51, 0.15);
  overflow: hidden;
  transition: all 300ms ease-out;
}

.login-page__inner {
  position: relative;
  padding: 32px;
  width: 544px;
}

.login-page__container .content {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: all 300ms ease-out;
}

.login-page__container .content.is-loading {
  min-height: 404px;
  height: 100%;
}

.login-page__container .content.is-loading .body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* PAGE FOOTER */
.login-page__footer {
  position: absolute;
  inset-block-end: 32px;
  width: 100%;
}

.login-page__footer .mercans-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.mercans-footer .copyright {
  font-size: 12px;
  letter-spacing: 0px;
  color: #858585;
  text-align: center;
}

.mercans-footer .resources {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.mercans-footer .rss-link {
  padding-block: 0px;
  padding-inline: 5px;
  font-size: 12px;
}

.mercans-footer .resources .link_separator {
  height: 15px;
  width: 1px;
  background-color: #ff5f1f;
}

.mercans-footer .resources .rss-link {
  border: none !important;
}

.mercans-footer a {
  color: #ff5f1f;
  text-decoration: underline;
  cursor: pointer;
}

.loader-s {
  position: relative;
  border-radius: 50%;
  flex-shrink: 0;

  > * {
    box-sizing: border-box;
  }
}

.loader-s__spinner {
  height: 100%;
  width: 100%;
  border-radius: 50%;
  border-inline-end: 4px solid transparent;
  border-block-start: 4px solid #001738;
  border-inline-start: 4px solid #001738;
  border-block-end: 4px solid #001738;
  animation: rotateSpinner 1.4s infinite;
}

.loader-s__spinner--big {
  border-inline-end: 7px solid transparent;
  border-block-start: 7px solid #001738;
  border-inline-start: 7px solid #001738;
  border-block-end: 7px solid #001738;
}

[data-theme="hrb-dark"] .login-page {
  background: linear-gradient(
    180deg,
    #2f343d 0%,
    #262b33 18%,
    #1d2229 42%,
    #171b21 68%,
    #101319 100%
  );
}

[data-theme="hrb-dark"] .login-page::before {
  display: none;
}

[data-theme="hrb-dark"] .login-page::after {
  display: none;
}

[data-theme="hrb-dark"] .login-page__container {
  background: #0f1115;
  box-shadow: 0px 8px 22px 0px rgba(15, 17, 21, 0.15);
}

[data-theme="hrb-dark"] .loader-s__spinner,
[data-theme="hrb-dark"] .loader-s__spinner--big {
  border-block-start-color: #f2f2f3;
  border-inline-start-color: #f2f2f3;
  border-block-end-color: #f2f2f3;
}

[data-theme="hrb-dark"] .mercans-footer .copyright {
  color: #747a85;
}

[data-theme="hrb-dark"] .mercans-footer .resources .link_separator {
  background-color: #747a85;
}

[data-theme="hrb-dark"] .mercans-footer a {
  color: #f2f2f3;
}

@keyframes rotateSpinner {
  from {
    rotate: calc(0 * var(--x-direction, 1));
  }

  to {
    rotate: calc(360deg * var(--x-direction, 1));
  }
}

/* LANGUAGE CONTROL
   Static copy of loginpad's LoginLocale in its closed state, so the top-right
   control does not disappear when loginpad hands over to the boot overlay. It is
   deliberately inert - this is a loading screen - and the dropdown is omitted.
   Every rule is scoped to #loader-template: loader.css is a global stylesheet in
   the document head, and the apps render their own .locale-changer (ProfileMenu),
   which these rules would otherwise reposition. */
#loader-template .locale-changer {
  position: absolute;
  inset-block-start: var(--spacing-05);
  inset-inline-end: var(--spacing-04);
  box-shadow: var(--shadow-large);
  border-radius: 14px;
  z-index: 2;
}

#loader-template .locale-changer__select {
  all: unset;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--background-layer-00);
  width: 100%;
  padding-block: 0;
  padding-inline: var(--spacing-03);
  border-radius: 14px;
  min-height: var(--spacing-07);
  min-width: 104px;
  box-sizing: border-box;
}

#loader-template .locale-changer__select-text {
  display: flex;
  align-items: center;
  column-gap: var(--spacing-02);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--component-secondary-02);
}

#loader-template .locale-changer__chevron-wrapper {
  display: grid;
  place-items: center;
}
