 
.comment {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.comment:last-child {
    border-bottom: none;
}

.comment:hover {
    background: #f9fafb;
}

.dark .comment {
    border-bottom-color: #374151;
}

.dark .comment:hover {
    background: #1f2937;
}

/* Quality Indicators */
.comment-quality-indicators {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.quality-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quality-metric {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f3f4f6;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: help;
}

.dark .quality-metric {
    background: #374151;
}

.quality-metric:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quality-metric.insightful {
    color: #6366f1;
    border-color: #6366f1;
}

.quality-metric.helpful {
    color: #10b981;
    border-color: #10b981;
}

.quality-metric.engaging {
    color: #f59e0b;
    border-color: #f59e0b;
}

.quality-icon {
    font-size: 0.875rem;
}

.quality-count {
    font-weight: 600;
}

/* Comment Content */
.comment-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.comment-author {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.author-avatar {
    position: relative;
}

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.avatar-initials {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 1rem;
    height: 1rem;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.author-name {
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.dark .author-name {
    color: #f9fafb;
}

.author-name:hover {
    color: #6366f1;
}

.author-level {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #6366f1;
    color: white;
}

.tech-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dark .tech-badge {
    background: #374151;
    color: #d1d5db;
}

.comment-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.dark .comment-meta {
    color: #9ca3af;
}

.comment-time {
    font-weight: 400;
}

.edited-badge {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

.dark .edited-badge {
    color: #9ca3af;
}

.pinned-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Body */
.comment-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-text {
    color: #374151;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.dark .comment-text {
    color: #d1d5db;
}

.deleted-comment-alert,
.blocked-alert,
.banned-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.dark .deleted-comment-alert,
.dark .blocked-alert,
.dark .banned-alert {
    background: #374151;
    border-color: #4b5563;
}

.deleted-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.dark .deleted-title {
    color: #d1d5db;
}

.deleted-reason {
    font-size: 0.875rem;
    color: #6b7280;
}

.dark .deleted-reason {
    color: #9ca3af;
}

/* Insight Voting */
.insight-voting {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.voting-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.dark .voting-label {
    color: #9ca3af;
}

.voting-buttons {
    display: flex;
    gap: 0.5rem;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dark .vote-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.vote-btn:hover {
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.dark .vote-btn:hover {
    border-color: #6b7280;
}

.vote-btn.active {
    font-weight: 600;
}

.vote-btn.active[data-type="insightful"] {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #6366f1;
}

.vote-btn.active[data-type="helpful"] {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.vote-btn.active[data-type="engaging"] {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
}

.vote-count {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.dark .vote-count {
    background: #4b5563;
}

/* Actions */
.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dark .action-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.dark .action-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
}

.save-btn.saved {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
}

.more-options {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.more-btn {
    padding: 0.5rem;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
}

.dark .more-btn {
    background: #374151;
    border-color: #4b5563;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 9999;
    min-width: 160px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

/* Remove this line - it's causing hover to still work */
/* .more-options:hover .dropdown-menu {
    display: block;
} */

/* Add this class for JavaScript to toggle */
.dropdown-menu.show {
    display: block;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -15px; 
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.dark .dropdown-menu {
    background: #1f2937;
    border-color: #374151;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 1rem;
    color: #374151;
    font-size: 0.875rem;
    text-align: left;
    transition: background 0.2s;
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

.dark .dropdown-item {
    color: #d1d5db;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dark .dropdown-item:hover {
    background: #374151;
}

/* Specific styling for the delete button */
.dropdown-item.delete-btn {
    color: #ef4444;
}

.dropdown-item.delete-btn:hover {
    background: #fef2f2;
}

.dark .dropdown-item.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}
.view-replies-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6366f1;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dark .view-replies-btn {
    background: #374151;
    border-color: #4b5563;
    color: #818cf8;
}

.view-replies-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

.dark .view-replies-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Reply Form */
.reply-form {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    animation: slideDown 0.2s ease;
}

.dark .reply-form {
    background: #374151;
    border-color: #4b5563;
}

.form-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.user-avatar .avatar {
    width: 2rem;
    height: 2rem;
}

.user-avatar .avatar-initials {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.form-username {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.dark .form-username {
    color: #f9fafb;
}

.form-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

.dark .form-hint {
    color: #9ca3af;
}

.reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s;
}

.dark .reply-form textarea {
    background: #1f2937;
    border-color: #4b5563;
    color: #f9fafb;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cancel-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dark .cancel-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.cancel-btn:hover {
    background: #f3f4f6;
}

.dark .cancel-btn:hover {
    background: #4b5563;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #6366f1;
    color: white;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* Replies */
.replies {
    margin-top: 1rem;
    padding-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dark .replies {
    border-left-color: #4b5563;
}

.load-more-replies {
    padding: 0.5rem 1rem;
    border: 1px dashed #e5e7eb;
    background: #f9fafb;
    color: #6366f1;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dark .load-more-replies {
    background: #374151;
    border-color: #4b5563;
    color: #818cf8;
}

.load-more-replies:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
}

.dark .load-more-replies:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Hidden Class */
.replies.hidden{
    display: none;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: #374151;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.25rem solid transparent;
    border-top-color: #374151;
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .comment {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .comment-quality-indicators {
        flex-direction: row;
        order: 2;
        justify-content: flex-start;
    }
    
    .quality-metrics {
        flex-direction: row;
    }
    
    .replies {
        padding-left: 1rem;
    }
}

@media (max-width: 640px) {
    .comment-author {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .author-details {
        flex-wrap: wrap;
    }
    
    .comment-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
    }
}
 /* Add to your comments_component.css */
.comment-deleted {
    opacity: 0.9;
}

.comment-deleted .comment-header {
    opacity: 0.7;
}

.deleted-reply-info {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.deleted-comment-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}

.dark .deleted-comment-alert {
    background-color: #1f2937;
    border-color: #374151;
    color: #9ca3af;
}

.deleted-comment-alert svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.deleted-title {
    font-weight: 500;
    color: #4b5563;
}

.dark .deleted-title {
    color: #d1d5db;
}