/* Comments System Styles */

.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #E5E7EB;
}

.comments-header {
    margin-bottom: 2rem;
}

.comments-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2E3A4F;
    margin-bottom: 0.5rem;
}

.comments-count {
    font-size: 0.875rem;
    color: #6B7280;
}

/* Comment Form */
.comment-form {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.comment-form-group {
    margin-bottom: 1rem;
}

.comment-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2E3A4F;
    margin-bottom: 0.5rem;
}

.comment-form-input,
.comment-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-form-input:focus,
.comment-form-textarea:focus {
    outline: none;
    border-color: #9FE0C3;
}

.comment-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.comment-form-note {
    font-size: 0.75rem;
    color: #6B7280;
}

.comment-submit-btn {
    padding: 0.75rem 1.5rem;
    background: #9FE0C3;
    color: #2E3A4F;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-submit-btn:hover {
    background: #8DD4B3;
    transform: translateY(-1px);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    display: flex;
    gap: 1rem;
}

.comment-avatar {
    flex-shrink: 0;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #2E3A4F;
    font-size: 1rem;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #2E3A4F;
}

.comment-badge {
    padding: 0.125rem 0.5rem;
    background: #9FE0C3;
    color: #2E3A4F;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.comment-time {
    font-size: 0.75rem;
    color: #9CA3AF;
}

.comment-body {
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    color: #6B7280;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-action-btn:hover {
    background: #F3F4F6;
    color: #2E3A4F;
}

.comment-action-btn svg {
    width: 14px;
    height: 14px;
}

/* Inline Reply Form */
.reply-form-inline {
    margin-top: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
}

.comment-form-inline {
    background: transparent;
    padding: 0;
}

.reply-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.comment-submit-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Inline Edit Form */
.edit-form-inline {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #FEF3C7;
    border-radius: 8px;
    border: 2px solid #FCD34D;
}

.edit-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

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

.comment-reply .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

/* Empty State */
.comments-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #9CA3AF;
}

.comments-empty svg {
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.comments-empty p {
    font-size: 0.875rem;
}

/* Loading */
.comments-loading {
    display: none;
    justify-content: center;
    padding: 2rem;
}

.comments-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E5E7EB;
    border-top-color: #9FE0C3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Load More */
.comments-load-more {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    color: #2E3A4F;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    border-color: #9FE0C3;
    background: #FAFAFA;
}

/* Confirmation Modal */
.comment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.comment-modal-overlay.visible {
    opacity: 1;
}

.comment-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 400px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.comment-modal-overlay.visible .comment-modal {
    transform: scale(1);
}

.comment-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.comment-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2E3A4F;
    margin: 0;
}

.comment-modal-body {
    padding: 1.5rem;
}

.comment-modal-body p {
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
}

.comment-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.comment-modal-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.comment-modal-btn-cancel {
    background: #F3F4F6;
    color: #4B5563;
}

.comment-modal-btn-cancel:hover {
    background: #E5E7EB;
}

.comment-modal-btn-danger {
    background: #EF4444;
    color: white;
}

.comment-modal-btn-danger:hover {
    background: #DC2626;
}

/* Toast Notifications */
.comment-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.comment-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.comment-toast-success {
    border-left: 4px solid #9FE0C3;
    color: #2E3A4F;
}

.comment-toast-error {
    border-left: 4px solid #EF4444;
    color: #DC2626;
}

/* Responsive */
@media (max-width: 768px) {
    .comments-section {
        margin-top: 2rem;
        padding-top: 2rem;
    }
    
    .comment {
        gap: 0.75rem;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .comment-replies {
        padding-left: 1rem;
    }
    
    .comment-form {
        padding: 1rem;
    }
    
    .comment-form-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .comment-submit-btn {
        width: 100%;
    }
    
    .comment-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}
