/*
 * 게시판형 최신글 위젯 (m_board)
 * — 카드 안에 게시판 제목 헤더 + 글 목록 (제목 / 작성자 / 댓글수 / 시간)
 * — theme/basic 의 --m-* 토큰 그대로 사용
 */

.m-latest {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
    box-shadow: var(--m-shadow);
    overflow: hidden;
    display: flex; flex-direction: column;
}

.m-latest-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--m-border);
}
.m-latest-title { margin: 0; font-size: var(--m-text-lg); font-weight: 700; min-width: 0; }
.m-latest-title a { color: var(--m-text); text-decoration: none; }
.m-latest-title a:hover { color: var(--m-primary); }

.m-latest-more {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: var(--m-text-sm); color: var(--m-text-muted);
    text-decoration: none; flex-shrink: 0;
}
.m-latest-more:hover { color: var(--m-primary); }

.m-latest-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.m-latest-item {
    border-bottom: 1px solid var(--m-border);
}
.m-latest-item:last-child { border-bottom: 0; }
.m-latest-item:hover { background: var(--m-surface-2); }

.m-latest-link {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
    padding: 10px 18px 4px;
    color: var(--m-text); text-decoration: none;
    font-size: var(--m-text-md);
}
.m-latest-link:hover .m-latest-subject { color: var(--m-primary); }
.m-latest-secret { color: var(--m-text-faint); flex-shrink: 0; }

.m-latest-subject {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--m-text); font-weight: 500;
}

/* 공지 뱃지 — is_notice 글 앞에 작은 빨간 chip */
.m-latest-notice {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px; font-weight: 700; line-height: 1.4;
    background: #ef4444; color: #fff;
    flex-shrink: 0;
}

.m-latest-cmt {
    display: inline-flex; align-items: center;
    padding: 1px 6px;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}

.m-latest-tag {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px; font-weight: 700; line-height: 1.4;
    flex-shrink: 0;
}
.m-latest-tag-new { background: #ef4444; color: #fff; }
.m-latest-tag-hot { background: #f59e0b; color: #fff; }

.m-latest-mark { color: var(--m-text-faint); flex-shrink: 0; }

.m-latest-meta {
    display: flex; gap: 8px;
    padding: 0 18px 10px 18px;
    font-size: var(--m-text-xs); color: var(--m-text-faint);
}
.m-latest-meta .m-latest-name {
    color: var(--m-text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 120px;
}
.m-latest-meta .m-latest-date { margin-left: auto; }

.m-latest-empty {
    padding: 36px 18px;
    text-align: center;
    color: var(--m-text-faint);
    font-size: var(--m-text-sm);
}
