// 样式统一入口文件

// 页面样式
@use './pages/home.scss';
@use './pages/home-mobile.scss';
@use './pages/agent.scss';
@use './pages/jobs.scss';
@use './pages/resume.scss';
@use './pages/resume-detail.scss';
@use './pages/job-detail.scss';
@use './pages/profile.scss';
@use './pages/login.scss';
@use './pages/mentor.scss';
@use './pages/mentor-detail.scss';
@use './pages/announcement.scss';
@use './pages/announcement-detail.scss';

// 组件样式
@use './components/hello-world.scss';
@use './components/side-nav.scss';
@use './components/ai-chat.scss';
@use './components/job-page-header.scss';
@use './components/job-stats-overview.scss';
@use './components/job-goal-dialog.scss';
@use './components/settings-dialog.scss';
@use './components/member-dialog.scss';
@use './components/profile-edit-drawer.scss';
@use './components/industry-selector.scss';
@use './components/job-category-selector.scss';
@use './components/region-selector.scss';
@use './components/job-resume-custom-dialog.scss';
@use './components/job-resume-template.scss';
@use './components/job-resume-custom-edit-panel.scss';
@use './components/resume-analysis-report-drawer.scss';
@use './components/resume-issue-fix-drawer.scss';
@use './components/resume-issue-fix-all-drawer.scss';
@use './components/resume-edit-name-dialog.scss';
@use './components/agent-chat-job-list.scss';
@use './components/agent-match-job-add.scss';
@use './components/agent-apply-progress.scss';
@use './components/ai-thinking-indicator.scss';
@use './components/settings-delete-account-dialog.scss';
@use './components/profile-welcome-dialog.scss';
@use './components/settings-invite-dialog.scss';
@use './components/resume-upload-dialog.scss';
@use './components/agreement-preview-dialog.scss';
@use './components/member-access-dialog.scss';
@use './components/step-progress-overlay.scss';
@use './components/mentor-aside-panel.scss';
@use './components/agent-browser-install-guide.scss';
@use './components/login-dialog.scss';
@use './components/home-job-radar.scss';
@use './components/home-announcement.scss';
@use './components/home-mentor.scss';
@use './components/home-about.scss';

// 全局样式（优先级最高）
@use './auto.scss';

// ==================== Element Plus 组件 rem 适配修正 ====================
// 项目 html font-size: 100px，导致 Element Plus 内部 rem 单位被放大
// 以下对常用弹出类组件强制使用 px 单位还原正常尺寸

// ElMessage 提示条
.el-message {
  font-size: 14px !important;
  padding: 10px 16px !important;
  min-width: 300px !important;
  border-radius: 8px !important;

  .el-message__icon {
    font-size: 16px !important;
    margin-right: 8px !important;
    width: 16px !important;
    height: 16px !important;
  }

  .el-message__content {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  .el-message__closeBtn {
    font-size: 14px !important;
  }
}

// ==================== Element Plus MessageBox rem 适配修正 ====================
.el-overlay {
  // 确保遮罩层 z-index 足够高
  z-index: 2100 !important;
}

.el-message-box {
  width: 420px !important;
  padding: 20px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  // 修正 transform: scale 下弹窗居中
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;

  &__header {
    padding: 0 0 12px 0 !important;
  }

  &__title {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  &__headerbtn {
    top: 20px !important;
    right: 20px !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
  }

  &__content {
    padding: 12px 0 !important;
    font-size: 14px !important;
  }

  &__message {
    font-size: 14px !important;
    line-height: 1.5 !important;

    p {
      font-size: 14px !important;
      line-height: 1.5 !important;
    }
  }

  &__status {
    font-size: 20px !important;
  }

  &__btns {
    padding: 8px 0 0 0 !important;

    .el-button {
      font-size: 14px !important;
      padding: 8px 20px !important;
      height: 32px !important;
      border-radius: 4px !important;
      min-width: 60px !important;
    }
  }
}

// ==================== Element Plus Loading rem 适配修正 + 品牌色覆盖 ====================
.el-loading-mask {
  // 全屏 loading 遮罩层 z-index 确保最高
  z-index: 2100 !important;

  .el-loading-spinner {
    // 修正 spinner 容器定位（默认 top: 50% + margin-top 用了 rem，会被 100px 放大）
    top: 50% !important;
    margin-top: -21px !important;
    width: 100% !important;

    // 修正旋转圆圈尺寸
    .circular {
      width: 42px !important;
      height: 42px !important;

      .path {
        stroke: #4FC2C9 !important;
      }
    }

    // 修正加载文字
    .el-loading-text {
      font-size: 14px !important;
      margin: 8px 0 !important;
      color: #4FC2C9 !important;
      line-height: 1.4 !important;
    }
  }
}
