/* ===== RESET LIST (QUAN TRỌNG) ===== */
#cmt-list,
#cmt-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ===== ITEM ===== */
#comments .cmt-item {
    margin-bottom: 14px;
}

/* ===== FLEX ===== */
#comments .cmt-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0; /* 🔥 chống tràn */
}

/* ===== AVATAR ===== */
#comments .cmt-avatar {
    flex-shrink: 0; /* 🔥 không bị co */
}

#comments .cmt-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

/* ===== BODY ===== */
#comments .cmt-body {
    flex: 1;
    min-width: 0; /* 🔥 fix text dài */
}

/* ===== BUBBLE ===== */
#comments .cmt-bubble {
    background: #f1f3f6;
    padding: 10px 12px;
    border-radius: 16px;
}

/* ===== AUTHOR ===== */
#comments .cmt-author {
    font-size: 14px;
    font-weight: 600;
}

/* ===== TEXT ===== */
#comments .cmt-text {
    font-size: 14px;
    margin-top: 4px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word; /* 🔥 fix text dài */
}

/* ===== ACTION ===== */
#comments .cmt-actions {
    font-size: 12px;
    margin-top: 4px;
    color: #777;
}

#comments .cmt-actions a {
    margin-left: 10px;
    color: #1877f2;
    text-decoration: none;
}

/* ===== REPLY (FIX CHUẨN) ===== */
#comments .children {
    margin-top: 8px;
    margin-left: 48px; /* = avatar + gap */
}

/* avatar reply */
#comments .children .cmt-avatar img {
    width: 30px;
    height: 30px;
}

/* ===== REPLY BOX ===== */
#comments .reply-box {
    margin-top: 6px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    border: 1px solid #eee;
}

#comments .reply-box textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 13px;
    padding: 8px;
    border-radius: 10px;
    background: #f0f2f5;
}

#comments .reply-box button {
    margin-top: 6px;
    padding: 5px 12px;
    border-radius: 14px;
    border: none;
    background: #0d6efd;
    color: #fff;
    font-size: 12px;
}

/* ===== FORM ===== */
#comments .cmt-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
}

#comments .cmt-form button {
    margin-top: 6px;
    padding: 7px 16px;
    border-radius: 16px;
    background: #0d6efd;
    color: #fff;
    border: none;
}

/* ===== MOBILE FIX ===== */
@media (max-width: 768px) {

    #comments .cmt-wrap {
        gap: 8px;
    }

    #comments .cmt-avatar img {
        width: 32px;
        height: 32px;
    }

    #comments .children {
        margin-left: 38px; /* 🔥 giảm thụt */
    }

    #comments .cmt-text {
        font-size: 13.5px;
    }

    #comments .cmt-bubble {
        padding: 8px 10px;
    }

}



<!-- =========================
🔥 CSS POPUP
========================= -->
<style>
.comment-popup {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 99999;
}

.comment-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.comment-popup-box {
    position: relative;
    margin: auto;
    width: 600px;
    max-width: 95%;
    height: 80%;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.comment-popup-header {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.comment-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* MOBILE */
@media (max-width: 768px){
    .comment-popup-box{
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
</style>