.xcodelogin-option {
  margin: 1rem 0;
  text-align: center;
}

.xcodelogin-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1rem;
  color: #6c757d;
  font-size: .875rem;
}

.xcodelogin-divider::before,
.xcodelogin-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8d8d8;
}

.xcodelogin-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
}

.xcodelogin-modal {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(16, 24, 40, .58);
}

.xcodelogin-modal.is-open {
  display: flex;
}

.xcodelogin-modal-open {
  overflow: hidden;
}

.xcodelogin-modal__dialog {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.xcodelogin-modal__close {
  position: absolute;
  top: .65rem;
  right: .75rem;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.xcodelogin-modal__title {
  margin: 0 2rem 1.25rem 0;
  font-size: 1.4rem;
}

.xcodelogin-modal__message {
  margin-bottom: 1rem;
  padding: .75rem;
  border-radius: 6px;
  background: #eef6ff;
  color: #164e78;
}

.xcodelogin-modal__message.is-error {
  background: #fff0f0;
  color: #9c1c1c;
}

.xcodelogin-modal__primary {
  width: 100%;
  min-height: 44px;
}

.xcodelogin-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .75rem;
}

.xcodelogin-code-input {
  text-align: center;
  letter-spacing: .45em;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.xcodelogin-page {
  max-width: 540px;
  margin: 0 auto;
}

.xcodelogin-page-form .btn-primary {
  min-height: 44px;
}

.xcodelogin-secondary-link {
  display: inline-block;
  margin-left: 1rem;
}

.xcodelogin-password-fallback {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

@media (max-width: 575px) {
  .xcodelogin-modal {
    align-items: flex-end;
    padding: 0;
  }

  .xcodelogin-modal__dialog {
    width: 100%;
    max-height: 92vh;
    padding: 1.5rem;
    border-radius: 14px 14px 0 0;
  }
}
