/* 帮助中心页面样式 - 基于 UIPro Figma 设计 */
@use '@/styles/variables' as *;
@use '@/styles/mixins' as *;

.help {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  font-family: 'Noto Sans SC', $font-family-base;
}

/* 页面头部 */
.help__header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 960px;
}

.help__title {
  margin: 0;
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  color: #0f172a;
}

.help__desc {
  font-size: 16px;
  line-height: 24px;
  color: #6b7280;
}

/* 搜索框 */
.help__searchBox {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-top: 11px;
}

.help__searchIcon {
  width: 20px;
  height: 20px;
  color: #6b7280;
  margin-right: -28px;
  z-index: 1;
}

.help__searchInput {
  flex: 1;
  max-width: 928px;
  border-radius: 6px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  padding: 8px 12px 8px 36px;
  font-size: 16px;
  line-height: 24px;
  color: #0f172a;
  font-family: 'Noto Sans SC', $font-family-base;

  &::placeholder {
    color: #6b7280;
  }

  &:focus {
    outline: none;
    border-color: #0061a8;
  }
}

/* 通用卡片区块 */
.help__section {
  width: 100%;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  gap: 16px;
  max-width: 960px;
}

.help__sectionTitle {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  color: #0f172a;
}

/* 推荐文档卡片列表 */
.help__docCards {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

/* 单个推荐文档卡片 */
.help__docCard {
  flex: 1;
  min-width: 274px;
  border-radius: 8px;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  gap: 3px;
}

.help__docCardTitle {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: #0061a8;
  margin: 0;
}

.help__docCardDesc {
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;
  margin: 0;
}

.help__docCardFooter {
  align-self: stretch;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 13px;
}

.help__docCardQuestion {
  font-size: 12px;
  line-height: 16px;
  color: #6b7280;
}

.help__docCardBtns {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.help__docCardBtn {
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  gap: 4px;
  font-size: 12px;
  line-height: 16px;
  color: #0f172a;
  @include transition-fast;

  &:hover {
    background-color: #f9fafb;
  }

  svg {
    width: 16px;
    height: 16px;
  }
}

/* 文档列表表格 */
.help__tableWrapper {
  align-self: stretch;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  overflow: auto;
}

.help__table {
  min-width: 447px;
  display: flex;
  flex-direction: column;
}

.help__tableHead {
  background-color: #f8fafc;
  display: flex;
  align-items: center;
}

.help__tableHeadCell {
  padding: 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: #64748b;

  &--title {
    flex: 1;
    min-width: 164px;
  }

  &--category {
    flex: 1;
    min-width: 88px;
    max-width: 168px;
  }

  &--date {
    flex: 1;
    min-width: 103px;
    max-width: 202px;
  }

  &--rating {
    flex: 1;
    min-width: 92px;
    max-width: 193px;
    text-align: center;
  }
}

.help__tableBody {
  display: flex;
  flex-direction: column;
}

.help__tableRow {
  display: flex;
  align-items: center;
  border-top: 1px solid #e5e7eb;

  &:first-child {
    border-top: none;
  }
}

.help__tableCell {
  padding: 12px;
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;

  &--title {
    flex: 1;
    min-width: 164px;
    color: #0061a8;
    font-weight: 500;
    cursor: pointer;

    &:hover {
      text-decoration: underline;
    }
  }

  &--category {
    flex: 1;
    min-width: 88px;
    max-width: 168px;
  }

  &--date {
    flex: 1;
    min-width: 103px;
    max-width: 202px;
  }

  &--rating {
    flex: 1;
    min-width: 92px;
    max-width: 193px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
}

.help__ratingBtn {
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  border: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  @include transition-fast;

  &:hover {
    background-color: #f3f4f6;
  }

  svg {
    width: 20px;
    height: 20px;
    color: #64748b;
  }

  &--active svg {
    color: #0061a8;
  }
}

/* FAQ 和联系支持区域 */
.help__bottomSection {
  width: 100%;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 960px;
}

/* FAQ 卡片 */
.help__faqCard {
  flex: 1;
  min-width: 310px;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  gap: 16px;
}

.help__faqTitle {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  color: #0f172a;
}

.help__faqList {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help__faqItem {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.help__faqQuestion {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: #0f172a;
  margin: 0;
}

.help__faqAnswer {
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;
  margin: 0;
}

/* 联系支持卡片 */
.help__contactCard {
  flex: 1;
  min-width: 310px;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  gap: 16px;
}

.help__contactTitle {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  color: #0f172a;
}

.help__contactList {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help__contactItem {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.help__contactIcon {
  width: 24px;
  height: 24px;
  color: #0061a8;
  flex-shrink: 0;

  svg {
    width: 100%;
    height: 100%;
  }
}

.help__contactInfo {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.help__contactLabel {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: #0f172a;
  margin: 0;
}

.help__contactValue {
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;
  margin: 0;
}
