@charset "utf-8";

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

/* 마지막 게시글 하단 밑줄 제거 */
.popular-posts-container .post-item:last-child{
  border-bottom:0 !important;
}
.tab-buttons {
    display: flex;
}

.tab-button {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-radius: 15px;
    background:#f3f4fb;
    margin:0px 5px;
}

.tab-button.active {
    color: #ffffff;
    font-weight: bold;
    background: #7346f3;
    border-radius: 15px;
    border:1px solid #7346f3;
}

.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;
    width:26px;
    height:22px;
    border-radius:6px;
    font-size:13px;
    font-weight:800;
    color:#fff;
    flex:0 0 26px;
    background:#9aa0a6; /* 기본 */
}

/* ✅ 1~10위 배지 색상 (첨부 이미지 느낌: 1위 강조 + 아래로 갈수록 톤다운) */
.post-rank.rank-1 { background:#7346f3; } /* 1위 보라 */
.post-rank.rank-2 { background:#111; }    /* 2위 거의 블랙 */
.post-rank.rank-3 { background:#2b2b2b; } /* 3위 다크 */
.post-rank.rank-4 { background:#70757a; } /* 4위 회색 */
.post-rank.rank-5 { background:#80868b; } /* 5위 */
.post-rank.rank-6 { background:#8a9096; } /* 6위 */
.post-rank.rank-7 { background:#949aa0; } /* 7위 */
.post-rank.rank-8 { background:#9ea4aa; } /* 8위 */
.post-rank.rank-9 { background:#a8aeb4; } /* 9위 */
.post-rank.rank-10{ background:#b2b8be; } /* 10위 */

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

.post-title .board-name{color:#7346f3}
.post-title:hover {
    color: #7346f3;
}

.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;
    }
    .popular-posts-container {
    padding: 15px 10px;
}
.tab-buttons{
    padding-bottom:10px;
}
    .post-rank {
        width:24px;
        height:20px;
        flex:0 0 24px;
        font-size:12px;
        border-radius:6px;
    }
    .posts-list {
    padding: 0px;
}
    .post-title {
        font-size: 14px;
    }
}
