/**
 * Btolat Matches - Swiper Slider (v2) CSS File
 * Styles for [btolat_matches_slider_v2] shortcode.
 * ★★★ ملف جديد بالكامل:
 * - ينسق هيكل Swiper.js.
 * - ينسق كرت المباراة (match-card) الجديد.
 * - متجاوب مع الموبايل.
 * - ★ تعديل: الأزرار الآن بإطار أبيض "فوق" السلايدر بارتفاع كامل.
 */

/* --- 1. الحاوية الرئيسية (البوكس الكامل) --- */
#btolat-swiper-slider.btolat-matches-slider-v2 {
    font-family: "Almarai", "sans-serif";
    background: #fff;
    border-radius: 8px;
    padding: 15px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    
    width: 100%; /* (أو العرض الذي حددته) */
    
    box-sizing: border-box;
}

/* --- 2. تبويبات (أمس/اليوم/غداً) --- */
#btolat-swiper-slider .calender {
    display: flex;
    position: relative;
    padding-bottom: 15px;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}
#btolat-swiper-slider .calender__days {
    display: flex;
    width: 100%; 
    justify-content: center;
}
#btolat-swiper-slider .calender__days-link {
    display: flex;
    padding: 2px 10px;
    
    font-size: 14px;
    transition: .3s;
    border-radius: 0; 
    color: #5B605D;
    background: #FFFFFF;
    align-items: center;
    justify-content: center;
    width: 77px;
    height: 32px;
    border: 1px solid #ddd; 
    box-sizing: border-box;
    font-weight: bold;
    text-decoration: none;
}
#btolat-swiper-slider .calender__days-link:last-child {
    margin-right: 0;
}
#btolat-swiper-slider .calender__days-link:hover {
    background: #f1f1f1;
}
#btolat-swiper-slider .calender__days-link.active {
    background: linear-gradient(to left, #489662, #489662);
    color: #fff;
    border-color: #24a557; 
}

/* --- 3. حاوية السويبر والأزرار --- */
.btolat-swiper-container {
    position: relative; 
}

/* ★★★ تم التعديل هنا ★★★ */
/* البوكس المقيد (يملأ الحاوية الآن) */
.btolat-swiper-container .swiper {
    width: 100%;
    height: 100%;
    overflow: hidden; /* "يقص" المباريات التي تخرج عن الإطار */
    
    /* تم إزالة الهوامش للسماح للأزرار بالطفو فوقه */
    margin-right: 0;
    margin-left: 0;
}

/* --- 4. الشريحة (Slide) --- */
.btolat-swiper-container .swiper-slide {
    width: 290px; 
    flex-shrink: 0;
    height: auto;
    box-sizing: border-box;
}

/* --- 5. كرت المباراة (Match Card) --- */
.match-card {
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
}
/* ... (باقي تنسيقات كرت المباراة كما هي) ... */
.match-card-league {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #444;
    padding: 8px;
    background: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.match-card-league:hover { background: #e9e9e9; }
.match-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px;
    flex-grow: 1;
}
.match-card-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
    text-decoration: none;
    color: #333;
}
.match-card-team .team-logo {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    object-fit: contain;
}
.match-card-team .team-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.match-card-team:hover .team-name { color: #008836; }
.match-card-status {
    width: 30%;
    text-align: center;
    text-decoration: none;
}
.match-card-score {
    font-size: 20px;
    font-weight: bold;
    color: #111;
    letter-spacing: 2px;
    margin-bottom: 5px;
    display: block;
}
.match-card-time {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background: #e0e0e0;
    border-radius: 4px;
    padding: 2px 5px;
    display: inline-block;
    min-width: 40px;
}
.match-card.match-status-live .match-card-time {
    background: #d22323;
    color: #fff;
    font-weight: bold;
}
.match-card.match-status-ended .match-card-time {
    background: #006c2b;
    color: #fff;
}
.match-card.match-status-fixtrue .match-card-score,
.match-card.match-status-postponed .match-card-score {
    display: none; 
}
.match-card.match-status-fixtrue .match-card-time {
    font-size: 16px;
    font-weight: bold;
    color: #111;
    background: none;
}

/* --- 6. أسهم Swiper --- */
/* --- 6. أسهم Swiper --- */
/* ★★★ تم تعديل هذا القسم بالكامل ★★★ */
/* الأزرار الآن بإطار أبيض "فوق" السلايدر بارتفاع كامل */
.btolat-swiper-container .swiper-button-prev,
.btolat-swiper-container .swiper-button-next {
    position: absolute;
    top: 0; 
    transform: translateY(0); 
    width: 40px; 
    height: 100%; 
    
    background: rgba(255, 255, 255, 0.85); 
    
    border: none; 
    border-radius: 0; 
    
    box-shadow: none;
    margin-top: 0; 
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* ★★★ هذا هو التعديل ★★★ */
    /* الأزرار ظاهرة بشكل دائم */
    opacity: 1; 
    transition: all 0.2s ease;
}

/* ★ تم حذف قاعدة :hover لإظهار الأزرار */

/* ★ تغيير لون أيقونة السهم */
.btolat-swiper-container .swiper-button-prev::after,
.btolat-swiper-container .swiper-button-next::after {
    font-size: 16px; 
    font-weight: bold;
    color: #000; 
}

/* ★ تحديد الموضع (على الحواف مباشرة) */
.btolat-swiper-container .swiper-button-prev {
    left: 0; 
}
.btolat-swiper-container .swiper-button-next {
    right: 0; 
}

/* ★ تحسين شكل الزر عند مرور الماوس فوقه */
.btolat-swiper-container .swiper-button-prev:hover,
.btolat-swiper-container .swiper-button-next:hover {
    background: rgba(255, 255, 255, 1); /* خلفية بيضاء كاملة */
}

.btolat-swiper-container .swiper-button-disabled {
    opacity: 0.1 !important; 
    cursor: not-allowed;
    pointer-events: none; 
}

/* --- 7. حالات التحميل والفارغ --- */
.btolat-loading-spinner,
.btolat-no-matches {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 140px; 
    font-size: 14px;
    font-weight: bold;
    color: #888;
}
.btolat-loading-spinner span {
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 5px;
}

/* ★ تنسيق ركلات الترجيح (جديد) */
.match-card-penalty {
    font-size: 14px;
    font-weight: bold;
    color: #d22323; /* (أحمر) */
    margin-bottom: 5px;
}
.match-card.match-status-ended .match-card-penalty {
    color: #006c2b; /* (أخضر إذا انتهت) */
}

/* --- 8. متجاوب (للموبايل) --- */
@media (max-width: 767px) {
    /* إلغاء البوكس المقيد في الموبايل والاعتماد على السحب */
    .btolat-swiper-container .swiper {
        margin-right: 0;
        margin-left: 0;
    }
    
    /* إخفاء الأزرار والاعتماد على السحب باللمس */
    .btolat-swiper-container .swiper-button-prev,
    .btolat-swiper-container .swiper-button-next {
        display: none;
    }

    /* جعل الكرت يأخذ عرض أكبر */
    .btolat-swiper-container .swiper-slide {
        width: 85%; 
    }

    /* تقليل الـ padding الرئيسي في الموبايل */
    #btolat-swiper-slider.btolat-matches-slider-v2 {
        padding: 10px;
    }
}