/* =============================================
   Sidebar Widgets Plugin  (swg- prefix)
   ============================================= */

/* 공통 박스 */
.swg-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* 이벤트 타이틀 */
.swg-title {
    background: linear-gradient(135deg, #f59e0b, #e67e00);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 9px 9px 0 0;
}
.swg-title i { font-size: 11px; }
.swg-gear {
    margin-left: auto;
    color: rgba(255,255,255,.75) !important;
    font-size: 11px;
    text-decoration: none;
}
.swg-gear:hover { color: #fff !important; }

/* 이벤트 리스트 */
.swg-evt-list { list-style: none; padding: 0; margin: 0; }
.swg-evt-list li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 11px;
}
.swg-evt-list li:last-child { border-bottom: none; }
.swg-evt-list li a {
    flex: 1;
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.swg-evt-list li a:hover { color: #e63946; }
.swg-tag {
    background: #e63946;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.swg-pt { font-size: 10px; font-weight: 700; flex-shrink: 0; }
.swg-pt.plus { color: #e63946; }
.swg-pt.minus { color: #2196f3; }
.swg-date { color: #bbb; font-size: 10px; flex-shrink: 0; }

/* 탭 내비게이션 */
.swg-tab-nav {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
    padding: 0 6px;
    position: relative;
    gap: 0;
    border-radius: 9px 9px 0 0;
}
.swg-tab-btn {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 9px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all .18s;
}
.swg-tab-btn.active { color: #e63946; border-bottom-color: #e63946; background: #fff; }
.swg-tab-btn:hover:not(.active) { color: #555; }
.swg-tab-pane { display: none; }
.swg-tab-pane.active { display: block; }

/* 새 글/댓글 리스트 */
.swg-post-list { list-style: none; padding: 2px 0; margin: 0; }
.swg-post-list li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-bottom: 1px solid #f8f8f8;
    font-size: 11px;
}
.swg-post-list li:last-child { border-bottom: none; }
.swg-board {
    color: #fff;
    border-radius: 8px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.swg-post-list li a {
    flex: 1;
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.swg-post-list li a:hover { color: #e63946; }
.swg-time { color: #bbb; font-size: 10px; flex-shrink: 0; }

/* 랭킹 리스트 */
.swg-rank-list { list-style: none; padding: 2px 0; margin: 0; }
.swg-rank-list li {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
}
.swg-rank-list li:last-child { border-bottom: none; }
.swg-rank-no {
    width: 22px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
    line-height: 1;
}
.swg-rank-list li:nth-child(1) .swg-rank-no,
.swg-rank-list li:nth-child(2) .swg-rank-no,
.swg-rank-list li:nth-child(3) .swg-rank-no { font-size: 16px; }
.swg-avatar {
    width: 20px; height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #eee;
}
.swg-nick {
    flex: 1;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.swg-lv {
    font-size: 10px;
    color: #fff;
    background: #1a1a2e;
    border-radius: 10px;
    padding: 2px 7px;
    font-weight: 700;
    flex-shrink: 0;
}
.swg-rpt {
    font-size: 11px;
    color: #e63946;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}
.swg-rpt i { color: #f59e0b; margin-right: 2px; font-size: 10px; }
