/**
 * 登录弹窗样式
 * 用于企业类型选择弹窗
 */

/* 弹窗遮罩层 */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none; /* 初始隐藏 */
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  /* 确保初始状态正确设置 */
  pointer-events: none;
}

/* 弹窗显示状态 */
.login-modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 弹窗主体 */
.login-modal-container {
  position: relative;
  border-radius: 12px;
  padding: 0;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  /* 禁止文字选择 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 渐变背景层 */
.login-modal-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ffffff 0%, #d0e8f9 100%);
  z-index: 1;
}

/* 背景图片层 */
.login-modal-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/login/Ellipse 5@2x.png');
  background-size: 100% 100%; /* 拉伸覆盖整个容器 */
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  pointer-events: none; /* 确保图片层不阻挡交互 */
}

.login-modal-overlay.show .login-modal-container {
  transform: scale(1);
}

/* 弹窗头部 */
.login-modal-header {
  position: relative;
  padding: 24px 24px 0 24px;
  text-align: center;
  z-index: 3; /* 确保内容在背景层之上 */
}

.login-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333333;
  margin: 0;
  padding-bottom: 24px;
}

/* 关闭按钮 */
.login-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.login-modal-close:hover {
  color: #666666;
}

.login-modal-close::before {
  content: '×';
  font-size: 24px;
  line-height: 1;
}

/* 弹窗内容区域 */
.login-modal-content {
  padding: 0 24px 24px 24px;
  position: relative;
  z-index: 3; /* 确保内容在背景层之上 */
}

/* 登录选项容器 */
.login-options-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 登录选项按钮 */
.login-option-button {
  width: 100%;
  padding: 20px 24px;
  background: linear-gradient(90deg, #596efb 0%, #596efb 50%, #596efb 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.login-option-button:hover {
  background: linear-gradient(90deg, #4a5ce8 0%, #4a5ce8 50%, #4a5ce8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(89, 110, 251, 0.3);
}

.login-option-button:active {
  background: linear-gradient(90deg, #4a5ce8 0%, #4a5ce8 50%, #4a5ce8 100%);
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(89, 110, 251, 0.3);
}

/* 选项标题 */
.login-option-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #ffffff;
}

/* 选项描述 */
.login-option-description {
  font-size: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .login-modal-container {
    width: 95%;
    margin: 20px;
  }
  
  .login-modal-header {
    padding: 20px 20px 0 20px;
  }
  
  .login-modal-content {
    padding: 0 20px 20px 20px;
  }
  
  .login-modal-title {
    font-size: 16px;
    padding-bottom: 20px;
  }
  
  .login-option-button {
    padding: 16px 20px;
  }
  
  .login-option-title {
    font-size: 16px;
  }
  
  .login-option-description {
    font-size: 13px;
  }
}

/* 动画效果 */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}
