@font-face {
  font-family: HelveticaNeue-Medium;
  src: url("../fonts_HelveticaNeue_HelveticaNeue-Medium.woff?v=0")
    format("woff");
}

@font-face {
  font-family: HelveticaNeue-Bold;
  src: url("../fonts/fonts_HelveticaNeue_HelveticaNeue-Bold.ttf?v=0");
}

@font-face {
  font-family: HelveticaNeue;
  src: url("../fonts/fonts_HelveticaNeue_HelveticaNeue.ttf?v=0");
}

@font-face {
  font-family: SFProText-Bold;
  src: url("../fonts/fonts_SFProText_SFProText-Bold.ttf?v=0");
}

@font-face {
  font-family: SFProText-Semibold;
  src: url("../fonts/fonts_SFProText_SFProText-Semibold.ttf?v=0");
}

@font-face {
  font-family: SFProText-Regular;
  src: url("../fonts/fonts_SFProText_SFProText-Regular.ttf?v=0");
}

@font-face {
  font-family: SFProText-Medium;
  src: url("../fonts/fonts_SFProText_SFProText-Medium.ttf?v=0");
}

* {
  font-family: var(--mos-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  --ac-theme-color-fixed-dark-rgb: 26,51,82;
  --ac-theme-color-primary-light: #a5b5c9;
  --ac-theme-color-shadow-weak: #e5e8ef;
  --ac-theme-color-text-normal: #445b77;
  --ac-theme-color-surface: #f8f9fa;
  --ac-theme-color-shadow-weak: #e5e8ef;
  --ac-theme-color-warning-light-5: #ff9d4e;
  --ac-theme-color-secondary-light: #e6e9ef;
  --ac-theme-color-info: #ff8f34;
  --ac-theme-color-shadow-normal: #c3cedb;
  --ac-theme-color-warning: #ff8f34;
  --ac-theme-color-warning-light-35: #fff1e7;
  --ac-theme-color-primary-mid: #5b799e;
  --ac-theme-color-primary-mid-light-40: #dbe2ea;
  --ac-theme-color-secondary-mid-dark-15: #9dafc4;
  --ac-theme-color-secondary-mid: #cdd6e1;
}

#SSOSection {
  display: none;
}

.SSOSection {
  display: none;
}

.hidden {
  display: none;
}

.invisible {
  visibility: hidden;
}

.BodyContainer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.LoginForm {
  overflow: hidden;
  height: 100%;
  background-color: var(--mos-color-canvas);
  display: flex;
  flex-direction: row;
}

/* --- Sidebar: Mosaic ----------------------------------------------------------
 * The press-kit navy (`--mos-color-on-primary`, #071837) with Mosaic's dark-theme ink on it
 * (values from mosaic src/tokens/color/dark.css @38cee57: the light tokens are dark ink, which
 * would vanish here). Icons are Mosaic's own, inlined by sidebar-icons.mjs. */

.LoginForm_sidebar {
  --mos-color-ink: #d5dfeb;
  --mos-color-ink-muted: #b0b8c1;
  --mos-color-ink-subtle: #979ea8;
  --mos-color-surface-3: #222227;
  box-sizing: border-box;
  overflow: hidden;
  width: 35%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mos-space-xl);
  padding: var(--mos-space-xl);
  background-color: var(--mos-color-on-primary);
  color: var(--mos-color-ink);
}

.ac-icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* Logo and content form one group, centred in the panel; the links sit at its foot. */
.LoginForm_sidebar_logo {
  margin-top: auto;
  margin-bottom: var(--mos-space-xl);
  width: 7.5rem; /* 120px */
  height: auto;
}

.LoginForm_sidebar_middle_section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mos-space-xxl);
  max-width: 26rem;
  margin-bottom: auto;
  text-align: center;
}

.LoginForm_sidebar_text {
  margin: 0;
  color: var(--mos-color-ink);
  font-size: var(--mos-text-lg-size);
  font-weight: var(--mos-weight-semibold);
  line-height: var(--mos-text-lg-leading);
}

.LoginForm_sidebar_text span {
  display: block;
}

/* Same step as the headline's "Enterprise grade"; the typed word in the brand orange, followed by
   a blinking caret. */
.LoginForm_sidebar_typing {
  margin: 0;
  color: var(--mos-color-ink);
  font-size: var(--mos-text-lg-size);
  font-weight: var(--mos-weight-semibold);
  line-height: var(--mos-text-lg-leading);
  white-space: nowrap;
}

.LoginForm_sidebar_typing_word {
  color: var(--mos-color-primary);
}

.LoginForm_sidebar_typing_word::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background-color: currentColor;
  animation: ac-caret 1s steps(1) infinite;
}

@keyframes ac-caret {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .LoginForm_sidebar_typing_word::after {
    display: none;
  }
}

.ac-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.LoginForm_sidebar_platforms {
  display: flex;
  align-items: center;
  gap: var(--mos-space-lg);
  color: var(--mos-color-ink-muted);
  font-size: 2rem; /* 32px: the glyphs are the row's content here, not inline marks */
}

.LoginForm_sidebar_social {
  display: flex;
  gap: var(--mos-space-xxs);
}

/* Mosaic IconButton, ghost, lg (44px); the glyph at Dialog's tone-icon size (20px) */
.LoginForm_sidebar_iconButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--mos-radius-pill);
  color: var(--mos-color-ink-muted);
  font-size: 1.25rem;
  transition: background-color var(--mos-duration-fast) var(--mos-ease-in-out);
}

.LoginForm_sidebar_iconButton:hover {
  background-color: var(--mos-color-surface-3);
  color: var(--mos-color-ink);
}

.LoginForm_sidebar_iconButton:focus-visible {
  outline: 2px solid var(--mos-color-ink-muted);
  outline-offset: -2px;
}

@media only screen and (max-width: 768px) {
  /* For mobile phones: the panel is a third of the width, so only the brand and links stay. */
  .LoginForm_sidebar {
    padding: var(--mos-space-lg) var(--mos-space-sm);
    align-items: center;
  }

  .LoginForm_sidebar_logo {
    width: 100%;
    max-width: 6rem;
    margin-bottom: auto;
  }

  .LoginForm_sidebar_middle_section {
    display: none;
  }

  .LoginForm_sidebar_social {
    flex-direction: column;
  }
}

/* --- Form side: Mosaic ------------------------------------------------------
 * Mosaic's own standards, as the dashboard uses them: default control size (sm, 28px), the quiet
 * primary button (orange label, no fill at rest), Field labels above Input, Link, Checkbox, and
 * the type scale as it is. Nothing here is a login-only size. */

.LoginForm_main {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
  /* `safe`: a page taller than the screen (TOTP setup) starts at the top instead of being
     centred past it, where the scroll could not reach. */
  justify-content: safe center;
  overflow-y: auto;
  box-sizing: border-box;
  padding-block: var(--mos-space-xl);
  position: relative;
  width: 65%;
  background-color: var(--mos-color-canvas);
  color: var(--mos-color-ink);
  font-size: var(--mos-text-md-size);
  line-height: var(--mos-text-md-leading);
}

.LoginForm_main_box,
#kc-error-message,
#kc-info-message,
.Login-idp-link-email-container,
#kc-totp-settings,
#kc-totp-settings-form {
  box-sizing: border-box;
  width: 100%;
  max-width: 22.5rem; /* 360px */
  padding-inline: var(--mos-space-lg);
}

@media only screen and (max-width: 480px) {
  .LoginForm_main_box,
  #kc-error-message,
  #kc-info-message,
  .Login-idp-link-email-container,
  #kc-totp-settings,
  #kc-totp-settings-form {
    padding-inline: var(--mos-space-md);
  }
}

form {
  min-width: 0;
  text-align: center;
}

form > section,
form > div {
  text-align: initial;
}

/* Navy, as before: the sidebar's icon links sit on the navy panel, where this keeps their
   underline invisible. Every text link on the form side sets its own colour below. */
a {
  color: #1a3352;
  font-family: inherit;
}

/* Title - the top of Mosaic's type scale */

.LoginForm_main_box_title {
  margin: 0 0 var(--mos-space-lg);
  font-size: var(--mos-text-lg-size);
  font-weight: var(--mos-weight-semibold);
  line-height: var(--mos-text-lg-leading);
  letter-spacing: var(--mos-text-lg-tracking);
  text-align: center;
  color: var(--mos-color-ink);
}

.LoginForm_main_box_title_social_login {
  margin: var(--mos-space-lg) 0 var(--mos-space-sm);
  font-size: var(--mos-text-md-size);
  font-weight: var(--mos-weight-medium);
  line-height: var(--mos-text-md-leading);
  letter-spacing: normal;
  color: var(--mos-color-ink-subtle);
}

/* Body text */

.acForm_title,
.instruction {
  margin: 0 0 var(--mos-space-lg);
  font-size: var(--mos-text-md-size);
  line-height: var(--mos-text-md-leading);
  text-align: center;
  color: var(--mos-color-ink-muted);
}

.instruction {
  color: var(--mos-color-ink);
}

.acForm_title b,
.instruction b {
  color: var(--mos-color-ink);
  font-weight: var(--mos-weight-medium);
}

.LoginForm_main_box_subtitle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: var(--mos-space-xxs);
  margin-top: var(--mos-space-md);
}

.LoginForm_main_box_subtitle-margin {
  margin-top: var(--mos-space-sm);
}

.LoginForm_main_box_subtitle_defination {
  font-size: var(--mos-text-sm-size);
  line-height: var(--mos-text-sm-leading);
  color: var(--mos-color-ink-muted);
  text-decoration: none;
}

.LoginForm_main_box_subtitle_defination_social_login {
  margin-top: 0;
  font-size: var(--mos-text-xs-size);
  line-height: var(--mos-text-xs-leading);
  color: var(--mos-color-ink-subtle);
  text-align: center;
}

.LoginForm_main_box_subtitle_defination-center-text {
  text-align: center;
}

/* Alert - Mosaic Alert (src/components/Alert @a366963), drawn by template.ftl's `alert` macro.
   The note inside keeps its own element and class, so its page-level text rules are reset here:
   inside an alert it is the note, left-aligned, at the alert's size. */

.ac-alert {
  display: flex;
  flex: 1 1 100%;
  align-items: flex-start;
  gap: var(--mos-space-sm);
  box-sizing: border-box;
  width: 100%;
  padding: var(--mos-space-sm) var(--mos-space-md);
  border: 1px solid var(--alert-border);
  border-radius: var(--mos-radius-md);
  background-color: var(--alert-fill);
  color: var(--mos-color-ink-muted);
  font-size: var(--mos-text-xs-size);
  line-height: var(--mos-text-xs-leading);
  text-align: left;
}

.ac-alert--info {
  --alert-fill: var(--mos-color-surface-1);
  --alert-border: var(--mos-color-hairline-strong);
  --alert-accent: var(--mos-color-ink-subtle);
  color: var(--mos-color-ink-subtle);
}

.ac-alert--success {
  --alert-fill: var(--mos-color-surface-3);
  --alert-border: var(--mos-color-success);
  --alert-accent: var(--mos-color-success);
}

.ac-alert--warning {
  --alert-fill: var(--mos-color-surface-3);
  --alert-border: var(--mos-color-warning);
  --alert-accent: var(--mos-color-warning);
}

.ac-alert--danger {
  --alert-fill: var(--mos-color-surface-3);
  --alert-border: var(--mos-color-danger);
  --alert-accent: var(--mos-color-danger);
}

.ac-alert_icon {
  display: inline-flex;
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  color: var(--alert-accent);
}

.ac-alert_icon .ac-icon {
  width: 100%;
  height: 100%;
}

.ac-alert_body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--mos-space-xxs);
  min-width: 0;
  overflow-wrap: anywhere;
}

.ac-alert_title {
  margin: 0;
  color: var(--mos-color-ink);
  font-size: var(--mos-text-md-size);
  font-weight: var(--mos-weight-medium);
  line-height: var(--mos-text-md-leading);
}

.ac-alert--info .ac-alert_title {
  color: var(--mos-color-ink-subtle);
}

/* Mosaic's tone prefix: the tone is not carried by colour alone. */
.ac-alert_toneLabel {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ac-alert_content > * {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: inherit;
}

.ac-alert_content > * + * {
  margin-top: var(--mos-space-xs);
}

.ac-alert_content .instruction a {
  font-size: inherit;
}

/* An alert that opens the page (info, error, link by email) keeps the gap to the action under it. */
#kc-info-message > .ac-alert,
#kc-error-message > .ac-alert {
  margin-bottom: var(--mos-space-lg);
}

/* Links - Mosaic Link, underline on hover */

.LoginForm_main_box_subtitle_link,
.LoginForm_formTools_forgot,
.LoginForm_formTools_signup,
.LoginForm_formFooter_back,
.instruction a,
#kc-totp-settings a {
  margin: 0;
  border-radius: var(--mos-radius-xs);
  color: var(--mos-color-link);
  font-size: var(--mos-text-sm-size);
  letter-spacing: normal;
  text-decoration: none;
  text-underline-offset: 0.15em;
  cursor: pointer;
  transition: color var(--mos-duration-fast) var(--mos-ease-in-out);
}

.LoginForm_main_box_subtitle_link:hover,
.LoginForm_formTools_forgot:hover,
.LoginForm_formTools_signup:hover,
.LoginForm_formFooter_back:hover,
.instruction a:hover,
#kc-totp-settings a:hover {
  color: var(--mos-color-link-hover);
  text-decoration: underline;
}

.LoginForm_main_box_subtitle_link:focus-visible,
.LoginForm_formTools_forgot:focus-visible,
.LoginForm_formTools_signup:focus-visible,
.LoginForm_formFooter_back:focus-visible,
.instruction a:focus-visible,
#kc-totp-settings a:focus-visible {
  outline: 2px solid var(--mos-color-ink-muted);
  outline-offset: 2px;
}

.LoginForm_main_box_subtitle_link_grey_underline {
  color: var(--mos-color-ink-subtle);
  font-size: inherit;
  text-decoration: underline;
}

.LoginForm_main_box_subtitle_hiddenLink {
  color: var(--mos-color-ink);
  text-decoration: none;
  cursor: pointer;
}

.LoginForm_main_box_subtitle_hiddenLink:hover {
  text-decoration: underline;
}

/* Fields - Mosaic Field + Input (sm) */

.LoginForm_main_box_inputs {
  display: flex;
  flex-direction: column;
  gap: var(--mos-space-md);
  padding: 0;
}

.LoginForm_main_box_inputs_signup {
  margin-top: 0;
}

.LoginForm_main_box_input {
  /* The eye button is placed against this box, and passwordHelper.js finds it through
     `.closest('.LoginForm_main_box_input')`. */
  position: relative;
  width: 100%;
}

.LoginForm_main_box_input label {
  display: flex;
  flex-direction: column;
  gap: var(--mos-space-xs);
}

.LoginForm_main_box_input .placeholder {
  order: -1;
  align-self: flex-start;
  margin-block-end: calc(var(--mos-space-xxs) - var(--mos-space-xs));
  color: var(--mos-color-ink-subtle);
  font-size: var(--mos-text-md-size);
  font-weight: var(--mos-weight-medium);
  line-height: var(--mos-text-md-leading);
  cursor: pointer;
}

.LoginForm_main_box_input input,
.LoginForm_main_box_input textarea,
.Login_otp_deviceSelector select {
  box-sizing: border-box;
  width: 100%;
  height: 1.75rem; /* 28px - Mosaic Input sm */
  margin: 0;
  padding: 0 var(--mos-space-xs);
  border: 1px solid var(--mos-color-hairline-tertiary);
  border-radius: var(--mos-radius-md);
  background-color: var(--mos-color-canvas);
  color: var(--mos-color-ink);
  font-family: var(--mos-font-sans);
  font-size: var(--mos-text-sm-size);
  line-height: 1;
  outline: none;
  transition: border-color var(--mos-duration-fast) var(--mos-ease-in-out);
}

.LoginForm_main_box_input textarea {
  height: auto;
  min-height: 4rem;
  padding-block: var(--mos-space-xs);
  line-height: var(--mos-text-sm-leading);
}

.LoginForm_main_box_input input:hover,
.LoginForm_main_box_input textarea:hover,
.Login_otp_deviceSelector select:hover {
  border-color: var(--mos-color-ink-subtle);
}

.LoginForm_main_box_input input:focus,
.LoginForm_main_box_input textarea:focus,
.Login_otp_deviceSelector select:focus {
  border-color: var(--mos-color-ink-muted);
  outline: 1px solid var(--mos-color-ink-muted);
  outline-offset: -1px;
}

/* Mosaic Input `.invalid`: submitGuard.js marks a field that stopped the submit. Doubled so the
   focus ring cannot paint over the red edge. */
.LoginForm_main_box_input input[aria-invalid="true"],
.LoginForm_main_box_input input[aria-invalid="true"][aria-invalid="true"]:focus {
  border-color: var(--mos-color-danger);
  outline-color: var(--mos-color-danger);
}

.LoginForm_main_box_input:has(.password-toggle) input {
  padding-right: calc(1.5rem + var(--mos-space-xxs));
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--mos-color-canvas) inset !important;
  -webkit-text-fill-color: var(--mos-color-ink);
}

/* Password visibility toggle - a ghost icon button in the input's end */

.password-toggle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: var(--mos-radius-sm);
  background: none;
  cursor: pointer;
  outline: none;
  opacity: 0.6;
  transition:
    opacity var(--mos-duration-fast) var(--mos-ease-in-out),
    background-color var(--mos-duration-fast) var(--mos-ease-in-out);
}

.password-toggle:hover {
  opacity: 1;
  background-color: var(--mos-color-surface-3);
}

.password-toggle:focus-visible {
  opacity: 1;
  outline: 2px solid var(--mos-color-ink-muted);
  outline-offset: -2px;
}

.password-toggle img {
  display: block;
  width: 14px;
  height: 14px;
}

/* Checkbox - Mosaic Checkbox */

.LoginForm_main_box_checkbox {
  padding: 0;
}

.LoginForm_main_box_checkbox label {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--mos-space-sm);
  cursor: pointer;
  user-select: none;
}

.LoginForm_main_box_checkbox input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.LoginForm_checkbox_box {
  flex: 0 0 auto;
  box-sizing: border-box;
  position: relative;
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.25rem;
  border: 1px solid var(--mos-color-hairline-strong);
  border-radius: var(--mos-radius-xs);
  background-color: var(--mos-color-surface-1);
  transition:
    background-color var(--mos-duration-fast) var(--mos-ease-in-out),
    border-color var(--mos-duration-fast) var(--mos-ease-in-out);
}

.LoginForm_main_box_checkbox label:hover .LoginForm_checkbox_box {
  border-color: var(--mos-color-ink-subtle);
}

.LoginForm_main_box_checkbox input[type="checkbox"]:checked + .LoginForm_checkbox_box {
  border-color: var(--mos-color-ink);
}

.LoginForm_main_box_checkbox input[type="checkbox"]:checked + .LoginForm_checkbox_box::after {
  content: "";
  display: block;
  width: 0.1875rem;
  height: 0.40625rem;
  margin: 0.03125rem auto 0;
  border: solid var(--mos-color-ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.LoginForm_main_box_checkbox input[type="checkbox"]:focus-visible + .LoginForm_checkbox_box {
  outline: 2px solid var(--mos-color-ink-muted);
  outline-offset: 2px;
}

.LoginForm_checkbox_text {
  color: var(--mos-color-ink);
  font-size: var(--mos-text-sm-size);
  line-height: var(--mos-text-sm-leading);
}

.LoginForm_recaptcha {
  display: flex;
  justify-content: center;
}

/* Buttons - Mosaic Button (sm) at full width. The final action is `primary`: an orange label on
   Mosaic's hover tint even at rest (asked 2026-09-23, so it reads as the action), one surface
   step darker on hover, the orange fill only while pressed.
   `.LoginForm_button_inverted` and `.secondaryButton` are `secondary`. */

.LoginForm_button,
.Button,
button[type="submit" i],
input[type="submit" i] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mos-space-xs);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: auto;
  /* A floor, not a fixed height: between the sidebar's 35% and a narrow window a label can
     outgrow one line, and wrapping beats spilling out. */
  min-height: 1.75rem; /* 28px - Mosaic Button sm */
  margin: 0;
  padding: var(--mos-space-xxs) var(--mos-space-sm);
  border: 1px solid transparent;
  border-radius: var(--mos-radius-pill);
  background-color: var(--mos-color-surface-3);
  box-shadow: none;
  color: var(--mos-color-primary);
  font-family: var(--mos-font-sans);
  font-size: var(--mos-text-sm-size);
  font-weight: var(--mos-weight-medium);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--mos-duration-fast) var(--mos-ease-in-out),
    border-color var(--mos-duration-fast) var(--mos-ease-in-out),
    color var(--mos-duration-fast) var(--mos-ease-in-out);
}

.LoginForm_button:hover:not(:disabled),
.Button:hover:not(:disabled),
button[type="submit" i]:hover:not(:disabled),
input[type="submit" i]:hover:not(:disabled) {
  background-color: var(--mos-color-surface-4);
}

.LoginForm_button:active:not(:disabled),
.Button:active:not(:disabled),
button[type="submit" i]:active:not(:disabled),
input[type="submit" i]:active:not(:disabled) {
  border-color: var(--mos-color-primary);
  background-color: var(--mos-color-primary);
  color: var(--mos-color-on-primary);
}

.LoginForm_button:focus-visible,
.Button:focus-visible,
button[type="submit" i]:focus-visible,
input[type="submit" i]:focus-visible {
  outline: 2px solid var(--mos-color-ink-muted);
  outline-offset: -2px;
}

.LoginForm_button:disabled,
.Button:disabled,
button[type="submit" i]:disabled,
input[type="submit" i]:disabled {
  border-color: transparent;
  background-color: var(--mos-color-surface-4);
  color: var(--mos-color-ink-tertiary);
  cursor: not-allowed;
}

.LoginForm_button.LoginForm_button_inverted,
.Button.Button-inverted--true,
button.secondaryButton {
  border-color: var(--mos-color-hairline);
  background-color: var(--mos-color-surface-2);
  color: var(--mos-color-ink-muted);
}

.LoginForm_button.LoginForm_button_inverted:hover,
.Button.Button-inverted--true:hover,
button.secondaryButton:hover:not(:disabled) {
  border-color: var(--mos-color-hairline);
  background-color: var(--mos-color-surface-3);
}

.LoginForm_button.LoginForm_button_inverted:active,
.Button.Button-inverted--true:active,
button.secondaryButton:active:not(:disabled) {
  border-color: var(--mos-color-hairline);
  background-color: var(--mos-color-canvas);
  color: var(--mos-color-ink-muted);
}

.Button-disabled--true,
.Button-noAccess--true {
  opacity: 0.5;
  pointer-events: none;
}

/* A button wrapped in a link (sign up, back to application, the dialog footer) spans its row. */
a:has(> .LoginForm_button),
a:has(> .Button) {
  display: block;
  text-decoration: none;
}

.LoginForm_formFooter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mos-space-xs);
  margin-top: var(--mos-space-lg);
  text-align: center;
}

.LoginForm_formFooter_submit,
.LoginForm_formFooter_submit #kc-form-buttons {
  width: 100%;
}

/* A separator under the form's own action, between it and the other ways out: "Log in" and
   the sign-up / SSO / forgot-password buttons, SSO's "Continue" and "Back to login", reset's
   "Send" and "Back to login", account linking's two choices. Mosaic Separator's hairline. */
.LoginForm_formFooter + a,
.LoginForm_formFooter + .LoginForm_formTools,
.LoginForm_formFooter_submit_idp_link > button + a {
  margin-top: var(--mos-space-md);
  padding-top: var(--mos-space-md);
  border-top: 1px solid var(--mos-color-hairline);
}

/* Reset password keeps its "Back to login" inside the footer, and that link is drawn as a pill,
   so the line hangs under the submit instead of on the link. */
.LoginForm_formFooter_submit:has(+ a)::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: var(--mos-space-md);
  background-color: var(--mos-color-hairline);
}

.LoginForm_formFooter_submit + a {
  margin-top: calc(var(--mos-space-md) - var(--mos-space-xs));
}

.LoginForm_formFooter_submit_idp_link {
  display: flex;
  flex-direction: column;
  gap: var(--mos-space-xs);
}

.Login-idp-link-confirm-link-button {
  width: 100%;
}

.Login-idp-link-confirm-cancel-button {
  margin-top: 0;
}

/* The TOTP form's Cancel sits under Submit. */
form > input[type="submit" i] + button[type="submit" i] {
  margin-top: var(--mos-space-xs);
}

.LoginForm_formFooter_text {
  margin-bottom: 0;
}

/* The actions under the form ("Continue with SSO", "Forgot password", "Back to login",
   "Documentation") are Mosaic secondary buttons side by side; the old vertical divider between
   them is hidden. */

.LoginForm_formTools {
  display: flex;
  gap: var(--mos-space-xs);
  margin: var(--mos-space-xs) 0 0;
  padding: 0;
  list-style: none;
}

.LoginForm_formTools .dividerBox {
  display: none;
}

.LoginForm_formTools a,
.LoginForm_formFooter > a.LoginForm_main_box_subtitle_link,
.LoginForm_main_box > .LoginForm_main_box_subtitle > a.LoginForm_main_box_subtitle_link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 1.75rem;
  padding: var(--mos-space-xxs) var(--mos-space-sm);
  border: 1px solid var(--mos-color-hairline);
  border-radius: var(--mos-radius-pill);
  background-color: var(--mos-color-surface-2);
  color: var(--mos-color-ink-muted);
  font-size: var(--mos-text-sm-size);
  font-weight: var(--mos-weight-medium);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--mos-duration-fast) var(--mos-ease-in-out);
}

.LoginForm_formFooter > a.LoginForm_main_box_subtitle_link {
  align-self: stretch;
}

.LoginForm_formTools a:hover,
.LoginForm_formFooter > a.LoginForm_main_box_subtitle_link:hover,
.LoginForm_main_box > .LoginForm_main_box_subtitle > a.LoginForm_main_box_subtitle_link:hover {
  background-color: var(--mos-color-surface-3);
  color: var(--mos-color-ink-muted);
  text-decoration: none;
}

.LoginForm_formTools a:active,
.LoginForm_formFooter > a.LoginForm_main_box_subtitle_link:active,
.LoginForm_main_box > .LoginForm_main_box_subtitle > a.LoginForm_main_box_subtitle_link:active {
  background-color: var(--mos-color-canvas);
}

.LoginForm_formTools a:focus-visible,
.LoginForm_formFooter > a.LoginForm_main_box_subtitle_link:focus-visible,
.LoginForm_main_box > .LoginForm_main_box_subtitle > a.LoginForm_main_box_subtitle_link:focus-visible {
  outline: 2px solid var(--mos-color-ink-muted);
  outline-offset: -2px;
}

/* Register's "Already have an account? [Log in]": one row as wide as the Sign up button above,
   the question on the left and the secondary button taking the rest; under the separator, as
   every other way out of a form. */
.LoginForm_main_box > .LoginForm_main_box_subtitle:has(> a.LoginForm_main_box_subtitle_link) {
  /* wrap: on a narrow panel the button drops under the question instead of spilling out */
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mos-space-sm);
  margin-top: var(--mos-space-md);
  padding-top: var(--mos-space-md);
  border-top: 1px solid var(--mos-color-hairline);
}

.LoginForm_main_box > .LoginForm_main_box_subtitle > .LoginForm_main_box_subtitle_defination {
  flex: none;
}

/* error.ftl / info.ftl carry the form tools outside any form: give them the form's width. */
#kc-error-message .LoginForm_formTools,
#kc-info-message .LoginForm_formTools {
  margin-top: var(--mos-space-lg);
}

@media only screen and (max-width: 768px) {
  /* For mobile phones: */
  .LoginForm_formTools {
    flex-direction: column;
  }
}

.dividerBox {
  display: flex;
  justify-content: center;
  align-items: center;
}

.divider {
  display: block;
  width: 100%;
  height: 0;
  margin-top: var(--mos-space-lg);
  border-bottom: 1px solid var(--mos-color-hairline);
}

.divider-vertical {
  display: block;
  width: 1px;
  height: 85%;
  background: var(--mos-color-hairline-strong);
}

.divider-vertical-margin {
  margin-top: var(--mos-space-md);
  margin-bottom: var(--mos-space-md);
}

.divider-bottom-margin {
  margin-bottom: var(--mos-space-md);
}

.divider-horizontal-margin {
  margin-left: var(--mos-space-md);
  margin-right: var(--mos-space-md);
}

.providerSubtitle {
  display: flex;
}

/* Sign-up terms, pinned to the bottom of the form side */

.aggrementBox {
  position: absolute;
  bottom: var(--mos-space-lg);
  left: 0;
  right: 0;
  padding: 0 var(--mos-space-md);
  text-align: center;
}

.aggrementBoxText {
  color: var(--mos-color-ink-subtle);
  font-size: var(--mos-text-xs-size);
  line-height: var(--mos-text-xs-leading);
}

@media only screen and (max-width: 768px) {
  /* For mobile phones: */
  .aggrementBox {
    bottom: var(--mos-space-xs);
  }

  .aggrementBoxText {
    display: none;
  }
}

/* OTP device selector and TOTP setup */

.Login_otp_deviceSelector {
  display: flex;
  align-items: center;
  gap: var(--mos-space-sm);
  margin-bottom: var(--mos-space-lg);
}

.Login_otp_deviceSelector label {
  color: var(--mos-color-ink-subtle);
  font-size: var(--mos-text-md-size);
  font-weight: var(--mos-weight-medium);
  white-space: nowrap;
}

/* TOTP setup - the numbered steps as a vertical stepper: Mosaic's number badge on a hairline
   rail, each step's first line a name (text-md medium) and the lines under it a description
   (text-xs subtle), the way StepList sets a step. The supported apps read as its description, the QR
   code sits in a Card, and manual mode's key and settings read as an InfoBox. */

ul > li {
  list-style-type: none;
}

#kc-totp-settings {
  margin: 0 0 var(--mos-space-lg);
  padding: 0;
  list-style: none;
  counter-reset: totp-step;
}

#kc-totp-settings > li {
  position: relative;
  padding: 0 0 var(--mos-space-lg) calc(1.25rem + var(--mos-space-sm));
  counter-increment: totp-step;
  color: var(--mos-color-ink-subtle);
  font-size: var(--mos-text-xs-size);
  line-height: var(--mos-text-xs-leading);
}

#kc-totp-settings > li:last-child {
  padding-bottom: 0;
}

/* the number */
#kc-totp-settings > li::before {
  content: counter(totp-step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--mos-radius-pill);
  background-color: var(--mos-color-surface-3);
  color: var(--mos-color-ink-muted);
  font-size: var(--mos-text-xs-size);
  font-weight: var(--mos-weight-medium);
  line-height: 1;
}

/* the rail down to the next number */
#kc-totp-settings > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(1.25rem + var(--mos-space-xxs));
  bottom: var(--mos-space-xxs);
  left: calc(0.625rem - 0.5px);
  width: 1px;
  background-color: var(--mos-color-hairline);
}

#kc-totp-settings > li p {
  margin: 0 0 var(--mos-space-xs);
}

#kc-totp-settings > li > p:first-child {
  margin-bottom: var(--mos-space-xs);
  color: var(--mos-color-ink);
  font-size: var(--mos-text-md-size);
  font-weight: var(--mos-weight-medium);
  line-height: 1.25rem; /* level with the number */
}

#kc-totp-settings > li > p:last-child {
  margin-bottom: 0;
}

#kc-totp-settings a {
  font-size: var(--mos-text-xs-size);
}

/* Supported apps - the step's description, one app per line */
#kc-totp-supported-apps {
  margin: 0;
  padding: 0;
}

/* QR code - Mosaic Card */
#kc-totp-secret-qr-code {
  display: block;
  box-sizing: border-box;
  width: 10rem;
  height: auto;
  margin: 0 0 var(--mos-space-xs);
  padding: var(--mos-space-xs);
  border: 1px solid var(--mos-color-hairline-strong);
  border-radius: var(--mos-radius-md);
  background-color: var(--mos-color-canvas);
}

#kc-totp-settings > li > br {
  display: none;
}

/* Manual mode - the key and the settings as InfoBox rows */
#kc-totp-secret-key {
  display: block;
  padding: var(--mos-space-xs) var(--mos-space-sm);
  border: 1px solid var(--mos-color-hairline-strong);
  border-radius: var(--mos-radius-md);
  background-color: var(--mos-color-surface-1);
  color: var(--mos-color-ink);
  font-family: var(--mos-font-mono);
  font-size: var(--mos-text-sm-size);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

#kc-totp-settings > li ul:not(#kc-totp-supported-apps) {
  margin: 0;
  padding: 0;
  border: 1px solid var(--mos-color-hairline-strong);
  border-radius: var(--mos-radius-md);
}

#kc-totp-settings > li ul:not(#kc-totp-supported-apps) > li {
  padding: var(--mos-space-xs) var(--mos-space-sm);
  color: var(--mos-color-ink-subtle);
}

#kc-totp-settings > li ul:not(#kc-totp-supported-apps) > li + li {
  border-top: 1px solid var(--mos-color-hairline);
}

form > section {
  margin-bottom: var(--mos-space-lg);
}

/* Social login deprecation dialog - Mosaic Dialog */

.ModalContainer {
  width: 100%;
  height: 100%;
  position: absolute;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: var(--mos-color-backdrop);
  z-index: 100;
}

.ModalDialog {
  position: relative;
  z-index: 101;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(560px, calc(100% - 2rem));
  max-height: 80vh;
  overflow: hidden;
  border: 1px solid var(--mos-color-hairline);
  border-radius: var(--mos-radius-lg);
  background-color: var(--mos-color-canvas);
  box-shadow: var(--mos-shadow-lg);
  pointer-events: all;
}

.ModalDialog_content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  overflow: hidden;
}

.ModalDialog > header,
.ModalDialogHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  padding: 0 var(--mos-space-md);
  border-bottom: 1px solid var(--mos-color-hairline);
  color: var(--mos-color-ink);
}

.ModalDialogHeader img:last-child {
  cursor: pointer;
}

.ModalDialog footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--mos-space-xs);
  box-sizing: border-box;
  width: 100%;
  padding: var(--mos-space-md);
  background-color: var(--mos-color-canvas);
}

.ModalDialog footer .Button {
  width: auto;
}

/* Kept from the old sheet: not used by today's templates, left so nothing that still names them
   changes look. */

.LoginForm_bottom {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 50px;
  margin-top: 15px;
}

.OrDivider {
  display: flex;
  justify-content: center;
  margin: var(--mos-space-md) 0;
  font-size: var(--mos-text-xs-size);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  color: var(--mos-color-ink-subtle);
}

.LoginForm_socialProviders {
  margin-top: var(--mos-space-xs);
  text-align: center;
}

#kc-delete-text {
  margin-bottom: var(--mos-space-md);
}
