@use '../variables' as *;

// ==================== 岗位详情页 ====================
.job-detail {
  min-width: 12.8rem;

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

  // ---- 主内容卡片 ----
  &__main-card {
    flex: 1;
    min-height: 0;
    margin: 0.16rem 0.24rem;
    background: $bg-white;
    border: 1px solid #F0F0F0;
    box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.04);
    border-radius: 0.08rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  // ---- 返回按钮 ----
  &__back-row {
    padding: 0.24rem 0.32rem 0;
  }

  &__back-btn {
    display: flex;
    align-items: center;
    gap: 0.04rem;
    background: none;
    border: none;
    cursor: pointer;
    color: $text-middle;
    font-size: 0.14rem;
    line-height: 0.19rem;
    padding: 0;

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

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

  // ---- 内容区域（可滚动） ----
  &__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.24rem 0.32rem 0.4rem;
  }

  // ---- 岗位头部信息区域 ----
  &__header-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.24rem;
  }

  // ---- 左侧基本信息 ----
  &__basic-info {
    flex: 1;
    min-width: 0;
  }

  &__title-row {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    margin-bottom: 0.08rem;
  }

  &__job-title {
    font-size: 0.24rem;
    font-weight: 600;
    line-height: 0.32rem;
    color: $text-dark;
    margin: 0;
  }

  &__fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.2rem;
    height: 0.2rem;
    flex-shrink: 0;
    color: #8C8C8C;
    transition: color 0.2s;

    &:hover {
      color: $danger;
    }

    &--active {
      color: $danger;

      .job-detail__fav-icon path {
        fill: currentColor;
      }
    }
  }

  &__fav-icon {
    width: 0.18rem;
    height: 0.18rem;
  }

  &__meta-row {
    font-size: 0.12rem;
    line-height: 0.16rem;
    color: $text-middle;
    margin-bottom: 0.12rem;
  }

  &__meta-dot {
    margin: 0 0.06rem;
    color: $text-middle;
  }

  // ---- 操作按钮 ----
  &__action-btns {
    display: flex;
    align-items: center;
    gap: 0.16rem;
  }

  &__nova-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.08rem 0.16rem;
    border: 1px solid $accent;
    border-radius: 0.08rem;
    background: $bg-white;
    color: $accent;
    font-size: 0.14rem;
    font-weight: 600;
    line-height: 0.19rem;
    cursor: pointer;
    transition: all 0.2s;

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

  &__apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.88rem;
    height: 0.37rem;
    line-height: 0.37rem;
    background: $accent;
    border: 1px solid $accent;
    border-radius: 0.08rem;
    color: $bg-white;
    font-size: 0.14rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;

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

  // ---- 右侧匹配度卡片 ----
  &__match-card {
    flex-shrink: 0;
    width: 2.06rem;
    border-radius: 0.08rem;
    padding: 0.16rem 0.24rem;
    border: 1px solid #9FD051;
    background: #FBFDF7;
  }

  // 高匹配度
  &__match-card--high {
    background: #FBFDF7;
    border-color: #9FD051;
  }

  // 中匹配度
  &__match-card--medium {
    background: #FFFBF5;
    border-color: #F59E0B;
  }

  // 低匹配度
  &__match-card--low {
    background: #FFF6F5;
    border-color: #FE6D52;
  }

  &__match-top {
    display: flex;
    align-items: baseline;
    gap: 0.08rem;
    margin-bottom: 0.2rem;
  }

  &__match-score {
    font-size: 0.3rem;
    font-weight: 630;
    line-height: 0.4rem;
    color: #9FD051;
  }

  &__match-label {
    font-size: 0.13rem;
    font-weight: 620;
    line-height: 0.17rem;
    color: #9FD051;
  }

  // 高匹配度文字色
  &__match-card--high &__match-score,
  &__match-card--high &__match-label {
    color: #9FD051;
  }

  // 中匹配度文字色
  &__match-card--medium &__match-score,
  &__match-card--medium &__match-label {
    color: #F59E0B;
  }

  // 低匹配度文字色
  &__match-card--low &__match-score,
  &__match-card--low &__match-label {
    color: #FE6D52;
  }

  &__match-list {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
  }

  &__match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  &__match-row-label {
    font-size: 0.12rem;
    line-height: 0.16rem;
    color: #6B7280;
  }

  &__match-row-score {
    font-size: 0.12rem;
    line-height: 0.16rem;
    color: $text-dark;
  }

  // ---- 优化简历提示条 ----
  &__optimize-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(270deg, rgba(159, 208, 81, 0.1) 0%, rgba(82, 202, 209, 0.1) 62.02%);
    border-radius: 0.08rem;
    padding: 0.12rem 0.24rem;
    margin-bottom: 0.32rem;
  }

  &__optimize-text {
    font-size: 0.16rem;
    font-weight: 600;
    line-height: 0.21rem;
    color: $text-dark;
  }

  &__optimize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.08rem 0.16rem;
    background: #52CAD1;
    border: none;
    border-radius: 0.08rem;
    color: $bg-white;
    font-size: 0.14rem;
    font-weight: 600;
    line-height: 0.19rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;

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

  // ---- 内容区块 ----
  &__section {
    margin-bottom: 0.32rem;
  }

  &__section-title {
    font-size: 0.18rem;
    font-weight: 600;
    line-height: 0.24rem;
    color: $text-dark;
    margin: 0 0 0.16rem 0;
  }

  &__section-list {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
  }

  &__section-item {
    font-size: 0.14rem;
    line-height: 0.19rem;
    color: $text-middle;
  }

  &__bonus-item {
    font-size: 0.14rem;
    line-height: 0.19rem;
    color: $text-dark;
    margin-top: 0.12rem;
  }

  // ---- 技能标签 ----
  &__skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.08rem;
    margin-bottom: 0.12rem;
  }

  &__skill-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.04rem 0.06rem;
    font-size: 0.12rem;
    line-height: 0.18rem;
    color: $text-middle;
    background: #F3F4F6;
    border-radius: 0.04rem;

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

  // ---- 公司概况 ----
  &__company-head {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    margin-bottom: 0.12rem;
  }

  &__company-logo {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 0.08rem;
    background: #EDF9FA;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  &__company-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.08rem;
  }

  &__company-svg {
    width: 0.32rem;
    height: 0.32rem;
    color: #52CAD1;
  }

  &__company-name-info {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
  }

  &__company-name {
    font-size: 0.18rem;
    font-weight: 600;
    line-height: 0.24rem;
    color: $text-dark;
  }

  &__company-sub {
    font-size: 0.14rem;
    line-height: 0.19rem;
    color: $text-middle;
  }

  &__company-desc {
    font-size: 0.14rem;
    line-height: 0.24rem;
    color: $text-middle;
    margin: 0;
  }
}

// ---- 骨架屏区域 ----
.job-detail__skeleton {
  padding: 0.32rem;
}
