/* Comments Section */
.comments-section {
    margin-top: 1.5rem;
}

.comments-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
}

.comments-header h5 span {
    font-weight: 400;
    font-size: 0.95rem;
}

/* Comment notice text */
.comments-notice {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Comment form */
.comment-form {
    background: none !important;
    border: none !important;
    border-top: none !important;
    padding: 0 !important;
}

.comment-form h6 {
    display: none;
}

.comment-name-input {
    border: none;
    border-radius: 8px;
    background: #f1f1f1;
    padding: 10px 14px;
    font-size: 0.9rem;
    max-width: 100%;
}

@media (min-width: 768px) {
    .comment-name-input {
        max-width: 40%;
    }
}

.comment-name-input:focus {
    background: #eaeaea;
    box-shadow: none;
    border-color: transparent;
}

.comment-name-input::placeholder {
    color: #999;
}

/* Rich editor area */
.comment-editor {
    border: none !important;
    border-radius: 8px !important;
    background: #f1f1f1 !important;
    padding: 10px 14px 30px !important;
    font-size: 0.9rem !important;
    min-height: 120px !important;
    max-height: 250px !important;
    overflow-y: auto;
    line-height: 1.5;
}

.comment-editor:focus {
    background: #eaeaea !important;
    box-shadow: none !important;
    border-color: transparent !important;
    outline: none;
}

.comment-editor:empty:before {
    color: #999 !important;
}

.comment-editor a {
    color: var(--color-primary, #3b5998);
    text-decoration: underline;
}

.comment-editor code {
    background: #e8e8e8;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
}

.comment-gif {
    max-width: 100px;
    border-radius: 6px;
    margin: 4px 0;
    display: block;
}

/* Editor wrapper */
.comment-editor-wrap {
    position: relative;
}

/* Char counter */
.comment-char-count {
    position: absolute;
    bottom: 8px;
    right: 6px;
    font-size: 0.7rem;
    color: #aaa;
    z-index: 2;
    pointer-events: none;
}

.comment-char-count.over {
    color: #dc3545;
    font-weight: 600;
}

/* Toolbar — overlay bottom-right */
.comment-editor-toolbar {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: flex;
    gap: 2px;
    z-index: 2;
}

.comment-editor-toolbar .btn {
    border: none !important;
    background: rgba(255,255,255,0.7);
    color: #888;
    font-size: 0.78rem;
    padding: 2px 6px;
    border-radius: 4px !important;
    line-height: 1.4;
}

.comment-editor-toolbar .btn:hover {
    background: #e0e0e0;
    color: #333;
}

.comment-editor-toolbar .btn.active {
    background: var(--color-primary, #3b5998) !important;
    color: #fff !important;
}

/* Submit button */
.comment-form .btn-primary {
    background: var(--color-primary, #3b5998);
    border-color: var(--color-primary, #3b5998);
    border-radius: 4px;
    padding: 6px 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.comment-form .btn-primary:hover {
    opacity: 0.9;
}

/* Reply indicator */
.reply-indicator {
    background: #e8f0fe !important;
    border: none !important;
    border-radius: 4px !important;
    color: #333 !important;
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
}

/* Emoji & GIF pickers */
.emoji-picker {
    position: absolute;
    bottom: 34px;
    left: 6px;
    z-index: 10;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    font-size: 1.2rem;
    line-height: 1.8;
    max-height: 150px;
    max-width: 280px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.emoji-item {
    display: inline-block;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 4px;
}

.emoji-item:hover {
    background: #f0f0f0;
}

.gif-picker {
    position: absolute;
    bottom: 34px;
    left: 6px;
    z-index: 10;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    width: 320px;
    max-width: 90vw;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.gif-results {
    max-height: 200px;
    overflow-y: auto;
}

.gif-results img {
    width: 90px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.15s;
}

.gif-results img:hover {
    transform: scale(1.08);
}

/* Comment list items */
.comments-list .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.8rem;
}

.comments-list .fw-semibold {
    font-size: 0.85rem;
}

.comments-list .text-muted small,
.comments-list small.text-muted {
    font-size: 0.75rem;
}

.comments-list .mb-1.small {
    font-size: 0.85rem;
    color: #333;
    line-height: 1.5;
}

/* Like, reply, report buttons */
.comment-like-btn,
.comment-reply-btn,
.comment-report-btn {
    font-size: 0.78rem !important;
    transition: color 0.15s;
}

.comment-like-btn:hover,
.comment-reply-btn:hover {
    color: var(--color-primary, #3b5998) !important;
}

.comment-report-btn {
    color: #d4a017 !important;
}

.comment-report-btn:hover {
    color: #b8860b !important;
}

/* Sort tabs */
.comments-tabs {
    border-bottom: 1px solid #eee;
    padding-bottom: 0;
}

.comments-tab {
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: #999;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    letter-spacing: 0.02em;
}

.comments-tab:hover {
    color: #333;
}

.comments-tab.active {
    color: var(--color-primary, #3b5998) !important;
    border-bottom-color: var(--color-primary, #3b5998) !important;
}

/* Load more */
.comments-load-more {
    font-size: 0.82rem;
    padding: 6px 24px;
    border-radius: 20px;
}

/* Closed comments */
.comments-section .bi-lock {
    margin-right: 4px;
}
