/**
 * Review Summary Styles
 * 
 * استایل‌های خلاصه هوشمند دیدگاه‌های محصول
 * طراحی مشابه نمونه ارسالی با انیمیشن‌های مدرن
 * 
 * @package MLM
 * @since 1.0.0
 */

/* Container */
.mlm-review-summary-container {
    margin: 20px 0;
    font-family: 'IRANYekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    text-align: right;
}

/* Main Summary Box */
.mlm-review-summary-box {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mlm-review-summary-box:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mlm-review-summary-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

/* Header Section */
.mlm-review-summary-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 5px;
    gap: 5px;
}

.mlm-review-summary-icon {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
    animation: iconPulse 2s ease-in-out infinite;
    overflow: hidden;
    margin: -20px;
    padding: 0;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.mlm-review-summary-icon .lottie-animation {
    width: 140px;
    height: 140px;
    margin: 0;
    padding: 0;
}

/* مخفی کردن آیکون اضافی پایین */
.mlm-review-summary-icon .lottie-animation svg g:nth-child(4) {
    display: none !important;
}

.mlm-review-summary-title h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
}

.ai-badge {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
}

/* Summary Content */
.mlm-review-summary-content {
    margin-bottom: 20px;
}

.mlm-review-summary-text {
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 16px;
    text-align: justify;
}

.mlm-review-summary-actions {
    text-align: left;
}

.mlm-view-more-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.3s ease;
}

.mlm-view-more-btn:hover {
    color: #764ba2;
    text-decoration: none;
}

/* Tags Section */
.mlm-review-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mlm-summary-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mlm-summary-tag.tag-positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.2);
}

.mlm-summary-tag.tag-negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
}

.mlm-summary-tag.tag-neutral {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.2);
}

.mlm-summary-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tag-icon {
    font-weight: bold;
    font-size: 14px;
}

.tag-text {
    font-size: 11px;
}

/* Disclaimer */
.mlm-review-summary-disclaimer {
    margin-bottom: 16px;
    text-align: center;
}

.mlm-review-summary-disclaimer small {
    color: #adb5bd;
    font-size: 11px;
    font-style: italic;
}

/* Feedback Section */
.mlm-review-summary-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    gap: 16px;
}

.feedback-question {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.feedback-buttons {
    display: flex;
    gap: 8px;
}

.feedback-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.feedback-btn:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
    transform: scale(1.1);
}

.feedback-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.feedback-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-btn .icon-thumbs-up::before {
    content: '👍';
    font-size: 14px;
}

.feedback-btn .icon-thumbs-down::before {
    content: '👎';
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mlm-review-summary-box {
        padding: 20px;
        border-radius: 12px;
    }
    
    .mlm-review-summary-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    
    .mlm-review-summary-icon {
        width: 100px;
        height: 100px;
        margin: -15px;
    }
    
    .mlm-review-summary-icon .lottie-animation {
        width: 90px;
        height: 90px;
    }
    
    .mlm-review-summary-title h3 {
        font-size: 16px;
    }
    
    .mlm-review-summary-text {
        font-size: 14px;
    }
    
    .mlm-review-summary-feedback {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }
    
    .feedback-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .mlm-review-summary-container {
        margin: 16px 0;
    }
    
    .mlm-review-summary-box {
        padding: 16px;
    }
    
    .mlm-review-summary-tags {
        justify-content: center;
    }
    
    .mlm-summary-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Animation Classes */
.mlm-review-summary-container.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.mlm-review-summary-container.loading .mlm-review-summary-text::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mlm-review-summary-box {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .mlm-review-summary-title h3 {
        color: #f7fafc;
    }
    
    .mlm-review-summary-text {
        color: #cbd5e0;
    }
    
    .ai-badge {
        background: rgba(255, 255, 255, 0.1);
        color: #a0aec0;
    }
    
    .feedback-btn {
        background: #4a5568;
        border-color: #718096;
        color: #a0aec0;
    }
    
    .feedback-btn:hover {
        background: #718096;
        border-color: #a0aec0;
    }
    
    .mlm-review-summary-disclaimer small {
        color: #718096;
    }
}
