
body.anonymous .logout {
  display: none;
}

/* intl-tel-input generates this wrapper itself, so it cannot carry w-100 */
.iti {
  width: 100%;
}

/* --bs-* rather than literal colours: "red" and "green" fail contrast on dark */
.action-status {
  transition: color 0.2s ease;
}
.action-status.process { color: var(--bs-primary); }
.action-status.failure { color: var(--bs-danger); }
.action-status.success { color: var(--bs-success); }

/* Wizard: div.step is a content panel, only the active one shows */
body#setup div.step {
  display: none;
}
body#setup div.step.active {
  display: block;
}

/* Step indicator (page.steps). Pure flex, no absolute connectors: each step is
   [dot][line] and the last is [dot], so lines land between dots at any width.
   Dots are fixed-width, so a long translation cannot break the row. */
.mfa-steps {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 30rem;
  margin: 0 auto 2.25rem;
  padding: 0;
}

.mfa-step {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
}
.mfa-step:last-child {
  flex: 0 0 auto;
}

.mfa-step-line {
  flex: 1 1 auto;
  height: 2px;
  margin: 0 0.5rem;
  background-color: var(--bs-border-color);
  transition: background-color 0.2s ease;
}
.mfa-step.is-done .mfa-step-line {
  background-color: var(--bs-primary);
}

.mfa-step-dot {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 50%;
  background-color: var(--bs-body-bg);
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* #fff, not a token: --bs-primary is the dark brand maroon in both themes, so
   the same white sits on it either way - as .btn-primary does. */
.mfa-step.is-done .mfa-step-dot,
.mfa-step.is-current .mfa-step-dot {
  border-color: var(--bs-primary);
  background-color: var(--bs-primary);
  color: #fff;
}
.mfa-step.is-current .mfa-step-dot {
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.mfa-step-dot > .bi { display: none; }
.mfa-step.is-done .mfa-step-dot > .bi { display: block; }
.mfa-step.is-done .mfa-step-num { display: none; }

/* Every label ships in the markup so a screen reader gets the whole flow, but
   only the current one is drawn. Out of flow and full row width, so the text
   can be any length without shifting a dot.

   The hidden state repeats Bootstrap's .visually-hidden rather than using it:
   activateStep() moves .is-current at runtime, so the state has to be derived
   in CSS, not baked into a class the server picked. */
.mfa-step-name {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bs-body-color);
}
.mfa-step:not(.is-current) .mfa-step-name {
  right: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

/* Password requirement met. bootstrap-icons is loaded, but this marks an
   existing label rather than adding an <i>, so ::before stays. */
.check-icon::before {
  content: '\2713';
  font-weight: 700;
  color: var(--bs-success);
  margin-right: 5px;
}

/* Factor cards: the whole card is the click target, via .stretched-link on the
   label. Bootstrap sets no cursor on .form-check-label by default. */
.factor-card {
  position: relative;
}
.factor-card .form-check-label {
  cursor: pointer;
}

/* The overlay takes focus while up, so it must not ring the whole viewport */
#overlay:focus {
  outline: none;
}

/* Above every Bootstrap layer (modal 1055, tooltip 1080) */
.mfa-overlay {
  z-index: 2000;
}

/* A QR stops being scannable much below this, and wider only wastes space */
.mfa-qr {
  max-width: 200px;
}
