/* --- Force Full Width for Stats Tab and Parents --- */

/* Target the main content area for single posts (adjust if theme uses different IDs/classes) */
body.single-btolat_match #primary.content-area,
body.single-btolat_match main.site-main,
body.single-btolat_match article.btolat-match-article {
    max-width: none; /* Remove any max-width constraint from theme */
    width: 100%;     /* Ensure these parents can expand */
    padding-left: 0; /* Remove theme padding if it interferes */
    padding-right: 0;
    margin-left: auto; /* Ensure centering if needed */
    margin-right: auto;
    box-sizing: border-box;
}

/* Target the specific statistics tab content */
.btolat-match-single-page .btolat-match-tab-content#statistics-tab {
    width: 100%;
    max-width: none; /* Override theme constraints */
    box-sizing: border-box;
    padding: 0; /* Remove padding from tab, apply to container instead */
    margin: 0;
    float: none;
}

/* Re-apply padding to the inner stats container */
.btolat-match-single-page .btolat-stats-container-botolat {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 10px 5px; /* Padding inside the container */
    margin: 0 auto; /* Center container if needed, remove side margin */
    float: none;
    /* ... rest of existing .btolat-stats-container-botolat styles ... */
    font-family: 'cairo', "Readex Pro", sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    text-align: right;
    background-color: #f5f5f5 !important;
    border-radius: 4px; /* Apply radius to container */
    border: 1px solid #ddd;
    /* border-top: none; */ /* Decide if you need top border */
    box-shadow: 0 1px 1px #eee !important;
    font-size: 14px;
}

/* Ensure cards take full width within the container */
.btolat-match-single-page .btolat-stats-container-botolat .card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 10px 0; /* Vertical margin only */
    float: none;
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.15);
    padding: 7px;
    text-align: right;
    background-color: #fff;
    border: 1px solid #e3e4e6;
    border-radius: 4px;
    position: relative;
    display: block;
}

/* Adjust heading line calculation based on container padding */
.btolat-match-single-page .btolat-stats-container-botolat .tabTitle {
    width: 100%;
    padding: 0 10px; /* Padding for the line ends */
    /* ... rest of heading styles ... */
    position: relative;
    text-align: center;
    display: block;
    font-weight: 700;
    margin: 20px auto 25px auto;
    font-size: 14px;
    color: #555;
    border: none;
    background: none;
    box-sizing: border-box;
}
.btolat-match-single-page .btolat-stats-container-botolat .tabTitle::before {
    width: calc(100% - 20px); /* Line width = container width - (2 * padding) */
    right: 10px; /* Start after padding */
    /* ... rest of line styles ... */
    content: "";
    position: absolute;
    height: 1px;
    top: 50%;
    transform: translateY(-50%);
    background: #aaa;
    z-index: 0;
}




/* single-match.css */

/* --- Match Card --- */

.btolat-match-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    background-image: url('/wp-content/plugins/scoretank plugin/images/card.jpg');
    background-size: cover;
    background-position: center;
}

.btolat-team1-info,
.btolat-team2-info {
    display: flex;
    flex-direction: column; /* Stack logo and name vertically */
    align-items: center; /* Center content */
    width: 25%; /* Adjust as needed */
    
}

.btolat-team1-info img,
.btolat-team2-info img {
    max-width: 40px; /* Smaller logos */
    max-height: 40px;
    margin-bottom: 5px;
}

.btolat-team1-info .team-name,
.btolat-team2-info .team-name {
    font-weight: bold;
    text-align: center; /* Center team name */
    color: #fff;
}

.btolat-team1-score,
.btolat-team2-score {
    font-size: 1.5em;
    font-weight: bold;
    margin-left: 5px; /* Space between logo and score */
    color: #ffffff;
}

.btolat-match-center {
    display: flex;
    flex-direction: column; /* Stack status and time vertically */
    align-items: center;
    text-align: center;
    width: 50%; /* Adjust as needed */
    font-weight: bold;
    color: #fff;
}
.btolat-match-league{
    font-size: 0.7em;
    font-weight: bold;
    color: #fff;
    
}
.btolat-match-status {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.2em; /* Make status text larger */
    color: #fff;
}

/* Status Colors */
.match-status.ended,
.btolat-match-status.ended {
    color: #007bff;
}

.match-status.live,
.btolat-match-status.live {
    color: #dc3545;
    animation: blinker 1s linear infinite;
}

.match-status.notYet,
.btolat-match-status.notYet {
    color: #28a745;
}

.match-status.Postponed,
.btolat-match-status.Postponed {
    color: #ffc107;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Tabs */
.btolat-match-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.btolat-match-tabs .tab-button {
    background-color: #f2f2f2;
    color: #000;
    border: none;
    padding: 10px 20px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
}

.btolat-match-tabs .tab-button:last-child {
    margin-right: 0;
}

.btolat-match-tabs .tab-button.active {
    background-color: #007bff;
    color: #fff;
}

.btolat-match-tab-content {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
}

.btolat-match-tab-content.active {
    display: block; /* Show active tab */
}


/* --- ★★★ (مُعدل) Lineups ★★★ --- */

/* استخدام الكلاسات من PHP */
.btolat-lineups-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
/* استخدام الكلاسات من PHP */
.btolat-lineup-column {
    width: 48%; /* تعديل بسيط لترك مسافة */
}
/* استخدام الكلاسات من PHP */
.btolat-lineup-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}
.btolat-lineup-header img {
    max-width: 48px; max-height: 48px; margin-bottom: 5px;
}
.btolat-lineup-column h4 { /* استهداف h4 للبدلاء والأساسيين */
    margin-bottom: 5px;
    font-size: 1.1em;
    font-weight: bold;
}
/* استخدام الكلاسات من PHP */
.btolat-player-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    list-style: none; /* إزالة النقاط */
    padding: 0; /* إزالة الحشو الافتراضي */
    margin: 0 0 15px 0; /* إضافة هامش سفلي */
}
/* ★ استهداف عناصر li التي يتم إنشاؤها */
.btolat-player-list li {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 5px 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}
/* استهداف كلاس البدلاء */
.btolat-player-list.btolat-subs-list li {
    font-style: italic;
    color: #666;
}
/* استخدام الكلاسات من PHP/JS */
.btolat-player-thumb {
    width: 30px; height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}
/* استخدام الكلاسات من PHP/JS */
.btolat-player-name {
    flex-grow: 1;
    margin-right: 8px;
    font-size: 0.9em;
}
/* استخدام الكلاسات من PHP/JS */
.btolat-player-number {
    font-size: 0.9em;
    font-weight: bold;
    /* يمكن إضافة ألوان هنا إذا أردت */
}

/* --- تنسيق ركلات الترجيح (صفحة المباراة الفردية) --- */
.btolat-match-center .btolat-match-penalty-score {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff; /* لون أبيض مثل باقي العناصر */
    margin-top: 3px;
    /* (اختياري) إضافة وميض إذا أردت */
    /* animation: blinker 1s linear infinite; */
}

/* --- ★★★ (مُعدل v4) Events - RTL Fix Attempt 2 ★★★ --- */
.btolat-match-events {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.btolat-timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px 0;
    margin: 0 auto;
    max-width: 700px;
}

/* الخط المركزي */
.btolat-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #e0e0e0;
    transform: translateX(-50%);
    z-index: 1;
}

/* حاوية الحدث (مشتركة) */
.btolat-timeline-event {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    width: 50%;
    box-sizing: border-box;
    z-index: 2;
}

/* --- فريق 1 (يجب أن يظهر يمين الخط في RTL) --- */
.btolat-timeline-event.btolat-team1-event {
    align-self: flex-start; /* ★ التغيير: استخدام flex-start لوضعه يميناً في RTL */
    padding-right: 25px;    /* ★ التغيير: مسافة من الخط المركزي (لجهة اليمين) */
    padding-left: 0;        /* إلغاء الحشو الأيسر */
    flex-direction: row-reverse; /* المحتوى -> الوقت -> الأيقونة */
}
/* الوقت للفريق الأول */
.btolat-timeline-event.btolat-team1-event .btolat-event-time {
    order: 1; text-align: right; margin-right: 8px; margin-left: 0;
}
/* المحتوى للفريق الأول */
.btolat-timeline-event.btolat-team1-event .btolat-event-content {
    order: 0; text-align: right;
}
/* الأيقونة للفريق الأول (على الخط من اليمين) */
.btolat-timeline-event.btolat-team1-event .btolat-event-marker {
    order: 2; position: absolute;
    right: 0; /* ★ التغيير: على الحافة اليمنى للحاوية اليمنى */
    transform: translateX(50%); /* ★ التغيير: تحريكها لليمين لتقع على الخط */
}

/* --- فريق 2 (يجب أن يظهر يسار الخط في RTL) --- */
.btolat-timeline-event.btolat-team2-event {
    align-self: flex-end; /* ★ التغيير: استخدام flex-end لوضعه يساراً في RTL */
    padding-left: 25px;     /* ★ التغيير: مسافة من الخط المركزي (لجهة اليسار) */
    padding-right: 0;       /* إلغاء الحشو الأيمن */
    flex-direction: row; /* الأيقونة -> الوقت -> المحتوى */
}
/* الوقت للفريق الثاني */
.btolat-timeline-event.btolat-team2-event .btolat-event-time {
    order: 1; text-align: left; margin-left: 8px; margin-right: 0;
}
/* المحتوى للفريق الثاني */
.btolat-timeline-event.btolat-team2-event .btolat-event-content {
    order: 2; text-align: right;
}
/* الأيقونة للفريق الثاني (على الخط من اليسار) */
.btolat-timeline-event.btolat-team2-event .btolat-event-marker {
    order: 0; position: absolute;
    left: 0; /* ★ التغيير: على الحافة اليسرى للحاوية اليسرى */
    transform: translateX(-50%); /* ★ التغيير: تحريكها لليسار لتقع على الخط */
}

/* تصميم الأيقونة (مشترك) */
.btolat-event-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #007bff; /* اللون الافتراضي للأحداث العادية */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}


/* تصميم محتوى الحدث (مشترك) */
.btolat-event-content {
    background-color: #f8f9fa; /* اللون الافتراضي للأحداث العادية */
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #eee;
    flex-grow: 1;
    font-size: 0.8em;
    font-weight: 500;
    position: relative;
}

/* تصميم وقت الحدث (مشترك) */
.btolat-event-time {
    font-weight: bold;
    color: #555;
    font-size: 0.75em;
    width: auto;
    white-space: nowrap;
}


/* --- ▼▼▼ بداية: تنسيقات خاصة بالعناوين الرئيسية (type: title) ▼▼▼ --- */

/* 1. تعديل حاوية العنوان الرئيسية */
.btolat-timeline-event.btolat-event-title {
    width: 100%; /* جعل الحاوية تأخذ العرض الكامل */
    align-self: center; /* توسيط الحاوية نفسها */
    justify-content: center; /* توسيط المحتوى داخل الحاوية */
    padding-left: 0; /* إلغاء الحشو الجانبي */
    padding-right: 0;
    flex-direction: row; /* التأكد من الترتيب الافتراضي */
    margin-top: 10px; /* إضافة هامش علوي إضافي */
    margin-bottom: 35px; /* زيادة الهامش السفلي */
}

/* 2. إخفاء الوقت للعنوان (لا نحتاجه) */
.btolat-timeline-event.btolat-event-title .btolat-event-time {
    display: none;
}

/* 3. تعديل أيقونة العنوان */
.btolat-timeline-event.btolat-event-title .btolat-event-marker {
    position: relative; /* إرجاعها للمسار الطبيعي */
    transform: none; /* إلغاء التحريك */
    order: 0; /* تأكد أنها الأولى */
    margin-right: 8px; /* إضافة هامش بسيط لليمين */
    background-color: #6c757d; /* لون خلفية مختلف */
    border-color: #5a6268; /* لون إطار مختلف */
    width: 50px; /* تصغيرها قليلاً */
    height: 50px;
}


/* 4. تعديل محتوى العنوان */
.btolat-timeline-event.btolat-event-title .btolat-event-content {
    order: 1; /* تأكد أنه الثاني */
    flex-grow: 0; /* عدم تمدد المحتوى */
    background-color: #e9ecef; /* لون خلفية مختلف */
    border-color: #ced4da;
    color: #495057; /* لون نص مختلف */
    font-weight: bold; /* خط أعرض */
    font-size: 0.85em; /* تكبير بسيط */
    text-align: center; /* توسيط النص */
    padding: 6px 15px; /* تعديل الحشو */
}
/* --- ▲▲▲ نهاية: تنسيقات خاصة بالعناوين الرئيسية ▲▲▲ --- */

/* --- نهاية تعديل Events --- */


/*--------------------------------------------------------------
# Btolat Matches - Statistics Tab Styles (v4 - Botolat Structure Emulation)
--------------------------------------------------------------*/

/* Main container - Ensure it takes available width */
.btolat-match-single-page .btolat-stats-container-botolat {
    padding: 10px 5px;
    font-family: 'cairo', "Readex Pro", sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    text-align: right;
    background-color: #f5f5f5 !important;
    border-radius: 0 0 4px 4px;
    border: 1px solid #ddd;
    border-top: none;
    box-shadow: 0 1px 1px #eee !important;
    font-size: 14px;
    width: 100%; /* ★ Ensure container takes full width */
    box-sizing: border-box; /* ★ Include padding in width */
    float: none; /* ★ Clear any potential floats */
    margin: 0; /* ★ Reset container margin if needed */
}

/* Section Headings - (Keep as is) */
.btolat-match-single-page .btolat-stats-container-botolat .tabTitle {
    /* ... (code remains the same) ... */
    position: relative;
    text-align: center;
    display: block;
    width: calc(100% - 20px);
    padding: 0px 20px;
    font-weight: 700;
    margin: 20px auto 25px auto;
    font-size: 14px;
    color: #555;
    border: none;
    background: none;
    box-sizing: border-box;
}
.btolat-match-single-page .btolat-stats-container-botolat .tabTitle span {
    z-index: 2;
    background: #f5f5f5;
    position: relative;
    padding: 0 15px;
    line-height: 22px;
    display: inline-block;
}
.btolat-match-single-page .btolat-stats-container-botolat .tabTitle::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background: #aaa;
    z-index: 0;
}


/* --- (CORRECTED) Head-to-Head Section - Text on Bar --- */
.btolat-h2h-summary-card {
    background-color: #fff;
    border: 1px solid #e3e4e6;
    border-radius: 4px;
    padding: 15px; /* Increased padding slightly */
    margin: 10px 0; /* Vertical margin only */
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.15);
    width: 100%; /* Ensure card takes full width */
    box-sizing: border-box;
}

/* Optional text numbers above the bar */
.btolat-h2h-numbers-text {
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 8px;
    color: #555;
}

/* (CRITICAL) H2H Bar Container */
.btolat-h2h-bar {
    display: flex; /* !! MUST have display: flex !! */
    height: 24px; /* !! MUST have a height > 0 !! */
    border-radius: 4px;
    overflow: hidden;
    background-color: #e9ecef;
    margin-top: 10px;
    font-size: 11px;
    font-weight: bold;
    color: #fff; /* Default text color */
    line-height: 24px; /* Center text vertically */
    text-align: center;
}

/* (CRITICAL) Colored Bar Segments */
.btolat-h2h-bar div {
    height: 100%; /* !! MUST have height: 100% !! */
    transition: width 0.5s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    padding: 0 5px;
    box-sizing: border-box;
    /* !! Background colors are critical !! */
}
.btolat-h2h-bar-t1 { background-color: #ff8028; } /* Matches Botolat color (Implicitly from .historyChartTeamAWin) */
.btolat-h2h-bar-dr { background-color: #aaa; color: #333; } /* Matches Botolat color (Implicitly from .historyChartDraw) */
.btolat-h2h-bar-t2 { background-color: #3a8bcc; } /* Matches Botolat color (Implicitly from .historyChartTeamBWin) */

/* Optional title above the bar */
.btolat-h2h-bar-title {
    font-size: 10px;
    color: #888;
    text-align: center;
    margin-bottom: 5px;
}
/* --- End H2H Section CSS --- */

/* Card Styling - Ensure full width */
.btolat-match-single-page .btolat-stats-container-botolat .card {
        box-shadow: inset -6px 6px 20px rgb(79 21 21 / 15%);
    padding: 7px;
    text-align: right;
    margin: 10px 0; /* ★ Adjusted margin: No side margin */
    background-color: #fff;
    border: 1px solid #e3e4e6;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%; /* ★ Force card to take full width */
    float: none; /* ★ Ensure no float is applied */
}
/* Ensure .card.active for standings looks the same */
.btolat-match-single-page .btolat-stats-container-botolat .card.active {
    margin: 10px 0; /* ★ Adjusted margin */
}

/* Row imitation (Keep as is) */
.btolat-match-single-page .btolat-stats-container-botolat .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -5px;
    margin-left: -5px;
}
.btolat-match-single-page .btolat-stats-container-botolat .col {
    position: relative;
    width: 100%;
    padding-right: 5px;
    padding-left: 5px;
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
    box-sizing: border-box;
}


/* --- H2H Summary Top Part - Matches Botolat .fastHis --- */
.btolat-match-single-page .btolat-h2h-summary-teams .col.fastHis { /* */
    flex: 1; /* Equal width columns */
    font-size: 14px; /* */
    font-weight: 700; /* */
    padding: 0 5px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
.btolat-match-single-page .btolat-h2h-summary-teams .col.fastHis.text-right { justify-content: flex-end; } /* */
.btolat-match-single-page .btolat-h2h-summary-teams .col.fastHis.text-center { justify-content: center; color: #111; } /* */
.btolat-match-single-page .btolat-h2h-summary-teams .col.fastHis.text-left { justify-content: flex-start; } /* */
.btolat-match-single-page .btolat-h2h-summary-teams .imgHis { /* */
    width: 30px; /* */
    height: 30px; /* */
    margin: 0 5px;
}
.btolat-match-single-page .btolat-h2h-summary-teams .text-right span { margin-left: 5px; } /* */
.btolat-match-single-page .btolat-h2h-summary-teams .text-left span { margin-right: 5px; } /* */

/* --- H2H Chart Styling (Matches Botolat) --- */
.btolat-match-single-page .historyChart { /* */
    display: flex;
    width: 100%;
    padding: 15px 10px 0 10px !important; /* */
    margin: 15px auto 5px auto !important;
    font-size: 12px; /* */
    height: 30px;
    box-sizing: border-box;
}
/* Segments (Win, Draw, Lose) */
.btolat-match-single-page .historyChart > div[class*="historyChart"] {
    position: relative; /* */
    padding-top: 13px; /* */
    text-align: center;
    box-sizing: border-box;
}
/* The Bar Span */
.btolat-match-single-page .historyChart > div[class*="historyChart"] > span:first-child {
    height: 6px; /* */
    display: block; /* */
    position: absolute; /* */
    top: 0; /* */
    left: 0; /* */
    right: 0; /* */
    width: 100%;
}
/* Bar Colors */
.btolat-match-single-page .historyChartTeamAWin > span:first-child { background-color: #ff8028; } /* */
.btolat-match-single-page .historyChartDraw > span:first-child { background-color: #aaa; } /* */
.btolat-match-single-page .historyChartTeamBWin > span:first-child { background-color: #3a8bcc; } /* */
/* Text Paragraph */
.btolat-match-single-page .historyChart p {
    text-align: center; /* */
    color: #111; /* */
    font-weight: 700; /* */
    margin: 0;
    line-height: 1;
    padding: 0 2px;
    white-space: nowrap;
}
/* Number Span inside Text */
.btolat-match-single-page .historyChart p span {
    background: transparent; /* */
    display: block;
    margin-top: 2px;
    position: static; /* Override absolute if inherited */
    font-weight: bold;
}
/* Number Colors */
.btolat-match-single-page .historyChartTeamAWin p span { color: #f89c22; } /* */
.btolat-match-single-page .historyChartDraw p span { color: #aaa; } /* */
.btolat-match-single-page .historyChartTeamBWin p span { color: #3a8bcc; } /* */


/* --- Match List Styling (Matches Botolat .TeamVsTeam) --- */
.btolat-match-single-page .TeamVsTeam {
    position: relative; /* */
    padding-bottom: 4px; /* */
    padding-top: 30px; /* Space for date/place */
    margin: 4px 5px !important; /* Adjust margin to fit card padding */
    border-bottom: 1px solid #e5e5e5; /* */
    min-height: 60px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
.btolat-match-single-page .card > .TeamVsTeam:last-child {
    border-bottom: 0px; /* */
}

/* Date and Place */
.btolat-match-single-page .dateAndPlace {
    position: absolute;
    top: 5px;
    right: 5px; /* Adjust positioning within card padding */
    left: auto;
    font-size: 11px;
    color: #555;
    text-align: right; /* */
    padding: 0;
    width: auto;
    flex-grow: 0;
    max-width: none;
}
.btolat-match-single-page .dateAndPlace p {
    margin: 0;
    line-height: 1.3;
}
.btolat-match-single-page .dateAndPlace p span { /* League Name */
    display: block; /* */
    color: #3a8bcc; /* */
    font-weight: normal;
}

/* Team Sections Common */
.btolat-match-single-page .teamA,
.btolat-match-single-page .teamB {
    padding: 0 !important;
    font-size: 10px;
    line-height: 1.4;
    flex: 1;
    max-width: 50%;
    box-sizing: border-box;
}
.btolat-match-single-page .teamA .row, /* Inner row */
.btolat-match-single-page .teamB .row {
    display: flex; /* */
    align-items: center; /* */
    margin: 0 !important;
}

/* Team A Specific */
.btolat-match-single-page .teamA { text-align: left; } /* */
.btolat-match-single-page .teamA .row { justify-content: flex-start; }
.btolat-match-single-page .teamA .col-7 { order: 1; text-align: left; padding-left: 5px; } /* */
.btolat-match-single-page .teamA .col-2:nth-of-type(2) { order: 2; padding: 0 3px; }
.btolat-match-single-page .teamA .col-2:nth-of-type(3) { order: 3; padding-right: 5px; font-weight: bold; font-size: 18px; color: #111; } /* */

/* Team B Specific */
.btolat-match-single-page .teamB { text-align: right; } /* */
.btolat-match-single-page .teamB .row { justify-content: flex-end; }
.btolat-match-single-page .teamB .col-2:nth-of-type(1) { order: 1; padding-left: 5px; font-weight: bold; font-size: 18px; color: #111; } /* */
.btolat-match-single-page .teamB .col-2:nth-of-type(2) { order: 2; padding: 0 3px; }
.btolat-match-single-page .teamB .col-7 { order: 3; text-align: right; padding-right: 5px;}

/* Common styles for inner cols */
.btolat-match-single-page .TeamVsTeam .col-7,
.btolat-match-single-page .TeamVsTeam .col-2 {
    flex: none;
    padding: 0;
    max-width: none;
    box-sizing: border-box;
}
.btolat-match-single-page .TeamVsTeam .col-7 { width: calc(100% - 60px); } /* Adjust width for name */
.btolat-match-single-page .TeamVsTeam .col-2 { width: 30px; text-align: center; } /* Width for logo/score */
.btolat-match-single-page .TeamVsTeam .col-2 span { font-size: 18px; line-height: 1; } /* Adjust score size */

/* Team Name Link */
.btolat-match-single-page .TeamVsTeam a {
    font-size: 10px !important; /* */
    text-decoration: none; /* */
    font-weight: 700; /* */
    color: #111; /* */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
/* Logo */
.btolat-match-single-page .TeamVsTeam img {
    max-width: 20px; /* */
    max-height: 20px; /* */
    vertical-align: middle;
}
/* Win/Lose Color */
.btolat-match-single-page .TeamVsTeam .lose a {
    color: #999; /* */
}


/* --- Standings Table (Matches Botolat .leagueTable) --- */
.btolat-match-single-page .btolat-stats-table-container { /* Wrapper for scroll */
    overflow-x: auto; /* ★ This enables horizontal scroll ★ */
    margin: 0; /* Reset margin */
    background: #fff; /* Keep background */
    border: 1px solid #e3e4e6; /* Keep border */
    border-radius: 4px; /* Keep radius */
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.15); /* Keep shadow */
}

.btolat-match-single-page .leagueTable { /* */
    width: 100%; /* */
    border-collapse: collapse; /* */
    font-size: 12px; /* */
    color: #333; /* */
    min-width: 0; /* Let scroll handle width */
    min-width: 250px;
}
.btolat-match-single-page .leagueTable th,
.btolat-match-single-page .leagueTable td {
    padding: 5px; /* */
    text-align: center; /* */
    border-bottom: 1px solid #eee; /* */
    white-space: nowrap;
}
.btolat-match-single-page .leagueTable tr:last-child td {
     border-bottom: 0px; /* */
}
.btolat-match-single-page .leagueTable th {
    background: white; /* */
    position: sticky; /* */
    top: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); /* */
    font-weight: normal;
    color: #555;
    padding: 8px 5px; /* Adjust header padding */
    z-index: 1;
}
.btolat-match-single-page .leagueTable .groupTitle { /* */
    color: #4c9ce1; /* */
    text-align: right !important; /* */
    font-weight: 700; /* */
    font-size: 16px; /* */
    background: #fff; /* Ensure background matches */
}
.btolat-match-single-page .leagueTable tbody tr:hover {
    background: #f5f5f5; /* */
}
.btolat-match-single-page .leagueTable td:nth-child(2) { /* Team Name column */
    text-align: right; /* */
    width: auto;
    min-width: 150px;
    white-space: normal;
}
.btolat-match-single-page .leagueTable td a {
    text-decoration: none; /* */
    color: #333; /* */
    font-weight: bold;
    display: flex;
    align-items: center;
}
.btolat-match-single-page .leagueTable td img { /* Team Logo */
    max-width: 20px; /* */
    max-height: 20px; /* */
    margin-left: 5px; /* */
}
.btolat-match-single-page .leagueTable td b { /* Rank/Points numbers */
    font-size: 11px; /* */
}
/* Highlight classes */
.btolat-match-single-page .leagueTable .btolat-stats-highlight-t1 { background-color: rgba(255, 128, 40, 0.08); }
.btolat-match-single-page .leagueTable .btolat-stats-highlight-t2 { background-color: rgba(58, 139, 204, 0.08); }

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    /* Reduce heading size slightly */
    .btolat-match-single-page .btolat-stats-container-botolat h1.tabTitle,
    .btolat-match-single-page .btolat-stats-container-botolat h2.tabTitle {
        font-size: 10px;
        margin: 15px auto 20px auto;
        padding: 0 10px; /* Reduce padding further */
    }

    /* H2H Summary */
    .btolat-match-single-page .btolat-h2h-summary-teams .col.fastHis { font-size: 11px; padding: 0 2px;}
    .btolat-match-single-page .btolat-h2h-summary-teams .imgHis { width: 20px; height: 20px; margin: 0 3px; }

    /* H2H Chart */
    .btolat-match-single-page .historyChart { font-size: 10px; padding: 15px 5px 0 5px !important; }

    /* Match Lists */
    .btolat-match-single-page .TeamVsTeam { padding-top: 35px; min-height: 55px; }
    .btolat-match-single-page .dateAndPlace { font-size: 9px; right: 5px; }
    .btolat-match-single-page .TeamVsTeam a { font-size: 8px !important; }
    .btolat-match-single-page .TeamVsTeam img { max-width: 16px; max-height: 16px; }
    .btolat-match-single-page .TeamVsTeam .col-2 span { font-size: 14px; }
    .btolat-match-single-page .TeamVsTeam .col-7 { width: calc(100% - 45px); } /* Adjust name width */
    .btolat-match-single-page .TeamVsTeam .col-2 { width: 22px; } /* Adjust logo/score width */

    /* تعديلات جدول الترتيب */
    .btolat-match-single-page .leagueTable {
        font-size: 10px; /* تصغير إضافي لحجم الخط */
        min-width: 0; /* ★ إزالة العرض الأدنى للسماح بالانكماش ★ */
    }
    .btolat-match-single-page .leagueTable th,
    .btolat-match-single-page .leagueTable td {
        padding: 4px 1px; /* ★ تقليل الحشو بشكل كبير ★ */
        white-space: nowrap; /* إبقاء nowrap للإحصائيات */
    }
     /* عمود اسم الفريق (الآن هو العمود الثاني index 2) */
    .btolat-match-single-page .leagueTable td:nth-child(2) {
        min-width: 70px; /* ★ تقليل العرض الأدنى */
        white-space: normal; /* ★ السماح لاسم الفريق بالالتفاف ★ */
        padding: 4px 3px; /* حشو أكبر قليلاً للاسم */
        font-weight: normal; /* وزن خط عادي قد يوفر مساحة */
    }
     .btolat-match-single-page .leagueTable td:nth-child(2) img {
         max-width: 16px; /* تصغير الشعار */
         max-height: 16px;
         margin-left: 3px;
     }
   
}


@media (max-width: 480px) {
    /* تعديلات إضافية */
    .btolat-match-single-page .leagueTable {
        font-size: 9px;
    }
    .btolat-match-single-page .leagueTable th,
    .btolat-match-single-page .leagueTable td {
        padding: 3px 1px;
    }
    .btolat-match-single-page .leagueTable td:nth-child(2) { /* اسم الفريق */
        min-width: 60px; /* تقليل إضافي للعرض الأدنى */
         padding: 3px 2px;
    }
     .btolat-match-single-page .leagueTable td:nth-child(2) img {
         max-width: 14px;
         max-height: 14px;
     }

    /* تأكد من إزالة أي قواعد display:none للأعمدة هنا إذا كانت لا تزال موجودة */
}

/*--------------------------------------------------------------
# End Btolat Matches - Statistics Tab Styles
--------------------------------------------------------------*/


/* Responsive */
@media (max-width: 768px) {
    /* ... (تعديلات أخرى للهاتف) ... */

    /* Lineups on mobile: Keep the desktop layout, adjust sizes */
    .btolat-lineups-container {
         /* Keep flex-direction: row; Adjust spacing if needed */
    }

    .btolat-lineup-column {
        width: 49%; /* Slightly adjust width if needed for spacing */
        margin-bottom: 15px; /* Add space if they wrap */
    }

    .btolat-lineup-header img {
        max-width: 40px;
        max-height: 40px;
    }

    .btolat-lineup-header h3 { /* Target h3 used in PHP */
        font-size: 0.9em; /* Smaller heading */
    }

    .btolat-lineup-column h4 { /* Subheadings */
        font-size: 0.8em; /* Smaller subheading */
    }

    .btolat-player-list li {
        padding: 3px 5px; /* Smaller padding */
        margin-bottom: 3px;
    }
     .btolat-player-thumb { /* Player image */
        width: 20px;
        height: 20px;
        margin-right: 5px;
    }
    .btolat-player-name, .btolat-player-number {
        font-size: 0.75em; /* Smaller font */
        margin-right: 5px;
    }
}

/*
--------------------------------------------------------------
# (إضافة) إصلاح استجابة التبويبات (بتقليص الحجم)
--------------------------------------------------------------
*/

@media (max-width: 768px) {

    .btolat-match-tabs {
        /* التأكد من أن الحاوية تستخدم العرض الكامل */
        width: 100%;
        box-sizing: border-box;
    }

    .btolat-match-tabs .tab-button {
        /* * 1. هذا هو الأمر الأهم:
         * flex: 1; هو اختصار لـ:
         * flex-grow: 1; (اسمح للزر بالتمدد)
         * flex-shrink: 1; (اسمح للزر بالانكماش)
         * flex-basis: 0; (اجعلهم يتشاركون المساحة بالتساوي)
        */
        flex: 1;
        
        /* 2. تصغير الحشو والخط ليناسب المساحات الضيقة */
        padding: 10px 5px; /* تقليل الحشو الأفقي */
        font-size: 12px;   /* تصغير الخط */
        
        /* 3. ضمان توسيط النص داخل الزر */
        text-align: center;
        
        /* 4. (اختياري) لضمان عدم خروج النص الطويل */
        white-space: normal;
        line-height: 1.3;
        
        /* 5. تقليل الهامش بين الأزرار */
        margin-right: 2px;
    }
    
    .btolat-match-tabs .tab-button:last-child {
        margin-right: 0;
    }
}

/* --- ★★★ بداية: تنسيق إطار الملعب والقنوات (V3 - يمين ويسار) ★★★ --- */

/* 1. الكارت الرئيسي (لا تغيير) */
.btolat-match-article .btolat-match-card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

/* 2. الحاوية الرئيسية للإطار الإضافي (★ التعديل هنا ★) */
.btolat-match-article .btolat-match-meta-info {
    display: flex;
    flex-direction: row;       /* ★ 1. تغيير إلى صف أفقي */
    flex-wrap: wrap;           /* السماح بالالتفاف (للقنوات الطويلة) */
    justify-content: space-between; /* ★ 2. دفع العناصر للأطراف (يمين ويسار) */
    align-items: center;       /* ★ 3. توسيط عمودي */
    gap: 12px;                  /* مسافة بين العناصر إذا التفوا */
    
    background-color: #f9f9f9; 
    border: 1px solid #eee;
    border-top: none; 
    border-radius: 0 0 8px 8px; 
    padding: 12px 15px;
    margin-bottom: 20px; 
    position: relative; 
}

/* 3. العناصر الداخلية (لا تغيير) */
.btolat-match-article .meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
}
.btolat-match-article .meta-icon {
    width: 16px;
    height: 16px;
    fill: #007bff; 
    margin-left: 8px; 
    flex-shrink: 0; 
}
.btolat-match-article .meta-item span {
    line-height: 1.4;
}

/* 4. تنسيق خاص للقنوات (★ تعديل بسيط ★) */
.btolat-match-article .meta-item.channels-item {
    white-space: normal; 
    flex-grow: 1;  /* السماح لعنصر القنوات بالتمدد ليأخذ المساحة المتبقية */
    flex-shrink: 1;
    min-width: 150px; /* حد أدنى للعرض قبل الالتفاف */
    justify-content: flex-start; 
    text-align: left; /* ★ محاذاة لليسار */
    direction: ltr; /* ★ ضمان اتجاه القنوات من اليسار لليمين */
}

/* 5. تنسيق خاص للملعب (★ تعديل بسيط ★) */
.btolat-match-article .meta-item.stadium-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0; /* عدم السماح للملعب بالانكماش (الأولوية له) */
    flex-grow: 0;
    text-align: right; /* ★ محاذاة لليمين (افتراضي RTL) */
    direction: rtl;
}



/* --- ★★★ نهاية: تنسيق إطار الملعب والقنوات ★★★ --- */