/**
 * v7/css/utilities.css - v6 app.css 에서 추출한 유틸리티 클래스
 *
 * @see tmp/v7-layout-plan.md 섹션 6.2
 */

/* ===== data 태그를 block 으로 표시 (v6 호환) ===== */
data {
    display: block;
}

/* ===== 텍스트 줄 수 제한 ===== */
.line-clamp-1 {
    display: block;
    line-height: 1.4;
    height: 1.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    max-height: 2.8em;
}

/* ===== 폰트 크기 유틸리티 ===== */
.xs {
    font-size: 0.8em;
}

.sm {
    font-size: 0.9em;
}

/* ===== 콘텐츠 패딩 (모바일) ===== */
.v7-content-pad {
    padding: 0 8px;
}

@media (min-width: 992px) {
    .v7-content-pad {
        padding: 0;
    }
}

/* ===== 표시/숨김 유틸리티 ===== */
.v7-d-none {
    display: none;
}

.v7-d-block {
    display: block;
}

/* ===== 메뉴 링크 (v6 호환) ===== */
.menu-link {
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
}

.menu-link.sm {
    font-size: 0.9em;
}

.menu-link.xs {
    font-size: 0.8em;
}

/* ===== 섹션 제목 ===== */
.v7-section-title {
    font-size: 1em;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #7f1d1d;
}

/* ===== 채팅 읽지 않은 메시지 배지 ===== */
.v7-chat-unread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.65em;
    font-weight: 600;
    line-height: 1;
    position: absolute;
    top: 0px;
    right: 8px;
    transform: translate(100%, 0);
}

/* 탑바 채팅 링크 */
.v7-topbar-chat-link {
    position: relative;
}

/* 모바일 헤더 채팅 링크 */
.v7-mobile-chat-link {
    position: relative;
}

/* 사이드바 채팅 메뉴 아이템 */
.sidebar-chat-link {
    position: relative;
}

.sidebar-chat-link .v7-chat-unread-count {
    top: 2px;
    right: 8px;
    transform: translate(40%, -30%);


    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 0.98em;
}
