@use '../variables' as *;

// ==================== 简历分析报告抽屉 ====================

// 遮罩层
.report-drawer-overlay {
  position: fixed;
  inset: 0;
  background: $overlay-bg;
  z-index: 2000;
}

// 遮罩层过渡动画
.report-drawer-overlay-enter-active,
.report-drawer-overlay-leave-active {
  transition: opacity 0.3s ease;
}
.report-drawer-overlay-enter-from,
.report-drawer-overlay-leave-to {
  opacity: 0;
}

// 抽屉主体
.report-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 8rem;
  height: var(--app-height, 100vh);
  background: $bg-main;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  font-size: 0.14rem;

  // ---- 顶部栏 ----
  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.16rem 0.24rem;
    border-bottom: 1px solid $border-color;
    background: $bg-white;
    flex-shrink: 0;
  }

  &__header-left {
    display: flex;
    align-items: center;
    gap: 0.1rem;
  }

  &__close-btn {
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    border: none;
    background: none;
    color: $text-dark;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;

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

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

  &__title {
    font-size: 0.16rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0;
  }

  &__update-time {
    font-size: 0.12rem;
    color: $text-light;
  }

  // ---- 可滚动内容区 ----
  &__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.2rem 0.24rem;
  }

  // ---- 评分概览 ----
  &__score-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: $bg-white;
    border-radius: 0.1rem;
    padding: 0.2rem 0.24rem;
  }

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

  &__grade-avatar {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 0.08rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: $text-dark;
    font-size: 0.24rem;
    font-weight: 700;
    background: $bg-main;
    flex-shrink: 0;
  }

  &__grade-badge {
    font-size: 0.12rem;
    font-weight: 600;
    color: $accent;
    display: flex;
    align-items: center;
    gap: 0.04rem;
    background: $theme-color;
    padding: 0.06rem 0.12rem;
    border-radius: 0.08rem;
    cursor: pointer;
  }

  &__grade-dot {
    font-size: 0.06rem;
    color: $accent;
  }

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

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

  &__score-num {
    font-size: 0.24rem;
    font-weight: 700;
    color: $text-dark;
    line-height: 1.2;
  }

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

  // ---- 评级提示语 ----
  &__grade-hint {
    font-size: 0.12rem;
    color: $text-middle;
    line-height: 1.6;
    margin: 0.12rem 0 0.2rem 0;
    padding: 0 0.04rem;
  }

  // ---- 结论 ----
  &__conclusion {
    margin-bottom: 0.24rem;
    margin-top: 0.3rem;
  }

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

  &__conclusion-text {
    font-size: 0.13rem;
    color: $text-dark;
    line-height: 1.8;
    margin: 0;
  }

  // ---- 核心问题 ----
  &__issues {
    margin-bottom: 0.2rem;
  }

  &__issue-card {
    background: $bg-white;
    border-radius: 0.1rem;
    padding: 0.2rem;
    margin-bottom: 0.12rem;
  }

  &__issue-title {
    font-size: 0.14rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.08rem 0;
  }

  &__issue-detail {
    font-size: 0.13rem;
    color: $text-middle;
    line-height: 1.8;
    margin: 0 0 0.14rem 0;
  }

  &__issue-why-label {
    font-size: 0.13rem;
    font-weight: 600;
    font-style: italic;
    color: $text-dark;
    margin: 0 0 0.06rem 0;
  }

  &__issue-importance {
    font-size: 0.13rem;
    color: $text-middle;
    line-height: 1.8;
    margin: 0;
  }

  // ---- 底部按钮 ----
  &__footer {
    padding: 0.16rem 0.24rem;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    background: $bg-main;
    border-top: 1px solid $border-color;
  }

  &__optimize-btn {
    width: 2.4rem;
    padding: 0.12rem 0;
    font-size: 0.15rem;
    font-weight: 600;
    color: $bg-white;
    background: $btn-dark;
    border: none;
    border-radius: 0.24rem;
    cursor: pointer;
    transition: background 0.2s;

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

// 抽屉滑入动画
.report-drawer-slide-enter-active,
.report-drawer-slide-leave-active {
  transition: transform 0.3s ease;
}
.report-drawer-slide-enter-from,
.report-drawer-slide-leave-to {
  transform: translateX(100%);
}
