.match-standings{

    margin:0;
     padding:0px;

}

.match-standings-card{

    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    overflow:hidden;

}

.match-standings-card-header{

    display:flex;

    justify-content:flex-end;

    align-items:center;

    padding:5px 10px 5px 6px;

    border-bottom:1px solid #edf2f7;
}
.match-competition{

    margin-left:auto;

    display:flex;
    flex-direction:row-reverse;

    align-items:center;

    gap:10px;

    background:transparent;
    color:#111827;

    font-size:17px;
    font-weight:500;

    margin-right:-10px;

    transform:translateY(-5px);

}

.match-competition img{

     order:1;
    width:35px;
    height:35px;
    object-fit:contain;
    margin-left:auto;

}

.lwf-standings-table{

    width:100%;

    margin:0;

    border-collapse:collapse;

}

.lwf-standings-table tbody tr{

    transition:.2s;

}

.lwf-standings-table tbody tr:hover{

    background:#f9fafb;

}

.lwf-standings-table th{

    padding:12px;
    background:#fff;

}

.lwf-standings-table thead th{

    background:#fff;
    color:#374151;
    font-size:13px;
    font-weight:700;
    border-bottom:1px solid #e5e7eb;

}

.lwf-standings-table td{

padding:10px;
text-align:center;
border-bottom:1px solid #eee;

}

.lwf-team-cell{

display:flex;
align-items:center;
font-size:14px;
gap:10px;

}

.lwf-team-logo{

width:28px;
height:28px;
object-fit:contain;

}

.lwf-next-team{

width:26px;
height:26px;
object-fit:contain;
  display:block;
    margin:0 auto;

}

.current-team{

    background:#f3f4f6;

    font-weight:500;

}

.lwf-deduction{

    color:#dc2626;
    font-weight:700;

}

.lwf-points{

    font-weight:700;
    color:#111827;
    font-size:15px;

}

.lwf-standings-table td:last-child,
.lwf-standings-table th:last-child{

    text-align:center;

}

.lwf-standings-table tbody tr:last-child td{

    border-bottom:none;

}

.lwf-tie-break-info{

    margin-top:20px;

    padding:18px;

    border:1px solid #dcdcde;

    border-radius:16px;

    background:#f8fafc;

}

.lwf-tie-break-info h4{

    margin:0 0 10px;

}

.lwf-tie-break-info p{

    margin-bottom:12px;

    color:#555;

}

.lwf-competition-info{

    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:20px;

}

.lwf-info-card{

    background:#fff;

    border:1px solid #e5e7eb;

    border-radius:16px;

    padding:22px 24px;

}

.lwf-info-card h4{

    margin:0 0 16px;

    font-size:18px;

    font-weight:700;

    display:flex;

    align-items:center;

    gap:8px;

    color:#111827;

}

.lwf-info-card p{

    margin:0 0 16px;

    line-height:2;

    color:#6b7280;

    font-size:14px;

}

.lwf-rules-list{

    display:flex;
    flex-direction:column;
    gap:10px;

    margin-top:18px;

}

.lwf-rule-row{

    display:flex;
    align-items:center;

    gap:14px;

    padding:14px 18px;

    border:1px solid #edf2f7;

    border-radius:12px;

    background:#fafafa;

    transition:.2s;

}

.lwf-rule-row:hover{

    background:#f3f4f6;

}

.lwf-rule-number{

    width:32px;
    height:32px;

    border-radius:50%;

    background:#2563eb;

    color:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:700;

    flex-shrink:0;

}

.lwf-rule-name{

    font-size:15px;

    font-weight:500;

    color:#111827;

}


/* =========================================
   ألوان حالات الترتيب - الخط الأيمن
========================================= */

.lwf-standings-table tbody tr.champion-row {
    box-shadow: inset -4px 0 0 #f59e0b;
}

.lwf-standings-table tbody tr.promotion-row {
    box-shadow: inset -4px 0 0 #16a34a;
}

.lwf-standings-table tbody tr.relegation-row {
    box-shadow: inset -4px 0 0 #ef4444;
}

.lwf-standings-table tbody tr.withdrawn-row {
    box-shadow: inset -4px 0 0 #9ca3af;
}

.lwf-standings-table tbody tr.excluded-row {
    box-shadow: inset -4px 0 0 #f97316;
}

.lwf-standings-legend{

   display:flex;

    align-items:center;

    gap:24px;

    padding:14px 22px;

}

.legend-item{

    display:flex;

    align-items:center;

    gap:8px;

    font-size:13px;

    color:#4b5563;

}

.legend-color{

    width:4px;

    height:18px;

    border-radius:0px;

    display:block;

    flex-shrink:0;

}

.legend-color.champion{
    background:#f59e0b;
}

.legend-color.promotion {
    background: #16a34a;
}

.legend-color.relegation {
    background: #ef4444;
}

.legend-color.withdrawn {
    background:#9ca3af;
}

.legend-color.excluded {
    background:#f97316;
}

.lwf-standings-filter{

    display:inline-flex;

    flex-direction:row;

    justify-content:flex-start;

    gap:8px;

    padding:6px 8px 8px 4px;

    border-bottom:1px solid #edf2f7;

}

.lwf-standings-filter button{

    background:#f8fafc;

    border:1px solid #dbe3eb;

    color:#374151;

    padding:6px 14px;

    border-radius:14px;

    cursor:pointer;

    transition:.2s;

    font-size:13px;

}

.lwf-standings-filter button.active{

    background:#16a34a;

    color:#fff;

    border-color:#16a34a;

}

/* ===================================
   Match Standings Mobile
=================================== */

@media (max-width:768px){

.match-standings{

    overflow-x:auto;

}



.lwf-standings-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
}



/* جميع الخلايا */

.lwf-standings-table th,
.lwf-standings-table td{

    padding:8px 6px;
    font-size:12px;
    white-space:nowrap;
    text-align:center;

}

/* رقم الترتيب */

.lwf-standings-table th:first-child,
.lwf-standings-table td:first-child{

    width:32px;
    min-width:32px;

}

/* الفريق */


.lwf-standings-table th:nth-child(2),
.lwf-standings-table td:nth-child(2) {
    text-align: right;
    padding-right: 6px;
    width: 30%;
    min-width: 0;
}


/* بقية الأعمدة */

.lwf-standings-table th:not(:first-child):not(:nth-child(2)),
.lwf-standings-table td:not(:first-child):not(:nth-child(2)){

    width:34px;
    min-width:34px;

}

/* الفريق */

.lwf-team-cell{

    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
  font-size: 12px;
    font-weight:500;
}

/* الشعار */

.lwf-team-logo{

    width:20px;
    height:20px;
    object-fit:contain;
    flex:none;

}


/* منع اسم الفريق من التداخل مع أعمدة الإحصائيات */

.lwf-standings-table td:nth-child(2) .lwf-team-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.lwf-standings-table td:nth-child(2) .lwf-team-cell img {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.lwf-standings-table td:nth-child(2) .lwf-team-cell span {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}


.lwf-standings-table td:nth-child(2) .lwf-team-cell span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* إخفاء الأعمدة */

.lwf-standings-table th:nth-child(4),
.lwf-standings-table td:nth-child(4),

.lwf-standings-table th:nth-child(5),
.lwf-standings-table td:nth-child(5),

.lwf-standings-table th:nth-child(6),
.lwf-standings-table td:nth-child(6),

.lwf-standings-table th:last-child,
.lwf-standings-table td:last-child{

    display:none;

}

}

/* =========================================================
   ترتيب المباراة - تنسيق رأس البطاقة
========================================================= */

.match-standings-card-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;

    padding: 0;

    border-bottom: 1px solid #edf2f7;
}


/* =========================================================
   أزرار الكل / داخل الأرض / خارج الأرض
========================================================= */

.lwf-standings-filter {
    display: flex;

    width: 100%;
    box-sizing: border-box;

    justify-content: flex-start;
    align-items: center;

    gap: 10px;

    padding: 18px 20px 18px 18px;

    border: 0;
}


/* =========================================================
   اسم المنافسة
========================================================= */

.match-competition {
    width: 100%;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: flex-end;
direction: rtl;

    flex-direction: row-reverse;

    gap: 10px;

    margin: 0;

    padding: 18px 18px;

    border-top: 1px solid #edf2f7;

    background: transparent;

    color: #111827;

    font-size: 17px;
    font-weight: 400;

    transform: none;
}


/* الشعار */
.match-competition img {
    order: 1;

    width: 35px;
    height: 35px;

    object-fit: contain;

    margin-left: 0;
}

.match-competition__link {
    color: inherit;
    text-decoration: none;
    font-size: 16px;
}

.match-competition__link:hover {
    text-decoration: underline;
}

@media (min-width: 993px) {

    /* بطاقة المباراة الرئيسية فقط */
    .match-single-card {
        width: calc(100% - 20px);
        margin-inline-start: 0;
        margin-inline-end: auto;
    }

    /* بطاقات العمود الجانبي */
    .match-sidebar .match-standings-card,
    .match-sidebar .lwf-info-card {
        width: 100%;
        margin-inline: 0;
    }

}


@media (max-width: 768px) {
    .match-page .match-content .match-standings-card {
        width: calc(100vw - 30px) !important;
        max-width: none !important;
        margin-left: calc((100% - (100vw - 30px)) / 2) !important;
        margin-right: calc((100% - (100vw - 30px)) / 2) !important;
        box-sizing: border-box !important;
    }
}



/* =========================================
   بطاقات معلومات المنافسة على الهاتف
   نفس عرض بطاقة الترتيب
========================================= */

@media (max-width: 768px) {

    .match-page .match-content .lwf-competition-info {
        width: calc(100vw - 30px) !important;
        max-width: none !important;

        margin-left: calc((100% - (100vw - 30px)) / 2) !important;
        margin-right: calc((100% - (100vw - 30px)) / 2) !important;

        box-sizing: border-box !important;
    }

    .match-page .match-content .lwf-info-card {
        width: 100% !important;
        max-width: 100% !important;

        margin-left: 0 !important;
        margin-right: 0 !important;

        box-sizing: border-box !important;
    }

}

/* =========================================================
   الترتيب - الفرنسية LTR
   ========================================================= */

.lwf-standings-page--fr {
    direction: ltr;
    text-align: left;
}


/* الفلاتر */

.lwf-standings-page--fr .lwf-standings-filter {
    direction: ltr;
    justify-content: flex-start;
    flex-direction: row;
}


/* رأس المنافسة */

.lwf-standings-page--fr .match-competition {
    direction: ltr;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}

.lwf-standings-page--fr .match-competition img {
    order: 0;
    margin-left: 0;
    margin-right: 0;
}

.lwf-standings-page--fr .match-competition__link {
    text-align: left;
}


/* الجدول */

.lwf-standings-page--fr .lwf-standings-table {
    direction: ltr;
}

.lwf-standings-page--fr .lwf-standings-table th,
.lwf-standings-page--fr .lwf-standings-table td {
    direction: ltr;
    text-align: center;
}


/* الفريق */

.lwf-standings-page--fr .lwf-team-cell {
    direction: ltr;
    justify-content: flex-start;
    text-align: left;
}


/* =========================================================
   معلومات الترتيب - الفرنسية LTR
   ========================================================= */

.lwf-competition-info--fr {
    direction: ltr !important;
    text-align: left !important;
}

.lwf-competition-info--fr .lwf-info-card {
    direction: ltr !important;
    text-align: left !important;
}

.lwf-competition-info--fr .lwf-info-card h4 {
    direction: ltr !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

.lwf-competition-info--fr .lwf-info-card p {
    direction: ltr !important;
    text-align: left !important;
}


/* =========================================================
   قواعد كسر التعادل
   ========================================================= */

.lwf-competition-info--fr .lwf-rules-list {
    direction: ltr !important;
}

.lwf-competition-info--fr .lwf-rule-row {
    direction: ltr !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

.lwf-competition-info--fr .lwf-rule-number {
    order: 1 !important;
}

.lwf-competition-info--fr .lwf-rule-name {
    order: 2 !important;
    text-align: left !important;
}


/* الأسطورة */

.lwf-standings-page--fr .lwf-standings-legend {
    direction: ltr;
    justify-content: flex-start;
}

.lwf-standings-page--fr .legend-item {
    direction: ltr;
}


/* الهاتف */

@media (max-width: 768px) {

    .lwf-standings-page--fr .lwf-standings-table th:nth-child(2),
    .lwf-standings-page--fr .lwf-standings-table td:nth-child(2) {
        text-align: left;
    }

    .lwf-standings-page--fr .lwf-team-cell {
        direction: ltr;
        justify-content: flex-start;
        text-align: left;
    }

}

/* =========================================================
   الترتيب داخل صفحة المباراة - الفرنسية
   ========================================================= */

@media (min-width: 993px) {

    .match-content .lwf-standings-page--fr {
        margin-left: auto !important;
        margin-right: 0 !important;
    }

}

/* =========================================================
   بطاقات معلومات الترتيب داخل صفحة المباراة - الفرنسية
   ========================================================= */

@media (min-width: 993px) {

    .match-content .lwf-competition-info--fr {
        margin-left: auto !important;
        margin-right: 0 !important;
    }

}