/**
 * Honor Forum - 帖子附件展示区样式
 */

/* ========== 附件展示容器 ========== */
.att-display {
  margin: 16px 0;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.att-section {
  margin-bottom: 16px;
}

.att-section:last-child {
  margin-bottom: 0;
}

.att-section-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== 图片网格 ========== */
.att-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.att-image-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: transform 0.15s, box-shadow 0.15s;
}

.att-image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.att-image-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

.att-image-name {
  padding: 4px 8px;
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 付费图片模糊效果 */
.att-image-blur {
  position: relative;
}

.att-image-blur img {
  filter: blur(15px) brightness(0.6);
  pointer-events: none;
}

.att-image-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.att-lock-icon {
  font-size: 32px;
}

.att-lock-text {
  font-size: 14px;
  font-weight: 600;
}

/* ========== 文件列表 ========== */
.att-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.att-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: background 0.15s;
}

.att-file-item:hover {
  background: #f0f4ff;
}

.att-file-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  flex-shrink: 0;
}

.att-file-info {
  flex: 1;
  min-width: 0;
}

.att-file-name {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.att-file-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #9ca3af;
}

.att-file-price {
  color: #f59e0b;
  font-weight: 500;
}

.att-file-action {
  flex-shrink: 0;
}

/* ========== 购买/下载按钮 ========== */
.att-buy-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.att-buy-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: scale(1.05);
}

.att-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.att-dl-btn:hover {
  background: #1557b0;
  color: #fff;
  text-decoration: none;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .att-image-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
  }

  .att-file-item {
    padding: 8px 10px;
    gap: 8px;
  }

  .att-file-icon {
    font-size: 22px;
    width: 36px;
    height: 36px;
  }
}
