@use '../variables' as *;

// ==================== 简历列表页 ====================
.resume-page {
  &__content {
    margin-left: 2.2rem;
    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;
  }

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 0.19rem 0.24rem;
  }

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

  &__upload-btn {
    display: flex;
    align-items: center;
    gap: 0.06rem;
    background: $btn-dark;
    color: $bg-white;
    border: none;
    border-radius: 0.08rem;
    padding: 0.08rem 0.14rem;
    font-size: 0.13rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;

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

  // 从个人资料创建按钮（描边样式）
  &__create-btn {
    display: flex;
    align-items: center;
    gap: 0.06rem;
    background: $bg-white;
    color: $accent;
    border: 1px solid $accent;
    border-radius: 0.08rem;
    padding: 0.08rem 0.14rem;
    font-size: 0.13rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;

    &:hover {
      background: rgba($accent, 0.06);
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }

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

  // 表格容器（超出时可滚动）
  &__table-wrap {
    background: $bg-white;
    border-radius: 0.12rem;
    margin: 0.18rem 0.17rem;
    overflow-y: auto;
    flex: 0 1 auto;
    min-height: 0;
  }

  &__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  &__th {
    text-align: left;
    padding: 0.14rem 0.2rem;
    font-size: 0.12rem;
    font-weight: 600;
    color: $text-dark;
    border-bottom: 1px solid $border-color;
    white-space: nowrap;
    width: 15%;
    position: sticky;
    top: 0;
    background: $bg-white;
    z-index: 1;

    &--action {
      width: 25%;
    }
  }

  &__row {
    cursor: pointer;
    transition: background 0.15s;

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

    &:not(:last-child) {
      border-bottom: 1px solid $border-color;
    }
  }

  &__td {
    padding: 0.16rem 0.2rem;
    font-size: 0.13rem;
    color: $text-dark;
    vertical-align: middle;

    &--action {
      position: relative;
      text-align: center;
      opacity: 0;
      transition: opacity 0.15s;
    }

    &--ellipsis {
      max-width: 3.6rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  &__row:hover &__td--action {
    opacity: 1;
  }

  // 简历名称单元格
  &__name-cell {
    display: flex;
    align-items: center;
    gap: 0.06rem;
  }

  &__avatar {
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: $bg-white;
    font-size: 0.13rem;
    font-weight: 600;
    flex-shrink: 0;
  }

  &__name {
    font-weight: 500;
    max-width: 3.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__default-tag {
    font-size: 0.09rem;
    color: $accent;
    background: #EDF9FA;
    border-radius: 0.04rem;
    padding: 0.014rem 0.08rem;
    padding-bottom: 0.02rem;
    white-space: nowrap;
  }

  // 编辑名称岗位图标按钮
  &__edit-btn {
    background: none;
    border: none;
    color: $text-dark;
    cursor: pointer;
    padding: 0.02rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;

    &:hover {
      opacity: 0.6;
    }
  }

  &__edit-icon {
    font-size: 0.13rem;
  }

  // 操作按钮容器
  &__actions {
    display: flex;
    align-items: center;
    gap: 0.16rem;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  // 行内操作按钮
  &__action-btn {
    background: none;
    border: none;
    font-size: 0.12rem;
    color: $text-middle;
    cursor: pointer;
    padding: 0.04rem 0.08rem;
    border-radius: 0.04rem;
    white-space: nowrap;
    transition: all 0.15s;
    display: flex;
    align-items: center;

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

    // 删除按钮红色
    &--delete {
      color: #FD6464;

      &:hover {
        color: #e04545;
      }
    }
  }

  // 更多按钮（已移除，保留兼容）
  &__more-btn {
    background: none;
    border: none;
    color: $text-light;
    cursor: pointer;
    padding: 0.04rem;
    border-radius: 0.04rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;

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

  &__more-svg {
    width: 0.16rem;
    height: 0.16rem;
  }

  // 空状态提示
  &__empty {
    padding: 0.6rem 0.2rem;
    text-align: center;
    color: $text-light;
    font-size: 0.14rem;
  }
}

// ==================== 上传简历加载提示 ====================
.resume-upload-loading {
  .el-loading-spinner {
    .circular .path {
      stroke: $accent;
    }

    .el-loading-text {
      color: $accent;
    }
  }
}

// ==================== 导出简历弹窗样式修正 ====================
.resume-export-dialog {
  font-size: 0.14rem;
  .el-dialog__title {
    font-size: 16px;
    font-weight: 600;
  }

  .el-dialog__body {
    padding: 0.2rem 0.3rem 0.1rem;
  }

  /* 修正 radio 组件在 100px 基准下的尺寸 */
  &__radio-group {
    display: flex;
    gap: 0.16rem;

    .el-radio {
      font-size: 14px;
      height: auto;
      line-height: normal;

      .el-radio__inner {
        width: 14px;
        height: 14px;
      }

      .el-radio__label {
        font-size: 14px;
        padding-left: 8px;
      }
    }
  }

  .el-dialog__footer {
    padding: 0.12rem 0.3rem 0.24rem;

    .el-button {
      font-size: 13px;
      padding: 8px 20px;
      border-radius: 6px;
    }

    .el-button--primary {
      background: $btn-dark;
      border-color: $btn-dark;

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