.login-prompt {
    text-align: left;
    margin-top: 20px;
    font-size: 16px;
    color: #555;
}

#private-comments-section {
    margin-top: 50px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#private-comments-section h3 {
    /* font-size: 22px;
    margin-bottom: 20px;
    color: #222;
    border-bottom: 2px solid #e6e6e6;
    padding-bottom: 10px; */
    font-size: 24px;
    font-weight: 700;
    line-height: 36px;
    height: auto;
    padding: 0;
    text-align: left;
    color: #000000;
    padding-bottom: 20px;
}

#private-comment-form {
    /* margin-bottom: 25px; */
}

#private-comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s;
}

#private-comment-form textarea:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

#private-comment-form #comment_button {
    margin-top: 10px;
    background-color: #222;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#private-comment-form #comment_button:hover {
    background-color: #444;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#comments-list {
    margin-top: 20px;
}

#comments-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#comments-list li.comment {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #FFFFFF;
    border-radius: 6px;
    border-left: 3px solid #222;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#comments-list li.comment.reply {
    margin-left: 40px;
    border-left: 3px solid #555;
    background-color: #f5f5f5;
}

#comments-list li.comment p {
    /* margin: 0 0 10px 0; */
    line-height: 1.6;
}

#comments-list li.comment strong {
    color: #111;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    margin-bottom: 20px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
}

.comment-content {
    padding: 15px;
    background-color: #FFFFFF;
    border-left: 3px solid #222;
}

.comment-date {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.replies-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f9f9f9;
    border-top: 1px solid #e6e6e6;
}


.reply-item {
    padding: 10px 15px 10px 25px;
    border-left: 3px solid #555;
    margin: 5px 0 5px 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.reply-content p {
    margin: 0;
}

/* Reply link style */
.reply-link {
    display: inline-block;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 5px;
    transition: color 0.2s;
}

.reply-link:hover {
    color: #555;
    text-decoration: underline;
}

/* Thông báo khi chưa có comment */
#comments-list p {
    color: #666;
    font-style: italic;
}

/* Toggle buttons styling */
.toggle-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
    display: inline-block;
    transition: all 0.2s ease;
    margin-left: 5px;
}

.toggle-button:hover {
    background-color: #e0e0e0;
}

.toggle-all-comments {
    background-color: #222;
    color: #FFFFFF;
    padding: 8px 15px;
    margin-bottom: 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.toggle-all-comments:hover {
    background-color: #444;
}

/* Hide replies by default */
.replies-list {
    display: none;
}

/* Notification for reply count */
.reply-count {
    margin-left: 10px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    #private-comment-form textarea {
        min-height: 100px;
    }

    #comments-list li.comment.reply {
        margin-left: 20px;
    }

    .reply-item {
        margin-left: 10px;
    }
}

/* Widget overlay */
#private-comment-widget {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
}

.private-comment-widget-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.private-comment-widget-content {
    position: absolute;
    top: 10px;
    right: 20px;
    bottom: 10px;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    max-height: 670px;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    /* padding: 20px; */
}

.private-comment-widget-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

#private-comment-widget-inner {
    height: 100%;
}

#private-comment-widget-inner #private-comments-section {
    height: 100%;
}

@media (max-width: 600px) {
    .private-comment-widget-content {
        width: 100vw;
    }
}

/* Chat Container Styles */
.chat-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    /* max-width: 400px; */
    /* margin: 0 auto; */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100%;
}

.chat-container .header-chat-container {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
    color: #666;
    font-size: 18px;
    font-weight: 500;
    background: #fff;
    height: auto !important;
}

.messages-container {
    height: calc(100% - 51px - 91px);
    /* max-height: 540px; */
    overflow-y: auto;
    overflow-x: hidden;
}

.message-thread {
    border-bottom: 1px solid #f0f0f0;
}

.message-thread:last-child {
    border-bottom: none;
}

.message {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.avatar .notify-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 15px;
    height: 15px;
    background: #ff3b30;
    border-radius: 50%;
    border: 2px solid #fff; // viền trắng cho đẹp
}

.avatar.avatar-small {
    width: 32px;
    height: 32px;
}

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

.avatar-default {
    color: #1976d2;
    font-size: 18px;
}

.avatar-small .avatar-default {
    font-size: 14px;
}

.message-content {
    position: relative;
    width: 100%;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-actions {
    position: relative;
}

.message-actions .action-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: #65676b;
}

.message-actions .action-toggle:hover {
    background: #f0f2f5;
}

.message-actions .action-dropdown {
    position: absolute;
    top: 36px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    padding: 6px 0;
    display: none;
    z-index: 999;
}

.message-actions .action-dropdown button {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.message-actions .action-dropdown button:hover {
    background: #f0f2f5;
}

.message-actions .action-dropdown .delete-comment {
    color: #e41e3f;
    outline: none;
}

.message-actions.active .action-dropdown {
    display: block;
}

.message-text.editing {
    border: 1px solid #1877f2;
    border-radius: 6px;
    padding: 6px;
    background: #fff;
    outline: none;
}

.edit-actions {
    margin: 10px 0;
    display: flex;
    gap: 8px;
}

.edit-actions button {
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
}

.save-edit {
    background: #1877f2;
    color: #fff;
}

.cancel-edit {
    background: #e4e6eb;
}

.sender-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.message-text {
    color: #666;
    line-height: 1.4;
    font-size: 14px;
    margin-bottom: 8px;
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
}

.message-meta-child{
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.timestamp {
    display: flex;
    align-items: center;
    gap: 4px;
}

.clock-icon {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}
.message-meta-child .reply-message-list{
    cursor: pointer;
}
.reply-btn {
    background: #333;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: none;
    height: max-content;
}

.reply-btn:hover {
    background: #555;
}

.nested-messages {
    margin-left: 52px;
    border-left: 2px solid #f0f0f0;
    padding-left: 16px;
}

.nested-message {
    padding: 12px 20px 12px 0;
    border-bottom: 1px solid #f8f8f8;
}

.nested-message:last-child {
    border-bottom: none;
}

.nested-message .message {
    padding: 0;
}

.reply-input-container {
    margin-left: 52px;
    padding: 12px 20px 12px 16px;
    border-left: 2px solid #f0f0f0;
    background: #fafafa;
}

.input-section {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 35px 20px 15px 20px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-container .input-field-container {
    
    width: calc( 100% - 40px);
    position: relative;

}

.input-field-container .place-default {
    
    font-size: 12px;
    position: absolute;
    top: -30px;
    width: calc(100% + 50px);
    color: #666;

}

form .input-field {
    flex: 1;
    border: 1px solid #e5e5e5 !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    outline: none !important;
    background: #fff !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 20px;
}

.input-field:focus {
    border-color: #1976d2;
}

.send-btn {
    background: #1976d2;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    flex-shrink: 0;
    transition: background-color 0.2s;
    padding: 0px;
}

.send-btn:hover {
    background: #1565c0;
}

.no-messages {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* Widget Overlay - Keep existing styles */
#private-comment-widget {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
}

.private-comment-widget-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.private-comment-widget-content {
    position: absolute;
    /* top: 50%; */
    /* left: 50%; */
    /* transform: translate(-50%, -50%); */
    width: 440px;
    max-width: 90vw;
    max-height: 85vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.private-comment-widget-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0px;
}

.private-comment-widget-close:hover {
    background: #f8f9fa;
    color: #333;
}

.private-comment-widget-close:focus-visible,.private-comment-widget-close:focus  {
    outline: none;
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar {
    width: 4px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .private-comment-widget-content {
        width: 95vw;
        height: 85vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .chat-container {
        max-width: none;
        height: 100%;
        border-radius: 0;
    }
    
    .messages-container {
        max-height: calc(100vh - 200px);
    }
    
    .nested-messages {
        margin-left: 36px;
    }
    
    .reply-input-container {
        margin-left: 36px;
    }
}

/* Form animations */
.reply-form {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
}

.reply-input-container {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 100px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

.input-field:empty:before {
        content: attr(data-placeholder);
        color: #999;
}
.mention-highlight {
    font-weight: bold;
    color: #000000;
}
/* Hide scrollbar but allow scrolling */
.input-field::-webkit-scrollbar {
    display: none;
}
.input-field {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}