.mp-1-modal-two-factor .mp-1-modal-dialog {
  width: min(760px, calc(100vw - 32px));
}

.mp-1-modal-two-factor .mp-1-modal-body {
  max-height: calc(100vh - 150px);
  padding: 0;
  overflow-y: auto;
}

.mp-1-two-factor-tabs {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  padding: 0 20px;
  border-bottom: 1px solid #e5e9f0;
  background: #fff;
}

.mp-1-two-factor-tab {
  position: relative;
  min-width: 112px;
  height: 48px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #586174;
  font-size: 14px;
  cursor: pointer;
}

.mp-1-two-factor-tab.is-active {
  color: #1677ff;
  font-weight: 600;
}

.mp-1-two-factor-tab.is-active::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 2px;
  background: #1677ff;
  content: "";
}

#two-factor-totp-content {
  padding: 24px;
}

@media (max-width: 640px) {
  .mp-1-modal-two-factor .mp-1-modal-dialog {
    width: calc(100vw - 24px);
    margin: 24px auto;
  }

  .mp-1-modal-two-factor .mp-1-modal-body {
    max-height: calc(100vh - 100px);
  }

  .mp-1-two-factor-tabs {
    padding: 0 12px;
  }

  .mp-1-two-factor-tab {
    flex: 1;
    min-width: 0;
  }
}
