.happ-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(7px);
}

.happ-auth-overlay[hidden] {
  display: none;
}

.happ-auth-modal {
  position: relative;
  width: min(440px, 100%);
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  color: #101828;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
}

.happ-auth-modal h2 {
  margin: 0 0 8px;
  font-size: 27px;
}

.happ-auth-modal p {
  color: #667085;
}

.happ-auth-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  font-size: 22px;
  cursor: pointer;
}

.happ-auth-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.happ-auth-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 11px;
  font: inherit;
}

.happ-auth-form button {
  width: 100%;
}

.happ-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #98a2b3;
  font-size: 13px;
}

.happ-auth-divider::before,
.happ-auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e4e7ec;
}

.happ-auth-telegram {
  width: 100%;
  background: #229ed9 !important;
  color: #fff !important;
}

.happ-auth-message {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  color: #667085;
}

.happ-auth-message.error {
  color: #dc2626;
}

.happ-auth-message.success {
  color: #16a34a;
}

.happ-logout-link {
  position: relative;
  width: 42px;
  height: 42px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 12px;
  background: #fff;
  color: #667085;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  vertical-align: middle;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease,
    transform .15s ease;
}

.happ-logout-link:hover {
  background: #f6f9ff;
  color: #2563eb;
  border-color: rgba(37, 99, 235, .28);
}

.happ-logout-link:active {
  transform: translateY(1px);
}

.happ-logout-link svg {
  width: 19px;
  height: 19px;
  display: block;
}

.happ-logout-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  transform: translateX(-50%) translateY(-3px);
  padding: 6px 9px;
  border-radius: 7px;
  background: #101828;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .15s ease;
  z-index: 100;
}

.happ-logout-link:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .happ-auth-modal {
    padding: 24px 20px;
  }

  .happ-logout-link {
    margin-left: 6px;
  }
}

/* HAPP auth: OTP field */
.happ-auth-form [data-code] {
  text-align: center;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}
