/**
 * Btolat Matches - Swiper Slider (v2) CSS File
 * Styles for [btolat_matches_slider_v2] shortcode.
 * ★★★ ملف مُعدل (v5 - النسخة المدمجة Compact) ★★★
 * - تقليل الارتفاعات والحشو (Padding) في كل مكان.
 * - تصغير التبويبات، الشعارات، والخطوط.
 * - إزالة المساحات الزائدة لجعله رفيعاً واحترافياً.
 */

/* --- 1. الحاوية الرئيسية (البوكس الكامل) --- */
#btolat-swiper-slider.btolat-matches-slider-v2 {
    font-family: "Almarai", "sans-serif";
    background: #fff;
    border-radius: 6px; /* تقليل التدوير */
    padding: 10px; /* ★ تقليل الحشو الرئيسي */
    box-shadow: 0 2px 6px 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: 10px; /* ★ تقليل المسافة السفلية */
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px; /* ★ تقليل المسافة السفلية */
}
#btolat-swiper-slider .calender__days {
    display: flex;
    width: 100%; 
    justify-content: center;
    gap: 0; /* التأكد من تلاصق الأزرار */
}
#btolat-swiper-slider .calender__days-link {
    display: flex;
    padding: 0 8px; /* ★ تقليل الحشو الجانبي */
    font-size: 12px; /* ★ تصغير الخط */
    transition: .3s;
    border-radius: 0; 
    color: #5B605D;
    background: #FFFFFF;
    align-items: center;
    justify-content: center;
    width: 70px; /* ★ تصغير العرض */
    height: 28px; /* ★ تصغير الارتفاع */
    border: 1px solid #ddd; 
    box-sizing: border-box;
    font-weight: bold;
    text-decoration: none;
}
#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;
    padding: 2px 0; /* مسافة بسيطة للظلال */
}

/* --- 4. الشريحة (Slide) --- */
.btolat-swiper-container .swiper-slide {
    width: 210px; /* ★ تصغير عرض الكرت */
    flex-shrink: 0;
    height: auto;
    box-sizing: border-box;
}

/* --- 5. كرت المباراة (Match Card) --- */
.match-card {
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.match-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

/* --- مكونات الكرت (تصغير شامل) --- */
.match-card-league {
    display: block;
    text-align: center;
    font-size: 10px; /* ★ خط صغير جداً للبطولة */
    font-weight: bold;
    color: #555;
    padding: 4px; /* ★ تقليل الحشو */
    background: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}
.match-card-league:hover { background: #e9e9e9; }

.match-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px; /* ★ حشو مضغوط جداً */
    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: 24px; /* ★ تصغير الشعار */
    height: 24px; /* ★ تصغير الشعار */
    margin-bottom: 4px; /* ★ تقريب الشعار من الاسم */
    object-fit: contain;
}
.match-card-team .team-name {
    font-size: 10px; /* ★ خط صغير للاسم */
    font-weight: 600;
    text-align: center;
    white-space: normal; /* التفاف */
    overflow: visible;
    text-overflow: clip;
    width: 100%;
    line-height: 1.1; /* تقليل ارتفاع السطر */
    min-height: auto; /* ★ إلغاء الارتفاع الإجباري */
}
.match-card-team:hover .team-name { color: #008836; }

/* تفاصيل الوسط (النتيجة/الوقت) */
.match-card-status {
    width: 30%;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.match-card-score {
    font-size: 16px; /* ★ تصغير النتيجة */
    font-weight: 800;
    color: #111;
    letter-spacing: 1px;
    margin-bottom: 2px;
    line-height: 1;
    display: block;
}
.match-card-time {
    font-size: 10px; /* ★ تصغير التوقيت */
    font-weight: 500;
    color: #666;
    background: #e0e0e0;
    border-radius: 3px;
    padding: 1px 4px;
    display: inline-block;
    min-width: 30px;
    line-height: 1.2;
}

/* حالات المباراة */
.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: 14px; /* حجم مناسب للتوقيت وحده */
    font-weight: bold;
    color: #333;
    background: none;
    padding: 0;
}

/* ركلات الترجيح */
.match-card-penalty {
    font-size: 9px; /* ★ تصغير */
    font-weight: bold;
    color: #d22323;
    margin-bottom: 2px;
    line-height: 1;
}
.match-card.match-status-ended .match-card-penalty {
    color: #006c2b;
}

/* --- 6. أسهم Swiper (الشريط الرأسي) --- */
.btolat-swiper-container .swiper-button-prev,
.btolat-swiper-container .swiper-button-next {
    position: absolute;
    top: 0; 
    transform: translateY(0); 
    width: 35px; /* ★ تصغير عرض الشريط */
    height: 100%; 
    
    background: #489662; 
    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: 0.8; 
    transition: all 0.2s ease;
}

.btolat-swiper-container .swiper-button-prev::after,
.btolat-swiper-container .swiper-button-next::after {
    font-size: 14px; /* ★ تصغير أيقونة السهم */
    font-weight: bold; 
    color: #fff; 
}

.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: #3a6680;
    opacity: 1;
}

.btolat-swiper-container .swiper-button-disabled {
    opacity: 0.05 !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: 100px; /* ★ تقليل ارتفاع حالة التحميل */
    font-size: 12px;
    font-weight: bold;
    color: #888;
}
.btolat-loading-spinner span {
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* --- 8. متجاوب (للموبايل) --- */
@media (max-width: 767px) {
    #btolat-swiper-slider.btolat-matches-slider-v2 {
        padding: 8px; /* حشو أقل للموبايل */
    }

    /* التبويبات في الموبايل */
    #btolat-swiper-slider .calender__days-link {
        width: 60px; /* أصغر */
        height: 26px;
        font-size: 11px;
    }

    /* الكرت في الموبايل */
    .btolat-swiper-container .swiper-slide {
        width: 180px; /* ★ كرت صغير جداً للموبايل */
    }
    
    /* إخفاء الأسهم في الموبايل */
    .btolat-swiper-container .swiper-button-prev,
    .btolat-swiper-container .swiper-button-next {
        display: none;
    }
    
    /* تعديلات إضافية للمحتوى في الموبايل */
    .match-card-league {
        font-size: 9px;
        padding: 3px;
    }
    .match-card-body {
        padding: 5px 3px;
    }
    .match-card-team .team-logo {
        width: 20px;
        height: 20px;
    }
    .match-card-team .team-name {
        font-size: 9px;
    }
    .match-card-score {
        font-size: 14px;
    }
    .match-card-time {
        font-size: 9px;
    }
    .match-card.match-status-fixtrue .match-card-time {
        font-size: 12px;
    }
}