/* assets/css/profile.css - CLEANED */

/* ========================================= */
/* 1. LAYOUT & HEADER CARD */
/* ========================================= */
.profile-layout {
    width: 100%;
    max-width: 750px; 
    margin: 0 auto;
    padding-bottom: 50px;
}

.profile-header-card {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    overflow: visible; 
}

/* ẢNH BÌA */
.profile-cover {
    width: 100%;
    height: 220px;
    background-color: #333;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    position: relative;
    overflow: hidden;
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-section {
    padding: 0 20px 20px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ========================================= */
/* 2. AVATAR & INFO */
/* ========================================= */
.profile-avatar-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 4px;
    background-color: var(--bg-body); 
    position: absolute;
    top: -70px; 
    left: 20px; 
    z-index: 10;
}

.profile-avatar-big {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: #fff;
}

.profile-details {
    /* Đẩy nội dung xuống dưới avatar */
    margin-top: 80px; 
    width: 100%;
}

.profile-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 5px;
}

.profile-fullname {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 6px; 
}

.profile-fullname .fa-check-circle {
    font-size: 1.2rem;
    margin-top: 2px;
}

.profile-username {
    display: block;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.profile-bio {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

/* ========================================= */
/* 3. STATS */
/* ========================================= */
.profile-stats {
    display: flex;
    gap: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.stat-item {
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
}
.stat-item b {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 4px;
}

/* ========================================= */
/* 4. BUTTONS */
/* ========================================= */
.btn-profile-action {
    padding: 0 24px;
    height: 36px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit, .btn-message {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-edit:hover, .btn-message:hover {
    background-color: var(--icon-hover-bg);
}

.btn-follow {
    background-color: var(--text-main);
    color: var(--bg-body);
    border: 1px solid var(--text-main);
}
.btn-follow:hover { opacity: 0.9; }

/* ĐANG FOLLOW (BỎ THEO DÕI) */
.btn-follow.following {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-follow.following:hover {
    border-color: #ff3b5b;
    color: #ff3b5b;
    background-color: rgba(255, 59, 91, 0.05);
}
.btn-follow.following:hover span {
    display: none;
}
.btn-follow.following:hover::after {
    content: "Bỏ theo dõi";
}

/* ========================================= */
/* 5. FEED & RESPONSIVE */
/* ========================================= */
.profile-feed .feed-title {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--text-main);
    margin-left: 5px;
}

.no-posts-box {
    text-align: center; 
    padding: 50px 20px; 
    color: var(--text-muted);
    background-color: var(--bg-body); 
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

@media (max-width: 600px) {
    .profile-avatar-container {
        width: 100px; 
        height: 100px;
        top: -50px; 
        left: 15px;
    }
    .profile-details { 
        margin-top: 60px; 
    }
    .profile-fullname { 
        font-size: 1.3rem; 
    }
    .profile-stats { 
        gap: 15px; 
        justify-content: space-between; 
    }
    .stat-item { 
        font-size: 0.8rem; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
    }
}

/* Style cho nút Nhắn tin giống Messenger */
.btn-message-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Khoảng cách giữa icon và chữ */
    
    background-color: #0084ff; /* Màu xanh đặc trưng của Messenger */
    color: #ffffff !important;
    
    padding: 8px 16px;
    border-radius: 6px; /* Bo góc nhẹ */
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-message-profile:hover {
    background-color: #0073e6; /* Màu đậm hơn khi di chuột */
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-message-profile i {
    font-size: 1.1rem; /* Kích thước icon */
}

.profile-info-list .info-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-info-list b {
    font-weight: 600;
}
.btn-message {
    background-color: #0084ff;
    /* Màu xanh Messenger */
    color: white;
    border: none;
}

.btn-message:hover {
    background-color: #0073e6;
}

/* Icon nhắn tin */
.btn-message i {
    margin-right: 5px;
}

/* CSS cho video */
.post-video-container {
    max-width: 100%;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 8px;
}

.post-video-container video {
    width: 100%;
    display: block;
}