/* ==========================================================================
   Hub Trend - Product Share Icons Styles
   Version: 2.0.0
   Description: Unified styles for product share icons (WhatsApp, Facebook, X, Copy Link)
   Updated: Fixed button/link consistency and enhanced visual design
   ========================================================================== */

/* الحاوية الرئيسية */
.product-action-icons {
    animation: hubtrend-fadeUp 0.5s ease forwards;
    padding: 0px;
}

/* تأثير الظهور */
@keyframes hubtrend-fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* الأيقونات الفردية - تطبيق موحد على الروابط والأزرار */
.product-action-icons a,
.product-action-icons button.copy-product-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #bfbfbf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #F2F5F7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    /* إعادة تعيين أنماط الزر */
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 1;
}


/* إصلاح محاذاة Flex للتأكد من التساوي */
.product-action-icons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    margin-top: 5px;
}

.product-action-icons > * {
    flex: 0 0 auto;
}

/* تنسيق الأيقونات */
.product-action-icons i {
    color: #415161;
    font-size: 16px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تأثيرات Hover عامة - تطبيق على الجميع */
.product-action-icons a:hover,
.product-action-icons button.copy-product-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* WhatsApp - ألوان محددة */
.share-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

/* Facebook - ألوان محددة */
.share-facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

/* Twitter - ألوان محددة */
.share-x-twitter:hover {
    color: #000 !important;
    background: #000;
    border-color: #fff;
}

/*  إذا عدت لاستخدام button - استهدف button.copy-product-link */
button.copy-product-link:hover,
button.copy-product-link.hubtrend-copying,
button.copy-product-link.hubtrend-copied {
    background: #aa0000;
    border-color: #aa0000;
}

button.copy-product-link.hubtrend-copying {
    transform: scale(0.95) translateY(-3px);
}

/* إضافة تأثير النجاح */
button.copy-product-link.hubtrend-copied {
    background: #07ae44 !important;
    border-color: #07ae44 !important;
    transform: scale(1.1) translateY(-3px);

}
/* إضافة تأثير الفشل */
button.copy-product-link.hubtrend-failed {
    background: #000 !important;
    border-color: #000 !important;
    transform: scale(1.1) translateY(-3px);
}
.share-whatsapp:hover i,
.share-facebook:hover i,
.share-x-twitter:hover i,
button.copy-product-link:hover i,
button.copy-product-link.hubtrend-copying i,
button.copy-product-link.hubtrend-copied i,
button.copy-product-link.hubtrend-failed i {
    color: #ffffff;
}

/* تحسينات إضافية للتأكد من التساوي */
.product-action-icons a:focus,
.product-action-icons button.copy-product-link:focus {
    outline: 2px solid #07ae44;
    outline-offset: 2px;
}

.product-action-icons a:active,
.product-action-icons button.copy-product-link:active {
    transform: translateY(-1px);
}

/* التكيف مع الجوال */
@media (max-width: 921px) {
    .product-action-icons {
        gap: 8px;
        margin-top: 0px;
        margin-bottom: 5px;
    }
    
    .product-action-icons a,
    .product-action-icons button.copy-product-link {
        width: 26px;
        height: 26px;
    }
    
    .product-action-icons i {
        font-size: 16px;
    }
    
    .product-action-icons a:hover,
    .product-action-icons button.copy-product-link:hover {
        transform: translateY(-2px);
    }

    /* تحديث حالات النسخ للجوال */
    button.copy-product-link.hubtrend-copying,
    button.copy-product-link.hubtrend-copied,
    button.copy-product-link.hubtrend-failed {
        transform: translateY(-2px);
    }
}

/* دعم تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .product-action-icons {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .product-action-icons a,
    .product-action-icons button.copy-product-link {
        transition: none;
    }
    
    .product-action-icons a:hover,
    .product-action-icons button.copy-product-link:hover {
        transform: none;
    }

    button.copy-product-link.hubtrend-copying,
    button.copy-product-link.hubtrend-copied,
    button.copy-product-link.hubtrend-failed {
        transform: none;
    }
}

/* تحسينات للأجهزة التي تلمس فقط */
@media (hover: none) and (pointer: coarse) {
    .product-action-icons a:hover,
    .product-action-icons button.copy-product-link:hover {
        transform: none;
    }
}

/* حالة التحميل الأولي */
.product-action-icons.loading {
    opacity: 0.6;
    pointer-events: none;
}