/**
 * تنسيقات نظام مشاركة المنتجات على وسائل التواصل الاجتماعي
 * Social Share System Styles
 * 
 * @author Baie3 Development Team
 * @version 1.0
 * @date 2025-01-20
 */

/* حاوي المشاركة الرئيسي */
.social-share-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.social-share-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* عنوان المشاركة */
.share-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.share-title i {
    color: #4CAF50;
    font-size: 1.3rem;
}

/* حاوي الأزرار */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* أزرار المشاركة */
.social-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.social-share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.social-share-btn i {
    font-size: 1.1rem;
}

.social-share-btn span {
    font-family: 'Cairo', sans-serif;
}

/* تأثير الموجة عند النقر */
.social-share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.social-share-btn:active::before {
    width: 300px;
    height: 300px;
}

/* ألوان خاصة لكل منصة */
.social-share-btn[data-platform="facebook"] {
    background: linear-gradient(135deg, #1877F2, #166FE5);
}

.social-share-btn[data-platform="twitter"] {
    background: linear-gradient(135deg, #1DA1F2, #1A91DA);
}

.social-share-btn[data-platform="instagram"] {
    background: linear-gradient(135deg, #E4405F, #C13584, #833AB4);
}

.social-share-btn[data-platform="whatsapp"] {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.social-share-btn[data-platform="telegram"] {
    background: linear-gradient(135deg, #0088CC, #006699);
}

.social-share-btn[data-platform="linkedin"] {
    background: linear-gradient(135deg, #0077B5, #005885);
}

/* قسم رابط المشاركة */
.share-link-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
}

.share-link-section .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.share-link-section .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 0.9rem;
    background: #f8f9fa;
}

.share-link-section .form-control:focus {
    box-shadow: none;
    background: #ffffff;
}

.share-link-section .btn {
    border: none;
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    transition: all 0.3s ease;
}

.share-link-section .btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

/* مودال إنستغرام */
.instagram-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.instagram-share-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #E4405F, #C13584);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h5 {
    margin: 0;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-body ol {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-right: 4px solid #E4405F;
}

.modal-body ol li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.image-preview {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.text-to-copy {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.text-to-copy label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: block;
}

.text-to-copy textarea {
    resize: none;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.text-to-copy textarea:focus {
    border-color: #E4405F;
    box-shadow: 0 0 0 0.2rem rgba(228, 64, 95, 0.25);
}

/* حاوي الإشعارات */
.social-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

/* الإشعارات الفردية */
.social-notification {
    margin-bottom: 10px;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
    pointer-events: auto;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.social-notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-left: 4px solid #2E7D32;
}

.social-notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-left: 4px solid #C62828;
}

.social-notification.warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-left: 4px solid #E65100;
}

.social-notification.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-left: 4px solid #0D47A1;
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 15px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.notification-icon {
    font-size: 18px;
    margin-left: 10px;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    margin: 0 10px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.social-notification.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .social-share-wrapper {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .social-share-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .share-title {
        font-size: 1.3rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .social-share-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-share-btn {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .social-share-btn span {
        display: none;
    }
    
    .social-share-btn i {
        font-size: 1.3rem;
    }
}

/* تأثيرات إضافية */
.social-share-wrapper {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسينات الأداء */
.social-share-btn,
.modal-content,
.social-share-notification {
    will-change: transform;
}

/* تأثير التحميل */
.social-share-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.social-share-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تحسينات إمكانية الوصول */
.social-share-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.btn-close:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* طباعة */
@media print {
    .social-share-wrapper,
    .social-share-notification,
    .instagram-share-modal {
        display: none !important;
    }
}

/* تنسيقات خاصة بصفحة المتجر */
.store-share-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.store-share-section .share-title {
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
}

.store-share-section .social-share-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.store-share-section .social-share-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.store-share-section .facebook-btn:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.store-share-section .twitter-btn:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.store-share-section .whatsapp-btn:hover {
    background: #25D366;
    border-color: #25D366;
}

.store-share-section .telegram-btn:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.store-share-section .copy-store-url-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.store-share-section .copy-store-url-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* نهاية ملف social-share.css */