@use '../variables' as *;

// ==================== 简历详情页 ====================
.resume-detail {
  min-width: 12.8rem;

  &__content {
    flex: 1;
    padding-bottom: 0.24rem;
    height: var(--app-height, 100vh);
    box-sizing: border-box;
    overflow: hidden;
    background: $bg-main;
    display: flex;
    flex-direction: column;
    font-size: 0.14rem;
  }

  &__page-title {

    padding: 0.19rem 0.24rem;
    margin-bottom: 0.16rem;
    background: #fff;
    >h2{
      font-size: 0.18rem;
      font-weight: 700;
      color: $text-dark;
    }
  }

  // ---- 顶部操作栏 ----
  &__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.15rem;
    padding: 0 0.24rem;
  }

  &__toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.12rem;
  }

  &__back-btn {
    background: none;
    border: none;
    color: $text-dark;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.13rem;

    &:hover {
      color: #000;
    }
  }

  &__back-icon {
    width: 0.14rem;
    height: 0.14rem;
  }

  &__tab-name {
    font-size: 0.14rem;
    font-weight: 500;
    color: $text-dark;
    background: $bg-white;
    border: 1px solid $border-color;
    border-radius: 0.16rem;
    padding: 0.05rem 0.16rem;
  }

  &__toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.1rem;
  }

  &__tool-btn {
    display: flex;
    align-items: center;
    gap: 0.04rem;
    background: none;
    border: none;
    color: $text-dark;
    font-size: 0.13rem;
    cursor: pointer;
    padding: 0.05rem 0.1rem;
    border-radius: 0.06rem;
    transition: all 0.2s;
    white-space: nowrap;

    &:hover {
      //color: $text-dark;
      //background: $bg-white;
    }

    &--danger:hover {
      color: $danger;
    }
  }

  &__tool-icon {
    width: 0.13rem;
    height: 0.13rem;
    flex-shrink: 0;
  }

  // ---- 评分区域 ----
  &__score-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: $bg-white;
    border-radius: 0.12rem;
    padding: 0.28rem 0.32rem;
    margin-bottom: 0.16rem;

    /* B/C/D 评级渐变背景 */
    &--grade-bcd {
      background: linear-gradient(to bottom, #FFF5E9, #FFF);
    }

    /* A 评级渐变背景 */
    &--grade-a {
      background: linear-gradient(to bottom, #ECFDFC, #FFF);
    }
  }

  &__score-left {
    display: flex;
    align-items: center;
    gap: 0.16rem;
  }

  /* 星星+底座容器 */
  &__star-wrapper {

  }

  /* SVG 五角星 */
  &__star-svg {
    width: 0.63rem;
    height: 0.63rem;
    position: relative;
    z-index: 1;
  }

  /* 底座长方形 */
  &__star-base {

    margin-top: -0.08rem;
    justify-content: center;
    font-size: 0.14rem;

    > span {
      font-size: 0.14rem;
      font-weight: 600;
    }
  }

  /* 右侧操作按钮区 */
  &__score-actions {

  }

  /* 暂无等级提示文字 */
  &__score-hint {
    font-size: 0.14rem;
    color: $text-middle;
    font-weight: 600;
  }

  &__score-links{
    height: 0.14rem;
  }
  &__score-link {
    font-size: 0.12rem;
    color: $text-light;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    margin-right: 0.16rem;

    &:hover {
      color: $accent;
    }
  }

  &__score-right {
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }

  &__score-item {
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.06rem;
  }

  &__score-num {
    font-size: 0.30rem;
    font-weight: 700;
    color: $text-dark;
    padding-bottom: 0.1rem;
  }

  &__score-label {
    font-size: 0.13rem;
    color: $text-light;
    white-space: nowrap;
  }

  &__diagnose-btn {
    background: $btn-dark;
    margin-left: 0.16rem;
    color: $bg-white;
    border: none;
    border-radius: 0.08rem;
    width: 1.03rem;
    height: 0.36rem;
    line-height: 0.37rem;
    font-size: 0.13rem;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    //transition: background 0.2s;



    &:hover {
      background: $btn-dark-hover;
    }


  }

  // ---- 简历主体 ----
  &__body {
    padding-bottom: 0.3rem;
    border-radius: 0.16rem;
    background: #fff;
    margin: 0 0.24rem;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  // ---- 固定顶部区域（评分+Tab，不滚动） ----
  &__fixed-top {
    flex-shrink: 0;
  }

  // ---- Tab 导航栏 ----
  &__tabs {
    display: flex;
    align-items: center;
    padding-bottom: 0.14rem;
    flex-shrink: 0;
  }

  &__tab-item {
    font-size: 0.14rem;
    color: $text-middle;
    cursor: pointer;
    padding: 0.12rem 0.2rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;

    &:hover {
      color: $text-dark;
    }

    &--active {
      color: $accent;
      font-weight: 600;
      border-bottom-color: $accent;
    }
  }

  // ---- 可滚动内容区域 ----
  &__scroll-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0.3rem;

    // 隐藏滚动条
    &::-webkit-scrollbar {
      display: none;
    }
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  &__card {
    background: $bg-white;
    border-radius: 0.1rem;
    margin: 0.24rem 0.18rem;

    &:hover .resume-detail__section-header {
      background: #F0FAFA;
      .resume-detail__edit-btn-inline {
        opacity: 1;
        pointer-events: auto;
      }
    }

  }

  &__card-hover {
    padding: 0.1rem 0.14rem;
    &:hover {
      background: #F0FAFA;

    }

  }

  // ---- 个人信息卡片 ----
  &__card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.16rem;
  }

  &__user-name {
    font-size: 0.28rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.04rem 0;
  }

  &__user-title {
    font-size: 0.13rem;
    color: $text-light;
    margin: 0;
  }

  &__card-actions {
    display: flex;
    align-items: center;
    gap: 0.08rem;
    flex-shrink: 0;
  }

  &__card-btn {
    font-size: 0.12rem;
    border-radius: 0.16rem;
    padding: 0.06rem 0.16rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;

    &--outline {
      background: $bg-main;
      color: $text-dark;
      border: 1px solid $border-color;

      &:hover {
        border-color: $accent;
        color: $accent;
        background: $theme-color;
      }
    }

    &--dark {
      background: $btn-dark;
      color: $bg-white;

      &:hover {
        background: $btn-dark-hover;
      }
    }
  }

  // ---- 联系方式 ----
  &__contact {
    display: flex;
    align-items: center;
    gap: 0.24rem;
    flex-wrap: wrap;
  }

  &__contact-item {
    display: flex;
    align-items: center;
    gap: 0.06rem;
    font-size: 0.12rem;
    color: #666;
    vertical-align: middle;

    a{
      color: #666;
      vertical-align: super;
    }
    >span{
      vertical-align: super;
    }
  }

  &__contact-icon {
    width: 0.14rem;
    height: 0.14rem;
    color: $text-light;
    flex-shrink: 0;
  }

  // ---- 区块标题 ----
  &__section-header {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    margin-bottom: 0.16rem;
    padding: 0.1rem 0 0.1rem 0.14rem;
    border-radius: 0.06rem;
  }

  &__section-title {
    font-size: 0.17rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.16rem 0;

    // 底部加粗装饰线（层级低于文字，部分遮挡文字底部）
    &--underline {
      position: relative;
      padding-bottom: 0.02rem;
      background: transparent;
      &::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0.02rem;
        width: 100%;
        height: 0.06rem;
        background: $accent;
        border-radius: 0.02rem;
        z-index: -1;
      }
    }
  }

  &__section-header &__section-title {
    margin-bottom: 0;
  }

  // ---- 编辑按钮（与 ProfilePageContent 一致） ----
  &__edit-btn {
    background: none;
    border: none;
    color: $text-light;
    cursor: pointer;
    padding: 0.04rem;
    border-radius: 0.04rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: auto;

    &:hover {
      color: $accent;
      background: $theme-color;
    }
  }

  &__edit-icon {
    width: 0.15rem;
    height: 0.15rem;
  }

  // ---- 内联编辑按钮（品牌色图标+文字，hover卡片时才显示） ----
  &__edit-btn-inline {
    background: none;
    border: none;
    color: $accent;
    cursor: pointer;
    padding: 0.04rem 0.08rem;
    border-radius: 0.04rem;
    display: flex;
    align-items: center;
    gap: 0.04rem;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 0.13rem;
    font-weight: 500;
    // 默认隐藏，hover卡片时显示
    opacity: 0;
    pointer-events: none;
    margin-left: auto;

    .el-icon {
      font-size: 0.15rem;
    }

    &:hover {
    }
  }

  // 卡片hover时显示编辑按钮（个人信息、个人概述）
  &__card-hover:hover &__edit-btn-inline {
    opacity: 1;
    pointer-events: auto;
  }

  // 经历模块标题栏hover时显示添加按钮
  &__section-header:hover &__edit-btn-inline {
    //opacity: 1;
    pointer-events: auto;
  }

  // 经历模块标题栏hover时背景色
  &__section-header:hover {
    //background: #F7F7F7;
    border-radius: 0.06rem;
  }

  // 经历条目内的编辑按钮样式已在 &__exp-date 下方统一管理

  // ---- 教育背景 ----
  &__edu-item {
    margin-top: 0.16rem;
    padding-left: 0.1rem;
    border-left: 2px solid $border-color;
    &:not(:last-child) {

    }
  }

  &__edu-degree {
    font-size: 0.14rem;
    font-weight: 600;
    color: $text-dark;
    margin-bottom: 0.04rem;
  }

  &__edu-meta {
    font-size: 0.12rem;
    color: $text-light;
    line-height: 1.6;
  }

  // ---- 工作经历 ----
  &__exp-item {
    margin-top: 0.16rem;
    padding: 0.1rem 0.14rem;
    border-radius: 0.09rem;
    &:hover {
      background: #F0FAFA;
    }


  }

  &__exp-title {
    font-size: 0.14rem;
    font-weight: 600;
    color: $text-dark;
    margin-bottom: 0.04rem;
  }

  &__exp-meta {
    font-size: 0.12rem;
    color: $text-light;
    margin-bottom: 0.06rem;
  }

  // ---- 经历第一行（名称 + 身份 + 时间 + 修复标记） ----
  &__exp-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.12rem;
    margin-bottom: 0.06rem;
  }

  &__exp-name {
    font-size: 0.14rem;
    font-weight: 600;
    color: $text-dark;
  }

  &__exp-role {
    font-size: 0.13rem;
    font-weight: 400;
    color: $text-dark;
  }

  &__exp-date {
    font-size: 0.13rem;
    font-weight: 400;
    color: $text-middle;

    // 带切换效果的时间（hover exp-item 时隐藏）
    &--toggle {
      display: inline;
    }
  }

  // hover经历条目时：隐藏时间，显示按钮
  &__exp-item:hover &__exp-date--toggle {
    display: none;
  }

  // 默认隐藏按钮且不占位
  &__exp-edit-btn {
    display: none;
    padding-top: 0;
    padding-bottom: 0;
  }

  // hover经历条目时：显示按钮
  &__exp-item:hover &__exp-edit-btn {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  // ---- 修复建议标记 ----
  &__fix-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    font-size: 0.12rem;
    font-weight: 500;
    color: #FF8D0B;
    background: #FFF5E9;
    border-radius: 0.04rem;
    padding: 0.04rem 0.12rem;
    cursor: default;
    transition: all 0.2s;
    white-space: nowrap;

    &:hover {
      background: #FFEDDA;
    }

    // hover 时显示气泡
    &:hover .resume-detail__fix-tooltip {
      opacity: 1;
      visibility: visible;
    }
  }

  &__fix-tag-icon {
    width: 0.14rem;
    height: 0.14rem;
    flex-shrink: 0;
  }

  // ---- 诊断详情 hover 气泡 ----
  &__fix-tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.12rem);
    transform: translateY(-50%);
    min-width: 2.4rem;
    max-width: 3.5rem;
    padding: 0.14rem 0.18rem;
    background: linear-gradient(to bottom,#FFF5E9,#FFFFFF);
    color: $text-dark;
    font-size: 0.13rem;
    font-weight: 400;
    line-height: 1.7;
    white-space: normal;
    word-break: break-all;
    border-radius: 0.1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid #FF8D0B;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;

    // 左侧尖角 — 旋转方块方案，边框粗细与气泡一致
    &::before {
      content: '';
      position: absolute;
      top: 50%;
      left: -0.05rem;
      margin-top: -0.05rem;
      width: 0.09rem;
      height: 0.09rem;
      background: #FFF8F2;
      border-left: 1px solid #FF8D0B;
      border-bottom: 1px solid #FF8D0B;
      transform: rotate(45deg);
    }

    // 不再需要内层伪元素
    &::after {
      display: none;
    }
  }

  &__exp-desc {
    font-size: 0.12rem;
    color: $text-dark;
    line-height: 1.6;
    margin: 0;
  }

  // ---- 技能标签 ----
  &__skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.08rem;
  }

  &__skill-tag {
    font-size: 0.12rem;
    color: $accent;
    background: $bg-white;
    border: 1px solid $accent;
    border-radius: 0.04rem;
    padding: 0.05rem 0.08rem;
    transition: all 0.2s;

    &:hover {
      border-color: $accent;
      color: $accent;
      background: $bg-white;
    }
  }

  // ---- 卡片底部问题操作区 ----
  &__card-issue {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.1rem;
    margin-top: 0.10rem;
    padding-bottom: 0.14rem;

  }

  // 问题类型按钮组（三选一）
  &__issue-type-group {
    display: flex;
    align-items: center;
    gap: 0.06rem;
  }

  // 问题类型按钮
  &__issue-type-btn {
    font-size: 0.12rem;
    border-radius: 0.16rem;
    padding: 0.05rem 0.14rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid $border-color;
    background: $bg-main;
    color: $text-light;

    &:hover {
      border-color: $accent;
      color: $accent;
      background: $theme-color;
    }

    // 选中态
    &--active {
      background: $theme-color;
      color: $accent;
      border-color: $accent;
    }
  }
}
