/**
 * Comment Reply Modal Styles
 * Premium styling for the comment and reply modal system
 */

/* Modal Enhancements */
#replyModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

#replyModal .modal-header {
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#replyModal .modal-header .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

#replyModal .modal-body {
    padding: 1.5rem;
}

#replyModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
}

#replyModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#replyModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#replyModal .btn-secondary {
    background: #6c757d;
    border: none;
    padding: 0.5rem 1.25rem;
}

/* Reply To Info Box */
#modal-reply-to-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

#modal-reply-to-info i {
    color: #0284c7;
}

#modal-reply-to-info strong {
    color: #0369a1;
}

/* TinyMCE Container in Modal */
#replyModal .tox-tinymce {
    border-radius: 10px !important;
    border: 1px solid #dee2e6 !important;
}

#replyModal .tox-editor-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Message Alert in Modal */
#modal-message .alert {
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
}

/* New Comment Highlight Animation */
.new-comment-highlight {
    animation: highlightPulse 3s ease-out;
}

@keyframes highlightPulse {
    0% {
        background-color: rgba(102, 126, 234, 0.3);
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    }

    50% {
        background-color: rgba(102, 126, 234, 0.15);
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
    }

    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

/* Reply Button Styling */
.btn-reply-modal {
    transition: all 0.2s ease;
}

.btn-reply-modal:hover {
    transform: translateX(-3px);
}

/* Question Page Specific - New Answer Button */
.btn-new-answer {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-new-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: white;
}

/* Comment Form Card Styling */
.comment-form-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.comment-form-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.comment-form-card .card-body {
    padding: 1.5rem;
}

/* Answer Section Styling */
.answer-item {
    transition: background-color 0.3s ease;
}

.answer-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* RTL Specific */
[dir="rtl"] .btn-reply-modal:hover,
html[lang="fa"] .btn-reply-modal:hover {
    transform: translateX(3px);
}

/* Loading State for Submit Button */
#modal-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#modal-submit-btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #replyModal .modal-dialog {
        margin: 0.5rem;
    }

    #replyModal .modal-content {
        border-radius: 12px;
    }

    #replyModal .modal-body {
        padding: 1rem;
    }

    #replyModal .modal-footer {
        padding: 0.75rem 1rem;
    }

    #replyModal .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}