/**
 * Showcase Comments System - Enhanced UI/UX
 * MechaMap - Professional Comment Design
 */

/* ========================================
   COMMENT CONTAINER & LAYOUT
   ======================================== */

.comments-section {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

.comments-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.comments-header h5 {
    margin: 0;
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-body {
    padding: 1.5rem;
}

/* ========================================
   COMMENT FORM DESIGN
   ======================================== */

.comment-form {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.comment-form:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.comment-form .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.comment-form .user-avatar:hover {
    transform: scale(1.05);
}

.comment-form-actions {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

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

.comment-submit-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.4);
}

/* ========================================
   COMMENT CARDS DESIGN
   ======================================== */

.comment-item {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.comment-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.1);
    transform: translateY(-2px);
}

.comment-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.comment-avatar:hover {
    border-color: #0d6efd;
    transform: scale(1.1);
}

.comment-user-info {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    color: #212529;
    margin: 0;
    font-size: 0.95rem;
}

.comment-timestamp {
    color: #6c757d;
    font-size: 0.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-body {
    padding: 1.5rem;
    line-height: 1.6;
    color: #495057;
}

.comment-content {
    margin-bottom: 1rem;
}

.comment-content p {
    margin-bottom: 0.75rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   COMMENT ATTACHMENTS
   ======================================== */

.comment-attachments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
}

.comment-attachments .attachment-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.comment-attachments .attachment-item:hover {
    transform: scale(1.02);
}

.comment-attachments img {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.comment-attachments img:hover {
    border-color: #0d6efd;
}

/* ========================================
   COMMENT ACTIONS
   ======================================== */

.comment-actions {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-action-btn:hover {
    background: #e9ecef;
    color: #0d6efd;
    transform: translateY(-1px);
}

.comment-action-btn.active {
    background: #0d6efd;
    color: white;
}

/* ========================================
   REPLY SYSTEM
   ======================================== */

.comment-replies {
    margin-left: 2rem;
    margin-top: 1rem;
    padding-left: 1.5rem;
    border-left: 3px solid #e9ecef;
    position: relative;
}

.comment-replies::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #0d6efd, #6c757d);
    opacity: 0.3;
}

.reply-item {
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.reply-item:hover {
    background: #fff;
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.reply-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
}

.reply-username {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    margin: 0;
}

.reply-timestamp {
    color: #6c757d;
    font-size: 0.75rem;
    margin: 0;
}

.reply-body {
    padding: 0 1rem 1rem;
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ========================================
   REPLY FORM
   ======================================== */

.reply-form {
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 1rem;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

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

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
}

.reply-submit-btn {
    background: #28a745;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

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

.reply-cancel-btn {
    background: #6c757d;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.reply-cancel-btn:hover {
    background: #5a6268;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .comments-section {
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .comments-header,
    .comments-body {
        padding: 1rem;
    }
    
    .comment-form {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .comment-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .comment-body {
        padding: 1rem;
    }
    
    .comment-replies {
        margin-left: 1rem;
        padding-left: 1rem;
    }
    
    .comment-actions {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .comment-action-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

[data-bs-theme="dark"] .comments-section {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .comments-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-color: #495057;
}

[data-bs-theme="dark"] .comment-form {
    background: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .comment-item {
    background: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .comment-header {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    border-color: #6c757d;
}

[data-bs-theme="dark"] .reply-item {
    background: #495057;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .reply-form {
    background: #343a40;
    border-color: #495057;
}
