/* ====================================
   WooCommerce Reviews Carousel Styles
   ==================================== */

.wrc-container {
    margin: 35px auto;
    max-width: 1200px;
    padding: 0 20px;
    direction: rtl;
}

.wrc-swiper {
    padding: 20px 50px 60px;
    position: relative;
}

/* بطاقة التقييم */
.wrc-review-card {
    background: var(--wrc-bg);
    border: 2px dashed var(--wrc-border);
    border-radius: var(--wrc-radius);
    padding: var(--wrc-padding);
    min-height: 250px;
    height: 100%; /* توحيد الارتفاع */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wrc-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* النجوم */
.wrc-rating {
    margin-bottom: 15px;
    text-align: center;
}

.wrc-stars {
    display: inline-block;
}

.wrc-star {
    color: #ddd;
    font-size: 20px;
    margin: 0 2px;
}

.wrc-star.filled {
    color: #ffd700;
}

/* نص التقييم */
.wrc-review-text {
    color: var(--wrc-text);
    font-size: var(--wrc-font-size);
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: center;
    font-style: regular;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* للتحكم في النصوص الطويلة */
}

/* اسم العميل */
.wrc-reviewer-name {
    color: var(--wrc-text);
    font-size: var(--wrc-name-size);
    font-weight: 600;
    text-align: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--wrc-border);
}

/* أزرار التنقل */
.wrc-swiper .swiper-button-next,
.wrc-swiper .swiper-button-prev {
    color: var(--wrc-border);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.wrc-swiper .swiper-button-next:after,
.wrc-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.wrc-swiper .swiper-button-next:hover,
.wrc-swiper .swiper-button-prev:hover {
    background: var(--wrc-border);
    color: white;
    transform: scale(1.1);
}

/* النقاط */
.wrc-swiper .swiper-pagination {
    bottom: 20px;
}

.wrc-swiper .swiper-pagination-bullet {
    background: var(--wrc-border);
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

.wrc-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 5px;
}

/* التجاوب مع الشاشات */

/* شاشات كبيرة جداً */
@media (min-width: 1400px) {
    .wrc-container {
        max-width: 1400px;
    }
}

/* أجهزة اللابتوب */
@media (max-width: 1024px) {
    .wrc-swiper {
        padding: 20px 40px 60px;
    }
    
    .wrc-review-card {
        min-height: 220px;
        padding: calc(var(--wrc-padding) * 0.9);
    }
}

/* التابلت */
@media (max-width: 768px) {
    .wrc-container {
        padding: 0 15px;
    }
    
    .wrc-swiper {
        padding: 15px 30px 50px;
    }
    
    .wrc-review-card {
        min-height: 200px;
        padding: calc(var(--wrc-padding) * 0.8);
        aspect-ratio: 1 / 1; /* جعل البوكس مربع على التابلت والموبايل */
    }
    
    .wrc-review-text {
        font-size: calc(var(--wrc-font-size) * 0.9);
    }
    
    .wrc-reviewer-name {
        font-size: calc(var(--wrc-name-size) * 0.9);
    }
    
    .wrc-swiper .swiper-button-next,
    .wrc-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .wrc-swiper .swiper-button-next:after,
    .wrc-swiper .swiper-button-prev:after {
        font-size: 16px;
    }
}

/* الموبايل */
@media (max-width: 480px) {
    .wrc-container {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    .wrc-swiper {
        padding: 10px 20px 40px;
    }
    
    .wrc-review-card {
        min-height: 180px;
        padding: calc(var(--wrc-padding) * 0.7);
        aspect-ratio: 1 / 1; /* جعل البوكس مربع على الموبايل */
    }
    
    .wrc-review-text {
        font-size: calc(var(--wrc-font-size) * 0.85);
        margin-bottom: 15px;
    }
    
    .wrc-reviewer-name {
        font-size: calc(var(--wrc-name-size) * 0.85);
        padding-top: 10px;
    }
    
    .wrc-rating {
        margin-bottom: 10px;
    }
    
    .wrc-star {
        font-size: 18px;
    }
    
    .wrc-swiper .swiper-button-next,
    .wrc-swiper .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .wrc-swiper .swiper-button-next:after,
    .wrc-swiper .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .wrc-swiper .swiper-pagination {
        bottom: 10px;
    }
}

/* إخفاء الأزرار على الشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .wrc-swiper .swiper-button-next,
    .wrc-swiper .swiper-button-prev {
        display: none;
    }
}

/* تأثيرات الانتقال */
.swiper-slide {
    height: auto;
}

.swiper-slide-active .wrc-review-card {
    opacity: 1;
}

.swiper-slide-prev .wrc-review-card,
.swiper-slide-next .wrc-review-card {
    opacity: 0.7;
}

/* رسائل عدم وجود تقييمات */
.wrc-container p {
    text-align: center;
    color: #999;
    font-size: 18px;
    padding: 40px;
}

/* تحسينات للأداء */
.wrc-review-card {
    will-change: transform;
}

.wrc-swiper .swiper-button-next,
.wrc-swiper .swiper-button-prev {
    will-change: transform;
}

/* دعم اللغة العربية */
.wrc-container[dir="rtl"] .swiper-button-next {
    left: 10px;
    right: auto;
}

.wrc-container[dir="rtl"] .swiper-button-prev {
    right: 10px;
    left: auto;
}

/* وضع التحميل */
.wrc-loading {
    text-align: center;
    padding: 60px 20px;
}

.wrc-loading:after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--wrc-border);
    border-radius: 50%;
    border-top-color: transparent;
    animation: wrc-spin 1s linear infinite;
}

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

/* تحسينات الطباعة */
@media print {
    .wrc-swiper .swiper-button-next,
    .wrc-swiper .swiper-button-prev,
    .wrc-swiper .swiper-pagination {
        display: none;
    }
    
    .wrc-review-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
