/**
 * RoSH WooCommerce Toolkit - Frontend Styles
 * تنسيقات الواجهة الأمامية للإضافة
 */

/* أزرار السلة */
.rwt-cart-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.rwt-cart-button {
    padding: 12px 24px;
    color: white;
    border: 2px solid;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--button-color, #000), var(--button-color-dark, #333));
    position: relative;
    overflow: hidden;
}

.rwt-cart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.rwt-cart-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rwt-cart-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.rwt-cart-button:hover::before {
    left: 100%;
}

.rwt-clear-button {
    --button-color: #dc3545;
    --button-color-dark: #c82333;
    border-color: #ff0000;
}

.rwt-screens-button {
    --button-color: #28a745;
    --button-color-dark: #218838;
    border-color: #28a745;
}

/* عرض الكمية المتبقية */
.rwt-stock-display,
.rwt-stock-display-shop {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.rwt-stock-display::before,
.rwt-stock-display-shop::before {
    content: '📦';
    margin-right: 5px;
}

.rwt-stock-display-shop {
    font-size: 11px;
    padding: 6px 12px;
}

/* نص المنتج غير المتوفر */
.rwt-out-of-stock {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rwt-out-of-stock::before {
    content: '❌';
    margin-right: 5px;
}

/* إشعار الخصم */
.rwt-discount-notice {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border-left: 5px solid #f1c40f;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.rwt-discount-notice::before {
    content: '💰';
    font-size: 18px;
    margin-right: 10px;
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .rwt-cart-buttons {
        flex-direction: column;
    }
    
    .rwt-cart-button {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .rwt-stock-display,
    .rwt-stock-display-shop {
        display: block;
        text-align: center;
        margin: 10px 0;
    }
}

/* تأثيرات التحميل */
.rwt-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.rwt-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: rwt-spin 1s linear infinite;
}

@keyframes rwt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* تحسينات إضافية للتصميم */
.woocommerce .rwt-cart-buttons {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
}

.woocommerce .rwt-cart-buttons::before {
    content: '🛠️ أدوات السلة';
    display: block;
    font-weight: 700;
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
}

/* تنسيقات خاصة بـ WooCommerce */
.woocommerce-cart .rwt-cart-buttons,
.woocommerce-checkout .rwt-cart-buttons {
    margin-top: 0;
}

/* تأثيرات الانتقال السلسة */
* {
    transition: all 0.3s ease;
}

/* تحسين مظهر الإشعارات */
.woocommerce-info.rwt-discount-notice {
    border-radius: 8px;
    font-weight: 500;
}

/* تنسيقات RTL للعربية */
[dir="rtl"] .rwt-cart-button::before {
    left: 100%;
}

[dir="rtl"] .rwt-cart-button:hover::before {
    left: -100%;
}

[dir="rtl"] .rwt-stock-display::before,
[dir="rtl"] .rwt-stock-display-shop::before,
[dir="rtl"] .rwt-out-of-stock::before,
[dir="rtl"] .rwt-discount-notice::before {
    margin-right: 0;
    margin-left: 5px;
}

