@charset "utf-8";

/* 인기 게시물 위젯 스타일 */
.popular-posts-container {
  max-width: 100%;
  margin: 16px auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.tab-button {
  flex: 1;
  padding: 15px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: background 0.3s ease;
}

.tab-button.active {
  color: #5850ec;
  font-weight: bold;
  background: #fff;
  border-bottom: 2px solid #5850ec;
}

.posts-list {
  padding: 15px;
}

.post-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.post-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  margin-right: 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  color: #666;
  background: #f5f5f5;
}

/* 1,2,3등 특별 스타일 */
.post-rank.top-rank {
  min-width: 28px;
  height: 28px;
  font-size: 14px;
  color: #fff;
  background: #ff6b6b;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.post-rank.top-rank.rank-1 {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.post-rank.top-rank.rank-2 {
  background: linear-gradient(135deg, #c0c0c0, #a9a9a9);
  box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.post-rank.top-rank.rank-3 {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
  box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.post-title {
  flex: 1;
  color: #333;
  text-decoration: none;
  margin-left: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-title:hover {
  color: #5850ec;
}

.post-comments {
  color: #5850ec;
  font-weight: bold;
  margin-left: 10px;
}

.empty-posts {
  text-align: center;
  padding: 20px;
  color: #888;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .tab-button {
    padding: 10px;
    font-size: 14px;
  }

  .post-rank {
    min-width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .post-rank.top-rank {
    min-width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .post-title {
    font-size: 14px;
  }
}
