/* PCM AI Comments Styles */

.pcm-ai-comments-wrapper {
    margin: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

/* Header */
.pcm-comments-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.pcm-comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.pcm-icon {
    flex-shrink: 0;
}

/* Comments List */
.pcm-comments-list {
    margin-bottom: 40px;
}

.pcm-comment {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

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

.pcm-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: 600;
}

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

.pcm-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pcm-comment-author {
    font-weight: 600;
    color: #111827;
    font-size: 15px;
}

.pcm-comment-date {
    color: #6b7280;
    font-size: 13px;
}

.pcm-comment-text {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 12px;
    word-wrap: break-word;
}

/* Rating */
.pcm-comment-rating,
.pcm-rating {
    display: inline-flex;
    gap: 2px;
}

.pcm-star {
    color: #d1d5db;
}

.pcm-star.filled {
    color: #fbbf24;
}

/* Actions */
.pcm-comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.pcm-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.pcm-reaction-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.pcm-reaction-btn.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Replies */
.pcm-comment-replies {
    margin-top: 20px;
    padding-right: 20px;
}

.pcm-comment-reply {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 10px;
}

.pcm-reply-avatar {
    flex-shrink: 0;
}

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

.pcm-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pcm-reply-author {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.pcm-reply-badge {
    background: #3b82f6;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.pcm-reply-date {
    color: #6b7280;
    font-size: 12px;
}

.pcm-reply-text {
    color: #374151;
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
}

/* No Comments */
.pcm-no-comments {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.pcm-no-comments .pcm-icon {
    margin-bottom: 15px;
    opacity: 0.5;
}

.pcm-no-comments p {
    margin: 0;
    font-size: 16px;
}

/* Comment Form */
.pcm-comment-form-wrapper {
    background: #f9fafb;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
}

.pcm-form-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #111827;
}

.pcm-comment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pcm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.pcm-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pcm-form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.pcm-form-group input[type="text"],
.pcm-form-group input[type="email"],
.pcm-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}

.pcm-form-group input:focus,
.pcm-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Rating Input */
.pcm-rating-input {
    display: flex;
    gap: 5px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.pcm-rating-input input[type="radio"] {
    display: none;
}

.pcm-rating-input label {
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s;
}

.pcm-rating-input label:hover,
.pcm-rating-input label:hover ~ label {
    color: #fbbf24;
}

.pcm-rating-input input[type="radio"]:checked ~ label {
    color: #fbbf24;
}

/* Security Question */
.pcm-security-question {
    background: #fff;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

/* Form Actions */
.pcm-form-actions {
    display: flex;
    justify-content: flex-start;
}

.pcm-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pcm-submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pcm-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Message */
.pcm-form-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

.pcm-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.pcm-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .pcm-form-row {
        grid-template-columns: 1fr;
    }
    
    .pcm-comment {
        gap: 10px;
    }
    
    .pcm-comment-form-wrapper {
        padding: 20px;
    }
    
    .pcm-comment-replies {
        padding-right: 10px;
    }
}
