/* Login popup */

body.login-pop-open {
  overflow: hidden;
}

.login-pop {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-pop--open {
  display: flex;
}

.login-pop__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.login-pop__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.login-pop__panel {
  width: 440px;
  max-width: 100%;
  padding: 36px;
  border-radius: 40px;
  border: 1px solid var(--color-black-alpha-20);
  background: var(--surface-foreground);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.login-pop__logo {
  width: auto;
  height: 64px;
  display: block;
  object-fit: contain;
}

.login-pop__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-pop__fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-pop__field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-pop__input {
  width: 100%;
  min-height: 47px;
  padding: 12px 18px;
  border: 1px solid var(--color-black-alpha-5);
  border-radius: 6px;
  background: var(--color-black-alpha-5);
  color: var(--text-primary);
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 24px;
  box-sizing: border-box;
}

.login-pop__input::placeholder {
  color: var(--text-placeholder);
}

.login-pop__input:focus {
  border-color: var(--color-primary-500);
  outline: none;
}

.login-pop__error {
  display: none;
  margin: 0;
  color: #fd2e33;
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 24px;
}

.login-pop__error--visible {
  display: block;
}

.login-pop__form-message {
  width: 100%;
  margin: 0;
  font-size: 14px;
  font-family: PingFang SC, sans-serif;
  line-height: 20px;
  text-align: center;
}

.login-pop__form-message--error {
  color: #fd2e33;
}

.login-pop__form-message--success {
  color: #1f9d55;
}

.login-pop--submitting .login-pop__btn {
  opacity: 0.7;
  cursor: wait;
}

.login-pop__actions {
  width: 100%;
  display: flex;
  gap: 18px;
}

.login-pop__btn {
  flex: 1;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  background: var(--color-primary-500);
  color: var(--text-on-dark);
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
}

.login-pop__btn:hover {
  opacity: 0.9;
}

.login-pop__tips {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-pop__tips-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 20px;
}

.login-pop__tips-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 20px;
}

.login-pop__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-pop__close:hover {
  opacity: 0.85;
}

.login-pop__close-icon {
  display: block;
}

@media (max-width: 768px) {
  .login-pop__inner {
    gap: 36px;
  }

  .login-pop__panel {
    width: min(300px, calc(100vw - 32px));
    padding: 24px 20px;
    border-radius: 20px;
    gap: 18px;
  }

  .login-pop__logo {
    height: 32px;
  }

  .login-pop__form {
    gap: 18px;
  }

  .login-pop__fields {
    gap: 12px;
  }

  .login-pop__field {
    gap: 12px;
  }

  .login-pop__input {
    min-height: 47px;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 20px;
  }

  .login-pop__error {
    font-size: 12px;
    line-height: 18px;
  }

  .login-pop__actions {
    flex-direction: row;
    gap: 12px;
  }

  .login-pop__btn {
    padding: 13px 16px;
    font-size: 18px;
    line-height: 24px;
  }

  .login-pop__tips {
    gap: 6px;
  }

  .login-pop__tips-text {
    font-size: 12px;
    line-height: 18px;
  }
}
