/* ======================================================================
   Comment.css - shared comment component (restyled 2026-08-18)
   ----------------------------------------------------------------------
   Skin for every comment box on the site (.comment-box / .comment-item /
   reply threads / single pinned input / edit mode). Pairs with Comment.js
   (markup builder - classes are fixed there and in the server-rendered
   GetRenderComment: a.cm-avt > img, div.cm-content > a.cm-name + text).
   Loaded globally from Site.master right after Site.css.

   Design: neutral bubbles on --cq-light, meta row in muted 12px, pill
   input with brand-green send button, soft 3-dot menu, threaded replies
   with a hairline rail. All sizes/colors via Theme.css tokens.
   The dark VIEWER skin (.popup-idea #boxDetailIdea ...) lives at the END
   of THIS file too ("VIEWER DARK" section) - MediaView.css holds no
   comment styles anymore. One file owns every comment style on the site.
   ====================================================================== */

/* ---------- list shell ---------- */
.comment-list { margin: 0 0 10px; }

.comment-box > .show-more { padding: 10px 0; }
.comment-box .show-more a {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cq-muted, #6b7a88);
    background: var(--cq-light, #f1f4f6);
    border-radius: 999px;
    padding: 5px 14px;
    cursor: pointer;
    text-decoration: none;
}
.comment-box .show-more a:hover { color: var(--cq-green, #12836a); }
.comment-box .show-more a:empty { display: none; }

/* ---------- one comment ---------- */
.comment-item {
    position: relative;
    margin-bottom: 10px;
    padding: 0 0 0 46px;
}

.comment-item .cm-avt { position: absolute; left: 0; top: 0; }
.comment-item .cm-avt img {
    width: 36px;
    height: 36px !important;   /* Site.css: global img{height:auto !important} */
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.comment-item .cm-content {
    display: inline-block;
    max-width: 100%;
    background: var(--cq-light, #f1f4f6);
    border-radius: 4px 16px 16px 16px;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--cq-text, #1e2a35);
    overflow-wrap: anywhere;
}
.comment-item .cm-content .cm-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--cq-text, #1e2a35);
    text-decoration: none;
    margin-bottom: 1px;
}
.comment-item .cm-content .cm-name:hover { color: var(--cq-green, #12836a); }

/* own comment: brand-tinted bubble */
.comment-item.owner .cm-content { background: #eaf4f0; }

/* mention chip inside a reply */
.cm-name-link {
    background: #e3efeb;
    color: var(--cq-green, #12836a);
    border-radius: 6px;
    padding: 0 4px;
    font-weight: 600;
}

/* attached images */
.comment-item .cm-list-medias { margin-top: 6px; }
.comment-item .cm-list-medias img { max-height: 200px; border-radius: 12px; display: block; }
.comment-item .cm-list-medias a { display: inline-block; margin: 2px 4px 2px 0; }

/* ---------- meta row: "Trả lời · date" ---------- */
.comment-item .cm-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--cq-muted, #6b7a88);
    padding: 3px 0 0 14px;
}
.comment-item .cm-action .clear { display: none; }
.comment-item .cm-reply {
    font-weight: 600;
    color: var(--cq-muted, #6b7a88);
    cursor: pointer;
    text-decoration: none;
    /* comfortable tap target without growing the row visually */
    padding: 4px 2px;
    margin: -4px 0;
}
.comment-item .cm-reply:hover { color: var(--cq-green, #12836a); }
.comment-item .cm-date { float: none; font-size: 12px; }
.comment-item .cm-date::before { content: "·"; margin-right: 4px; }

/* ---------- 3-dot menu ---------- */
.comment-item .cm-button { position: absolute; right: 0; top: 2px; display: none; }
.comment-item.owner .cm-button { display: block; }
.comment-item .cm-button > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--cq-muted, #6b7a88);
    cursor: pointer;
}
.comment-item .cm-button > a:hover { background: var(--cq-light, #f1f4f6); }
.comment-item .cm-button ul {
    list-style: none;
    margin: 4px 0 0;
    padding: 6px;
    position: absolute;
    right: 0;
    width: 170px;
    background: #fff;
    border: 1px solid var(--cq-border, #e3e8ec);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(20, 32, 40, .14);
    font-size: 13px;
    z-index: 11;
    display: none;
}
.comment-item .cm-button ul li { margin: 0; }
.comment-item .cm-button ul a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    line-height: 1.2;
    color: var(--cq-text, #1e2a35);
    cursor: pointer;
    text-decoration: none;
}
.comment-item .cm-button ul a:hover { background: var(--cq-light, #f1f4f6); }
.comment-item .cm-button ul a i {
    width: 16px;
    text-align: center;
    border: 0;
    border-radius: 0;
    color: var(--cq-muted, #6b7a88);
}
.comment-item .cm-button .cm-button-close {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: none;
}
.comment-item .cm-button.open .cm-button-close,
.comment-item .cm-button.open ul { display: block; }

/* ---------- reply thread ---------- */
.comment-box-reply { position: relative; padding: 0 0 0 46px; margin-bottom: 10px; }
/* hairline rail under the parent avatar */
.comment-box-reply::before {
    content: "";
    position: absolute;
    left: 17px;
    top: -6px;
    bottom: 0;
    width: 2px;
    border-radius: 2px;
    background: var(--cq-border, #e3e8ec);
}
.comment-box-reply .comment-list,
.comment-box-reply .comment-input { display: none; }
.comment-box-reply.open .comment-list,
.comment-box-reply.open .comment-input { display: block; }
.comment-box-reply > .show-more { margin-top: -4px; padding: 0 0 6px; font-size: 12px; }

/* nested comments: smaller avatar */
.comment-box .comment-list .comment-list .comment-item { padding: 0 0 0 38px; }
.comment-box .comment-list .comment-list .comment-item .cm-avt img { width: 28px; height: 28px !important; }

/* ---------- "Đang trả lời <tên> ✕" banner ---------- */
.cm-dang-tra-loi {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--cq-muted, #6b7a88);
    background: var(--cq-light, #f1f4f6);
    border-radius: 999px;
    padding: 5px 12px;
    margin: 0 0 6px;
    width: fit-content;
}
.cm-dang-tra-loi.hien { display: flex; }
.cm-dang-tra-loi .cm-ten { color: var(--cq-green, #12836a); }
.cm-dang-tra-loi .cm-huy-tra-loi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--cq-muted, #6b7a88);
}
.cm-dang-tra-loi .cm-huy-tra-loi:hover { background: #fff; color: var(--cq-text, #1e2a35); }

/* ---------- single pinned input (pill) ----------
   Flex row: editor pill stretches, send button is its own green pill AFTER
   it. No pixel-tuned absolute offsets - button width follows its font, so
   nothing overlaps on any DPI/zoom. */
.comment-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 42px;
    min-height: 36px;
}
.comment-input .avt {
    position: absolute;
    left: 0;
    top: 1px;
    width: 34px;
    height: 34px !important;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
}
/* ONE pill only: the editor's inner .wrap-text (generic Site.css rule paints
   it grey with 140px padding for every editor) is restyled here to be THE
   pill; the .ContentEditor host stays an invisible container - otherwise the
   two nested boxes show as a short pill with the send button outside it. */
.comment-input .ContentEditor {
    border: 0;
    background: transparent;
    padding-right: 0;
    min-height: 36px;
    flex: 1;
    min-width: 0;
}
.comment-input .ContentEditor .wrap-text {
    position: relative;           /* anchor for the smiley toolbar */
    background: #fff;
    border: 1px solid var(--cq-border, #e3e8ec);
    border-radius: 18px;
    min-height: 36px;
    padding: 0 44px 0 0;          /* room for the smiley only */
    transition: border-color .15s ease;
}
.comment-input .ContentEditor:focus-within .wrap-text { border-color: var(--cq-green, #12836a); }
.comment-input .ContentEditor .wrap-text > .text,
.comment-input .ContentEditor .wrap-text > .placeholder { padding: 8px 0 8px 14px; }
/* editor extras inside the pill: smiley sits just before the send button.
   The image-upload camera is a dead control here (commentapi calls
   setmaxfile(0)) but the editor plugin still renders it - hide it.
   (Plugin-generated DOM - cannot remove the markup at the source.) */
/* ONE anchoring pattern everywhere (same as the viewer used): the smiley's
   zero-width .toolbar (Site.css parks it at right:128px, and the editor JS
   assigns stale inline coords to .smile-icon) is re-anchored inside the
   pill's right edge, vertically centered. !important beats the inline
   coords the editor plugin writes. */
.comment-input .ContentEditor .toolbar {
    position: absolute;
    left: auto !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
}
.comment-input .ContentEditor .smile-icon {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
}
.comment-input .ContentEditor .contenteditor-upload { display: none; }
.comment-input .btn-comment-send {
    position: static;
    flex: 0 0 auto;
    margin: 0;
    height: 36px;
    line-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: 0;
    background: var(--cq-green, #12836a);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    float: none;
    cursor: pointer;
    white-space: nowrap;
}
.comment-input .btn-comment-send:hover { filter: brightness(1.08); }
.comment-input .btn-comment-send.dang-gui { opacity: .55; pointer-events: none; }
.comment-box .ContentEditor .smile-icon-list { left: 0; right: auto; }

/* ---------- edit mode ---------- */
.comment-item.edit .cm-content,
.comment-item.edit .cm-list-medias,
.comment-item.edit .cm-action,
.comment-item.edit .cm-button { display: none; }
/* save/cancel are flex siblings after the pill (DOM order: editor, save,
   cancel) - no absolute offsets, so button width can follow the font. */
.comment-item .cm-save,
.comment-item .cm-cancel {
    position: static;
    flex: 0 0 auto;
    height: 32px;
    line-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    float: none;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}
.comment-item .cm-save { background: var(--cq-green, #12836a); color: #fff; }
.comment-item .cm-cancel { background: var(--cq-light, #f1f4f6); color: var(--cq-muted, #6b7a88); }
.comment-item.edit { padding-right: 0; }
.comment-item.edit .comment-input { margin-top: 2px; }

/* ---------- legacy idea-dialog layout (question fallback keeps it) ---------- */
#boxDetailIdea > .comment-input {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding-left: 50px;
    margin: 10px 0;
}
#boxDetailIdea > .comment-input .avt { width: 44px; height: 44px !important; top: -6px; }
#boxDetailIdea .comment-item { background: transparent; margin-bottom: 0; }

/* ---------- mobile ---------- */
@media (max-width: 767px) {
    .comment-item .cm-action { padding-top: 5px; }
    .comment-item .cm-reply { padding: 8px 4px; margin: -8px 0; }   /* ~44px tap zone */
    .comment-input .ContentEditor .wrap-text { min-height: 40px; border-radius: 20px; }
    .comment-input .avt { width: 38px; height: 38px !important; }
    .comment-input { padding-left: 46px; min-height: 40px; }
    .comment-input .btn-comment-send { height: 40px; line-height: 40px; }
}


/* ======================================================================
   VIEWER DARK (.popup-idea) - moved verbatim from MediaView.css 2026-08-18
   ----------------------------------------------------------------------
   Dark-theme skin + viewer-shell layout for comments inside the image
   viewer (MediaView overlay AND the legacy question dialog - both use the
   .popup-idea / #boxDetailIdea shell). One file now owns every comment
   style on the site.
   ====================================================================== */
@media (min-width: 768px) {
            /* ==============================================================
               BÌNH LUẬN — kiểu bong bóng chat trên nền tối
               --------------------------------------------------------------
               ⚠ BẪY ĐỘ ƯU TIÊN, đã dính: Site.css có
                     #boxDetailIdea .comment-item { background: white }
                 dùng ID (1,1,0) nên đè bẹp mọi luật kiểu ".popup-idea
                 .comment-box *" (0,2,0). Kết quả: từng bình luận là một
                 khối TRẮNG nằm chình ình trên nền tối.
                 => Mọi luật ở dưới PHẢI có "#boxDetailIdea" thì mới thắng.
               ============================================================== */
            .popup-idea #boxDetailIdea .comment-box { color: rgba(255,255,255,.78); }
            .popup-idea #boxDetailIdea .comment-box { padding: 4px 22px 8px; }

            .popup-idea #boxDetailIdea .comment-item {
                position: relative;
                background: transparent;
                padding: 0 0 0 44px;
                margin-bottom: 16px;
            }

            .popup-idea #boxDetailIdea .comment-item .cm-avt {
                position: absolute;
                left: 0;
                top: 0;
                margin: 0;
            }

            .popup-idea #boxDetailIdea .comment-item .cm-avt img {
                width: 34px;
                height: 34px;
                border-radius: 50%;
                object-fit: cover;
                background: rgba(255,255,255,.10);
            }

            /* Tên + nội dung nằm chung một khối mờ.
               ⚠ Vuông, KHÔNG bo góc — đồng bộ với ảnh nhỏ và hàng nút đã bỏ
                 bo góc. Bong bóng bo tròn kiểu chat trộn với phần còn lại
                 vuông cạnh thì nhìn chỏi. */
            .popup-idea #boxDetailIdea .comment-item .cm-content {
                display: block;
                background: rgba(255,255,255,.08);
                border-radius: 0;
                padding: 9px 13px;
                color: rgba(255,255,255,.82);
                font-size: 13.5px;
                line-height: 1.55;
            }

            .popup-idea #boxDetailIdea .comment-item .cm-name {
                display: block;
                margin-bottom: 2px;
                color: #ffffff;
                font-weight: 700;
                font-size: 12.5px;
            }

            /* Hàng dưới: Trả lời · ngày */
            .popup-idea #boxDetailIdea .comment-item .cm-action {
                display: flex;
                align-items: center;
                gap: 14px;
                margin: 6px 0 0 4px;
                color: rgba(255,255,255,.45);
                font-size: 11.5px;
                font-weight: 600;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-action .clear { display: none; }
            .popup-idea #boxDetailIdea .comment-item .cm-action .cm-reply {
                color: rgba(255,255,255,.72);
                cursor: pointer;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-action .cm-reply:hover { color: #ffffff; }

            /* Nút 3 chấm của từng bình luận: nằm góc phải, chỉ rõ khi rê vào */
            .popup-idea #boxDetailIdea .comment-item .cm-button {
                position: absolute;
                right: 0;
                top: 2px;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-button > a {
                color: rgba(255,255,255,.28);
                transition: color .15s ease;
            }
            .popup-idea #boxDetailIdea .comment-item:hover .cm-button > a { color: rgba(255,255,255,.72); }
            .popup-idea #boxDetailIdea .comment-item .cm-button ul {
                right: 0;
                background: var(--cq-dark);
                border: 1px solid rgba(255,255,255,.12);
                box-shadow: 0 12px 34px rgba(0,0,0,.42);
            }
            .popup-idea #boxDetailIdea .comment-item .cm-button ul a { color: rgba(255,255,255,.82); }
            .popup-idea #boxDetailIdea .comment-item .cm-button ul a:hover { background: rgba(255,255,255,.09); }

            /* Không có ảnh đính kèm thì đừng chừa chỗ trống */
            .popup-idea #boxDetailIdea .cm-list-medias:empty { display: none; }

            /* Trả lời lồng: thụt vào + một vạch dọc mảnh cho thấy quan hệ */
            .popup-idea #boxDetailIdea .comment-item .comment-list {
                margin: 10px 0 0;
                padding-left: 14px;
                border-left: 2px solid rgba(255,255,255,.12);
            }

            /* Chưa có bình luận -> nói ra, đừng để trống trơn */
            .popup-idea #boxDetailIdea .comment-box > .comment-list:empty {
                display: block;
                padding: 26px 0;
                text-align: center;
                color: rgba(255,255,255,.38);
                font-size: 13px;
            }
            .popup-idea #boxDetailIdea .comment-box > .comment-list:empty:after {
                content: "Chưa có bình luận — hãy là người đầu tiên";
            }

            /* ---------- Dải "Đang trả lời <tên> ✕" ----------
               page.js nay chỉ dựng MỘT ô nhập duy nhất; bấm "Trả lời" thì ô
               đó chuyển chế độ và dải này hiện lên ngay trên nó. Nhờ vậy
               không bao giờ còn cảnh 2 ô nhập cùng lúc. */
            .popup-idea #boxDetailIdea .cm-dang-tra-loi { display: none; }
            /* ⚠ PHẢI neo tuyệt đối ngay TRÊN ô nhập. #boxDetailIdea xếp kiểu
               tuyệt đối: khu cuộn chiếm top:0→bottom:76px, ô nhập chiếm 76px
               đáy. Dải này ở luồng thường sẽ rơi lên ĐỈNH cột, đè tên tác
               giả — cách ô nhập mà nó đang giải thích cả một màn hình. */
            .popup-idea #boxDetailIdea .cm-dang-tra-loi.hien {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 76px;
                z-index: 6;
                display: flex;
                align-items: center;
                gap: 10px;
                margin: 0;
                padding: 8px 22px;
                background: var(--cq-dark);
                border-top: 1px solid rgba(255,255,255,.10);
                color: rgba(255,255,255,.72);
                font-size: 12.5px;
            }
            .popup-idea #boxDetailIdea .cm-dang-tra-loi .cm-ten { color: #ffffff; font-weight: 700; }
            .popup-idea #boxDetailIdea .cm-dang-tra-loi .cm-huy-tra-loi {
                margin-left: auto;
                padding: 2px 6px;
                color: rgba(255,255,255,.55);
                cursor: pointer;
            }
            .popup-idea #boxDetailIdea .cm-dang-tra-loi .cm-huy-tra-loi:hover { color: #ffffff; }

            /* Bỏ nút chèn ảnh trong ô soạn (chức năng đã tắt ở page.js) */
            .popup-idea #boxDetailIdea .comment-input .toolbar .fa-camera,
            .popup-idea #boxDetailIdea .comment-input .list-file { display: none !important; }

            /* ---------- Icon mặt cười: neo sát mép phải ô nhập ----------
               ⚠ Bộ soạn thảo đặt .toolbar theo TOẠ ĐỘ TUYỆT ĐỐI tính cho bố
                 cục cũ (có nút máy ảnh đứng trước). Bỏ máy ảnh đi thì toạ độ
                 đó thành sai: mặt cười đứng lửng giữa ô, chừa một mảng nền
                 xám trống bên phải — nhìn như có thêm một cái ô thứ hai.
                 Sửa: neo .toolbar vào chính ô nhập (.wrap-text), dán mép
                 phải, căn giữa theo chiều dọc. */
            .popup-idea #boxDetailIdea .comment-input .wrap-text {
                position: relative;
                padding-right: 38px;      /* chừa chỗ cho mặt cười, chữ không chui xuống dưới */
            }

            .popup-idea #boxDetailIdea .comment-input .toolbar {
                position: absolute;
                right: 6px;
                top: 50%;
                transform: translateY(-50%);
                width: auto;
                height: auto;
                margin: 0;
                padding: 0;
            }

            /* ⚠ !important là BẮT BUỘC ở đây: bộ soạn thảo tự tính rồi gán
               thẳng right:-66px; top:-30px cho .smile-icon (toạ độ của bố
               cục cũ). Không có !important thì luật này thua, mặt cười văng
               ra ngoài ô, đè lên nút "Đăng". */
            .popup-idea #boxDetailIdea .comment-input .smile-icon {
                position: static !important;
                right: auto !important;
                top: auto !important;
                left: auto !important;
                display: flex;
                align-items: center;
                justify-content: center;
                width: 26px;
                height: 26px;
                margin: 0;
            }

            .popup-idea #boxDetailIdea .comment-input .smile-icon > a {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 26px;
                height: 26px;
                color: rgba(255,255,255,.45);
                font-size: 16px;
                line-height: 1;
            }
            .popup-idea #boxDetailIdea .comment-input .smile-icon > a:hover { color: #ffffff; }

            /* Khối rỗng còn sót của phần tải ảnh -> không chiếm chỗ nữa */
            .popup-idea #boxDetailIdea .comment-input .contenteditor-upload { display: none !important; }

            /* "Xem thêm bình luận" */
            .popup-idea #boxDetailIdea .show-more a {
                display: inline-block;
                padding: 6px 0;
                color: var(--cq-green);
                font-size: 13px;
                font-weight: 600;
                cursor: pointer;
            }

            /* ---------- Ô nhập: xếp 1 hàng bằng flex ----------
               ⚠ Gốc là display:block + nút "Đăng" float:right + avatar
                 position:absolute. Nút float không ăn theo chiều cao của ô
                 chữ nên nó bị đội lên trên, lệch hẳn so với khung nhập.
                 Chuyển cả hàng sang flex + align-items:center thì avatar,
                 ô chữ và nút tự cân giữa theo nhau. */
            .popup-idea #boxDetailIdea > .comment-input {
                display: flex;
                align-items: center;
                gap: 10px;
                margin: 0;
                padding: 14px 22px 18px;
                background: none;
                border-top: 1px solid rgba(255, 255, 255, 0.14);
            }

            .popup-idea #boxDetailIdea > .comment-input .ContentEditor,
            .popup-idea #boxDetailIdea > .comment-input .wrap-text {
                flex: 1 1 auto;
                min-width: 0;
                margin: 0;
            }

            /* ⚠ position:absolute + top:0 mới là thủ phạm làm nút "Đăng" đội
               lên (Site.css), KHÔNG phải float. Phần tử neo tuyệt đối bị lấy
               ra khỏi luồng nên align-items:center của flex không với tới
               được. Phải ép về static thì nó mới thành ô flex và tự cân giữa. */
            .popup-idea #boxDetailIdea > .comment-input .btn-comment-send {
                position: static !important;
                float: none !important;
                flex: 0 0 auto;
                margin: 0;
                align-self: center;
            }

            /* Ô viết bình luận KHÔNG phải thẻ input — nó là div contenteditable
               (.ContentEditor) nằm trong .wrap-text. Nhắm vào input/textarea
               không ăn gì cả, ô vẫn trắng giữa nền tối. */
            .popup-idea .comment-input .wrap-text,
            .popup-idea .comment-input .ContentEditor,
            .popup-idea #boxDetailIdea > .comment-input input,
            .popup-idea #boxDetailIdea > .comment-input textarea {
                background: rgba(255, 255, 255, 0.08) !important;
                border-color: rgba(255, 255, 255, 0.14);
                color: #ffffff;
            }

            /* Chữ gợi ý trong ô nhập */
            .popup-idea .comment-input .ContentEditor:empty:before {
                color: rgba(255, 255, 255, 0.45);
            }

            /* Avatar: gỡ khỏi kiểu neo tuyệt đối để nằm trong hàng flex */
            .popup-idea #boxDetailIdea > .comment-input .avt {
                position: static;
                flex: 0 0 32px;
                left: auto;
                top: auto;
                width: 32px;
                height: 32px;
                border: 0;
                box-shadow: none;
            }

            .popup-idea #boxDetailIdea > .comment-input .btn-comment-send {
                border-radius: 0 14px 14px 0;
                background: var(--cq-green);
                border-color: var(--cq-green);
            }
}

@media (max-width: 767px) {
            /* ---------- Bình luận ---------- */
            .popup-idea #boxDetailIdea .comment-box { padding: 4px 16px 8px; color: rgba(255,255,255,.78); }
            .popup-idea #boxDetailIdea .comment-item {
                position: relative; background: transparent; padding: 0 0 0 44px; margin-bottom: 16px;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-avt { position: absolute; left: 0; top: 0; margin: 0; }
            .popup-idea #boxDetailIdea .comment-item .cm-avt img {
                width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-content {
                display: block; background: rgba(255,255,255,.08); border-radius: 0;
                padding: 9px 13px; color: rgba(255,255,255,.82); font-size: 13.5px; line-height: 1.55;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-name {
                display: block; margin-bottom: 2px; color: #fff; font-weight: 700; font-size: 12.5px;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-action {
                display: flex; align-items: center; gap: 14px; margin: 6px 0 0 4px;
                color: rgba(255,255,255,.45); font-size: 11.5px; font-weight: 600;
            }
            .popup-idea #boxDetailIdea .comment-item .cm-action .clear { display: none; }
            .popup-idea #boxDetailIdea .comment-item .cm-action .cm-reply { color: rgba(255,255,255,.72); }
            .popup-idea #boxDetailIdea .comment-item .cm-button { position: absolute; right: 0; top: 2px; }
            .popup-idea #boxDetailIdea .comment-item .cm-button > a { color: rgba(255,255,255,.35); }
            .popup-idea #boxDetailIdea .comment-item .cm-button ul {
                right: 0; background: var(--cq-dark); border: 1px solid rgba(255,255,255,.12);
            }
            .popup-idea #boxDetailIdea .comment-item .cm-button ul a { color: rgba(255,255,255,.82); }
            .popup-idea #boxDetailIdea .cm-list-medias:empty { display: none; }
            .popup-idea #boxDetailIdea .comment-item .comment-list {
                margin: 10px 0 0; padding-left: 14px; border-left: 2px solid rgba(255,255,255,.12);
            }
            .popup-idea #boxDetailIdea .comment-box > .comment-list:empty {
                display: block; padding: 22px 0; text-align: center;
                color: rgba(255,255,255,.38); font-size: 13px;
            }
            .popup-idea #boxDetailIdea .comment-box > .comment-list:empty:after {
                content: "Chưa có bình luận — hãy là người đầu tiên";
            }
            .popup-idea #boxDetailIdea .show-more a { color: var(--cq-green); font-size: 13px; font-weight: 600; }

            /* ---------- Ô nhập ghim đáy ---------- */
            .popup-idea #boxDetailIdea > .comment-input {
                position: fixed;
                left: 0; right: 0; bottom: 0;
                z-index: 8;
                display: flex;
                align-items: center;
                gap: 10px;
                margin: 0;
                padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
                background: var(--cq-dark);
                border-top: 1px solid rgba(255,255,255,.12);
            }
            .popup-idea #boxDetailIdea > .comment-input .avt {
                position: static; flex: 0 0 30px; width: 30px; height: 30px; margin: 0; border: 0;
            }
            .popup-idea #boxDetailIdea > .comment-input .ContentEditor,
            .popup-idea #boxDetailIdea > .comment-input .wrap-text {
                flex: 1 1 auto; min-width: 0; margin: 0;
                background: rgba(255,255,255,.08) !important;
                border-color: rgba(255,255,255,.14);
                color: #fff;
            }
            .popup-idea #boxDetailIdea .comment-input .wrap-text { position: relative; padding-right: 36px; }
            .popup-idea #boxDetailIdea .comment-input .toolbar {
                position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
                width: auto; height: auto; margin: 0; padding: 0;
            }
            .popup-idea #boxDetailIdea .comment-input .smile-icon {
                position: static !important; right: auto !important; top: auto !important; left: auto !important;
                display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin: 0;
            }
            .popup-idea #boxDetailIdea .comment-input .smile-icon > a {
                display: flex; align-items: center; justify-content: center;
                width: 26px; height: 26px; color: rgba(255,255,255,.45); font-size: 16px;
            }
            .popup-idea #boxDetailIdea .comment-input .toolbar .fa-camera,
            .popup-idea #boxDetailIdea .comment-input .contenteditor-upload,
            .popup-idea #boxDetailIdea .comment-input .list-file { display: none !important; }
            .popup-idea #boxDetailIdea > .comment-input .btn-comment-send {
                position: static !important; float: none !important; flex: 0 0 auto; margin: 0;
                background: var(--cq-green); border-color: var(--cq-green); border-radius: 0;
            }
            .popup-idea .comment-input .ContentEditor:empty:before { color: rgba(255,255,255,.45); }

            /* Dải "Đang trả lời ... ✕" nằm ngay trên ô nhập */
            .popup-idea #boxDetailIdea .cm-dang-tra-loi { display: none; }
            .popup-idea #boxDetailIdea .cm-dang-tra-loi.hien {
                position: fixed;
                left: 0; right: 0;
                bottom: calc(52px + env(safe-area-inset-bottom));
                z-index: 8;
                display: flex; align-items: center; gap: 10px;
                padding: 7px 14px;
                background: var(--cq-dark);
                border-top: 1px solid rgba(255,255,255,.10);
                color: rgba(255,255,255,.72); font-size: 12.5px;
            }
            .popup-idea #boxDetailIdea .cm-dang-tra-loi .cm-ten { color: #fff; font-weight: 700; }
            .popup-idea #boxDetailIdea .cm-dang-tra-loi .cm-huy-tra-loi { margin-left: auto; color: rgba(255,255,255,.55); }
}
