/**
 * v7/bookmark/index.css - 즐겨찾기 관리 페이지 스타일
 *
 * v7 전용 CSS. Bootstrap 미사용.
 * 색상값은 하드코딩 (Web Awesome CSS 변수가 진한 색으로 오버라이드되는 문제 방지).
 */

/* === 페이지 헤더 === */
.bookmark-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.bookmark-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bookmark-page-title i {
    color: #f59e0b;
    font-size: 1rem;
}

/* === 로그인 필요 안내 === */
.bookmark-login-required {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.bookmark-login-required i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
    color: #cbd5e1;
}

.bookmark-login-required p {
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

/* === 레이아웃: 그룹 사이드바 + 목록 === */
.bookmark-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* === 그룹 사이드바 === */
.bookmark-groups-panel {
    width: 220px;
    flex-shrink: 0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.75rem;
}

.bookmark-groups-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
}

.bookmark-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.bookmark-group-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
    color: #334155;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    width: 100%;
}

.bookmark-group-item:hover {
    background: #e2e8f0;
}

.bookmark-group-item.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.bookmark-group-item i {
    font-size: 0.75rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.bookmark-group-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-group-count {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.bookmark-group-item.active .bookmark-group-count {
    color: #3b82f6;
}

.bookmark-group-delete-btn {
    background: none;
    border: none;
    padding: 0.15rem;
    font-size: 0.65rem;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.15s;
    flex-shrink: 0;
}

.bookmark-group-item:hover .bookmark-group-delete-btn {
    opacity: 1;
}

.bookmark-group-delete-btn:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* 새 그룹 입력 */
.bookmark-new-group {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.bookmark-new-group-input {
    flex: 1;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    background: #fff;
}

.bookmark-new-group-input:focus {
    border-color: #60a5fa;
}

.bookmark-new-group-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.bookmark-new-group-btn:hover {
    background: #1d4ed8;
}

/* === 즐겨찾기 목록 영역 === */
.bookmark-list-panel {
    flex: 1;
    min-width: 0;
}

.bookmark-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.bookmark-list-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* === 즐겨찾기 아이템 === */
.bookmark-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.5rem;
    border-radius: 8px;
    transition: background 0.15s;
}

.bookmark-item:hover {
    background: #f8fafc;
}

.bookmark-item + .bookmark-item {
    border-top: 1px solid #f1f5f9;
}

.bookmark-item-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.bookmark-item-icon.type-post {
    background: #eff6ff;
    color: #2563eb;
}

.bookmark-item-icon.type-comment {
    background: #f0fdf4;
    color: #16a34a;
}

.bookmark-item-icon.type-user {
    background: #fdf4ff;
    color: #a855f7;
}

.bookmark-item-icon.type-chat_room {
    background: #fff7ed;
    color: #ea580c;
}

/* === 채팅방 상대방 프로필 사진 === */
.bookmark-item-avatar {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.bookmark-chat-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
}

.bookmark-chat-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-item-body {
    flex: 1;
    min-width: 0;
}

.bookmark-item-link {
    display: block;
    font-size: 0.84rem;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-item-link:hover {
    color: #2563eb;
}

.bookmark-item-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.bookmark-item-type-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 4px;
    margin-right: 0.25rem;
}

.bookmark-item-type-badge.type-post {
    background: #eff6ff;
    color: #1d4ed8;
}

.bookmark-item-type-badge.type-comment {
    background: #f0fdf4;
    color: #15803d;
}

.bookmark-item-type-badge.type-user {
    background: #fdf4ff;
    color: #7e22ce;
}

.bookmark-item-type-badge.type-chat_room {
    background: #fff7ed;
    color: #c2410c;
}

.bookmark-remove-btn {
    background: none;
    border: none;
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.bookmark-remove-btn:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* === 빈 상태 === */
.bookmark-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}

.bookmark-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.bookmark-empty p {
    margin: 0;
    font-size: 0.85rem;
}

/* === 로딩 상태 === */
.bookmark-loading {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* === 모바일 반응형 === */
@media (max-width: 768px) {
    .bookmark-layout {
        flex-direction: column;
    }

    .bookmark-groups-panel {
        width: 100%;
    }

    .bookmark-group-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .bookmark-group-item {
        width: auto;
        padding: 0.35rem 0.6rem;
        font-size: 0.78rem;
    }

    .bookmark-group-delete-btn {
        opacity: 1;
    }

    .bookmark-item {
        padding: 0.5rem 0.25rem;
    }
}
