/* WeChat Login Styles */

.wechat-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background-color: #1aad19;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 200px;
  margin: 10px 0;
}

.wechat-login-btn:hover {
  background-color: #179b16;
  color: white;
  text-decoration: none;
}

.wechat-login-btn:active {
  background-color: #0e7c12;
}

.wechat-login-btn .wechat-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  fill: currentColor;
}

/* WeChat login container */
.wechat-login-container {
  text-align: center;
  margin: 20px 0;
}

.wechat-login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #666;
  font-size: 14px;
}

.wechat-login-divider::before,
.wechat-login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #ddd;
}

.wechat-login-divider span {
  padding: 0 15px;
}

/* WeChat messages */
.wechat-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  z-index: 10000;
  max-width: 300px;
  animation: slideIn 0.3s ease-out;
}

.wechat-message.success {
  background-color: #1aad19;
}

.wechat-message.error {
  background-color: #e64340;
}

.wechat-message.loading {
  background-color: #10aeff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.wechat-message-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* WeChat account management in user center */
.wechat-account-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wechat-account-section h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
}

.wechat-account-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.wechat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  object-fit: cover;
}

.wechat-user-info h4 {
  margin: 0 0 5px 0;
  color: #333;
}

.wechat-user-info p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.wechat-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wechat-link-btn,
.wechat-unlink-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.wechat-link-btn {
  background-color: #1aad19;
  color: white;
}

.wechat-link-btn:hover {
  background-color: #179b16;
}

.wechat-unlink-btn {
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.wechat-unlink-btn:hover {
  background-color: #e8e8e8;
}

/* Responsive design */
@media (max-width: 768px) {
  .wechat-message {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .wechat-login-btn {
    width: 100%;
    min-width: unset;
  }

  .wechat-account-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .wechat-actions {
    width: 100%;
  }

  .wechat-link-btn,
  .wechat-unlink-btn {
    flex: 1;
  }
}