.category-comments-wrapper {
    padding: 30px;
    background: #ffffff;
    width: 800px;
    margin: auto;
    margin-top: 30px;
    margin-bottom: 20px; }

.category-comments-wrapper h3 {
    margin-bottom: 20px;
    font-size: 16px;
    color: #5b5b5b;
}
.comment-item {
    margin-bottom: 20px;
}

.comment-form-wrapper {
    padding: 18px 10px;
    margin-bottom: 10px;
    margin-top: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    background-color: #fafafa;
    border-color: #ddd;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.comment-form-wrapper .form-group label {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 4px;
    display: block;
    letter-spacing: 0.2px;
}
.form-group-submit button {
    margin: 5px;
}

.comment-form-wrapper input,
.comment-form-wrapper textarea {
font-size: 12px !important;
box-shadow: none !important;
border-radius: 5px !important;
}

.comment-form-wrapper .submit-comment-btn {
    font-size: 13px;
    padding: 0px 10px;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    font-weight: 400;
}

.comment-form-wrapper .submit-comment-btn:hover {
    background: #005a87;
}
#comment_files 
.comment-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}
.admin-badge {
    background: #fd6709;
    color: #ffffff;
    border-radius: 5px;
    font-size: 12px;
    padding: 2px 5px;
    margin-left: 10px;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-main-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.comment-avatar-col {
    flex: 0 0 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f5f5;
    border: 1px solid #e1e1e1;
}
.comment-content-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
}
.comment-header {
    margin-bottom: 2px;
}
.comment-author {
    font-weight: 700;
    color: #333;
    font-size: 14px;
}
.comment-date {
    margin-left: 12px;
    color: #888;
    font-size: 12px;
}
.comment-content {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #444;
}
.comment-attachments-gallery {
    margin-bottom: 8px;
}
.comment-actions {
    margin-bottom: 6px;
    display: flex;
    gap: 6px;
    align-items: center;
    height: 25px;
    margin-bottom: 12px;
}
.comment-actions button {
margin-bottom: 0px;
}
.comment-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-image,
.comment-video {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.comment-thumb-img,
.comment-thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comment-attachments {
    /* grid-template-columns: 1fr; */ /* XÓA dòng này trong media query */
}
.like-comment,
.reply-comment {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.comment-actions button {
    margin: 0px;
}

.comments-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 10px 20px;
}

.comments-pagination a,
.comments-pagination .current-page {
    padding: 2px 10px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.comments-pagination a:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.comments-pagination .current-page {
    background: #3b3b3b;
    color: white;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: white;
    border-radius: 8px;
}

/* Gallery thumbnails */
.comment-attachments-gallery {
    display: flex;
    margin-bottom: 10px;
}
.attachment-thumb {
    width: 45px;
    height: 45px;
    margin: 2px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-thumb-img,
.comment-thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}
.video-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    font-size: 16px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Popup viewer */
.attachment-viewer-modal {
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}
.attachment-viewer-content img,
.attachment-viewer-content video {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    background: #000;
}
.attachment-viewer-modal {
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row.align-items-end {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .info-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
}
@media (max-width: 600px) {
    .comment-main-row {
        gap: 6px;
    }
    .category-comments-wrapper {
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}
    .comment-avatar-col {
        justify-content: flex-start;
    }
    .category-comments-wrapper {
    width: 100%;
}
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lazy loading images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

.input-center {
    text-align: center;
}
.comment-replies .comment-item {
    margin-bottom: 0px;
}
.reply-comment {
    color: #007cba;
    font-size: 12px;
    font-weight: 400 !important;
}

/* Reply box cho admin */
@media (max-width: 768px) {
    .comment-item.admin-reply {
        margin-left: 10px;
    }
}
.comment-attachment-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    margin: 2px;
    display: inline-block;
    background: #f5f5f5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    vertical-align: middle;
}

/* Reply form inline fields */
.reply-comment-form .form-row {
    display: flex;
    gap: 12px; /* Tăng gap lên 12px hoặc nhiều hơn nếu muốn */
    align-items: flex-start;
    margin-bottom: 14px; /* Tăng margin dưới cho hàng */
    flex-wrap: wrap;
}

.reply-comment-form .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-width: 90px;
    max-width: 100%;
    flex: 0 0 140px;
    padding-right: 0; /* Đảm bảo không bị padding thừa */
}

.reply-comment-form .form-group input,
.reply-comment-form .form-group textarea {
    margin-bottom: 8px; /* Thêm margin dưới cho mỗi input/textarea */
}

.reply-comment-form .form-group label {
   margin-bottom: 2px;
    font-size: 14px;
    font-weight: 500;
    color: #007cba;
    text-align: CENTER;
}

.reply-comment-form .form-group.security-question {
    min-width: 90px;
    max-width: 120px;
    flex: 0 0 110px;
    padding: 0;
    border: none;
    background: none;
}

.reply-comment-form .form-group.form-group-submit {
    flex: 0 0 110px;
    align-items: flex-end;
    justify-content: flex-end;
}

.reply-comment-form .reply-actions {
    margin-top: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}
.form-group small {
    color: #007cba;
}

.reply-comment-form .submit-reply-btn,
.reply-comment-form .cancel-reply-btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 3px;
    background: #0073aa;
    color: #ffffff;
    padding: 2px 10px;
    font-size: 10px;
    border-radius: 3px;
    background: #0073aa;
    color: #ffffff;
}

.flex-row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}
.flex-row .form-group {
    flex: 1 1 0;
    margin-bottom: 0;
}
.flex-row .form-group:not(:last-child) {
    margin-right: 0;
}
@media (max-width: 768px) {
    .flex-row {
        flex-direction: column;
        gap: 0;
    }
}
.comment-modal {
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-modal .comment-form-wrapper {
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    background: #fff;
    border-radius: 8px;
    max-width: 420px;
    width: 100%;
    margin: 0;
    padding: 24px 18px;
    position: relative;
}
.comment-modal .close-modal-btn {
    position: absolute;
    top: -15px;
    right: -40px;
    background: none;
    border: none;
    font-size: 22px;
    color: #888;
    cursor: pointer;
}
.comment-replies {
    margin-left: 20px;
}
.comment-item[data-comment-id][data-is-reply="1"] {
    background: #fbfbfb;
    border-left: 2px solid #008ccf;
    padding-left: 10px;
}
.loyal-badge {
    background: #f7b500;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    padding: 2px 6px;
    margin-left: 8px;
}
.special-badge {
    background: #36b0b0;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    padding: 2px 6px;
    margin-left: 8px;
}
.purchased-badge {
    background: #e1e1e1;
    color: #333;
    border-radius: 5px;
    font-size: 12px;
    padding: 2px 6px;
    margin-left: 8px;
}
.slider-author {
    font-weight: 700;
    font-size: 20px;
    color: #f7b500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.slider-like {
    margin-left: auto;
    font-size: 15px;
    color: #0073aa;
    display: flex;
    align-items: center;
    gap: 3px;
}
@keyframes fadeInPopup {
    from { opacity: 0; transform: scale(0.96);}
    to { opacity: 1; transform: scale(1);}
}
