/* newsList.css - 消息列表页面样式 */

.page {
  background: #f7f8fa;
  min-height: 100vh;
  position: relative;
}

/* Tab 切换区域 */
.new_hot {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.pull-to-refresh-content.refreshing {
  -webkit-transform: translate3d(0, 1rem, 0);
    transform: translate3d(0, 1rem, 0);
}

.pull-to-refresh-layer .preloader {
  margin-top: -1.4rem
}

.new_hot .buttons-tab {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.new_hot .buttons-tab .button {
  height: 2.5rem;
  line-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #9ca3af;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.new_hot .buttons-tab .button.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 500;
}

.line-height {
  display: none;
}

/* Tab 内容区域 - 覆盖 SUI .content 的 position:absolute */
.tabs.content {
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: calc(100vh - 2.5rem);
}

.tabs {
  margin-top: 0;
  padding: 0.75rem;
}

.tabs .tab {
  position: relative;
  top: 0;
}

/* 消息卡片 */
.news-box {
  background: #fff;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.news-box:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* 未读消息 - 标题左侧小红点（使用伪元素，无需JS生成） */
.news-box.unread::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  /* margin-right: 0.5rem; */
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  position: absolute;
  left: 8px;
  top: 24px;
}

/* 消息标题 */
.news-name {
  font-size: 0.9rem;
  color: #1f2937;
  flex: 1;
  min-width: 0;
  line-height: 1.5;
  word-break: break-all;
}

/* 消息描述/时间 */
.news-tips {
  font-size: 0.7rem;
  color: #9ca3af;
  display: block;
  margin-top: 0.25rem;
  width: 100%;
  line-height: 1.75;
}

/* 未读时 news-tips 左对齐到 news-name 位置（跳过红点宽度 8px + margin 0.5rem） */
.news-box.unread .news-tips {
  width: calc(100% - 8px - 0.5rem);
  /* margin-left: calc(8px + 0.5rem); */
}

/* 无数据状态 */
.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  margin-top: 0;
}

.no-data-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  opacity: 0.6;
  margin-bottom: 1rem;
}

.no-data-text {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* 下拉刷新层 */
.pull-to-refresh-content {
  top: 0;
}

.pull-to-refresh-layer {
  height: 0;
  background: #f7f8fa;
}

/* 无限滚动加载器 */
.infinite-scroll-preloader {
  padding: 1rem 0;
  text-align: center;
}

.infinite-scroll-preloader .preloader {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
