/* 留言墙页面（/comment/）专属样式
 * 页面结构见 source/comment/index.md，数据渲染见 /js/butterfly/comment-page.js
 * 复刻自 qiqi.ee（Nuxt 版 /comment）：留言概览 + 便利贴墙
 */

.cp-slogan {
  height: 32px;
  line-height: 32px;
  text-align: center;
  color: var(--font-color);
  font-size: 16px;
  margin: 0;
}

/* 留言概览 */
.cp-summary {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
}
.cp-summary-item {
  width: calc(100% / 4 - 10px);
  margin: 5px;
  padding: 14px 10px;
  background-color: #f7f9fa;
  border-radius: 10px;
  text-align: center;
}
.cp-summary-item .item-name {
  height: 24px;
  line-height: 24px;
  color: #53585c;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-summary-item .item-value {
  height: 32px;
  line-height: 32px;
  color: #1f1f1f;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 便利贴墙（多列瀑布流） */
.cp-wall {
  margin-top: 24px;
  column-count: 3;
  column-gap: 15px;
}
.cp-note {
  break-inside: avoid;
  position: relative;
  margin-bottom: 15px;
  padding: 32px 16px 14px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* 便利贴配色 */
.cp-note.note-0 { background-color: #fff8d6; }
.cp-note.note-1 { background-color: #ffe4e6; }
.cp-note.note-2 { background-color: #e0f2fe; }
.cp-note.note-3 { background-color: #e7f8e7; }
.cp-note.note-4 { background-color: #f3e8ff; }
.cp-note:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  z-index: 1;
}
.cp-note .pin {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff9d9d, #e05252);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.cp-note .content {
  color: #333;
  font-size: 15px;
  line-height: 26px;
  word-break: break-all;
  /* 最多显示 8 行 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-note .image {
  margin-top: 10px;
  border-radius: 6px;
  overflow: hidden;
}
.cp-note .image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.cp-note .foot {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  color: #6b6b6b;
  font-size: 13px;
}
.cp-note .foot span {
  margin-right: 10px;
  white-space: nowrap;
}
.cp-note .foot i {
  margin-right: 4px;
}
.cp-note .tag {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  border-radius: 5px;
  padding: 1px 6px;
}
.cp-note .likes {
  margin-left: auto;
  margin-right: 0;
  cursor: pointer;
  transition: color 0.3s ease;
}
.cp-note .likes:hover,
.cp-note .likes.liked {
  color: #eb7a4e;
}

.cp-empty {
  padding: 60px 0;
  text-align: center;
  color: #858585;
  font-size: 15px;
  column-span: all;
}

.cp-tip {
  margin-top: 8px;
  font-size: 14px;
}

/* 暗黑模式适配 */
[data-theme='dark'] .cp-summary-item {
  background-color: #2a2a2a;
}
[data-theme='dark'] .cp-summary-item .item-name {
  color: #a0a0a0;
}
[data-theme='dark'] .cp-summary-item .item-value {
  color: #e8e8e8;
}
[data-theme='dark'] .cp-note .content,
[data-theme='dark'] .cp-note .foot {
  color: #3a3a3a; /* 便利贴底色仍为浅色，文字保持深色 */
}

/* 屏幕宽度在 768px 到 1200px 之间 */
@media (min-width: 768px) and (max-width: 1200px) {
  .cp-wall {
    column-count: 2;
  }
}

/* 移动端 */
@media (max-width: 768px) {
  .cp-wall {
    column-count: 1;
  }
  .cp-summary .cp-summary-item {
    width: calc(100% / 2 - 10px);
  }
}
