/* =========================================================
   TEAM OVERVIEW — STANDINGS
========================================================= */

.team-overview-standings-card {
    width: 100%;
    overflow: hidden;
}


/* =========================================================
   Header
========================================================= */

.team-overview-standings-card
.team-overview-card__header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 16px 18px;

    border-bottom: 1px solid #e5e7eb;
}


.team-overview-standings-card
.team-overview-card__header h2 {

    margin: 0;

    font-size: 18px;

    font-weight: 800;

    line-height: 1.4;
}


.team-overview-standings-card
.team-overview-card__header span {

    font-size: 13px;

    color: #6b7280;

    white-space: nowrap;
}


/* =========================================================
   Table Wrapper
========================================================= */

.team-overview-standings {

    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   Table
========================================================= */

.team-overview-standings
.lwf-standings-table {

    width: 100%;

    min-width: 900px;

    border-collapse: collapse;

    table-layout: auto;

    direction: rtl;
}


/* =========================================================
   Header
========================================================= */

.team-overview-standings
.lwf-standings-table thead th {

    padding: 11px 8px;

    background: #f8fafc;

    color: #475569;

    font-size: 12px;

    font-weight: 800;

    text-align: center;

    white-space: nowrap;

    border-bottom: 1px solid #e5e7eb;
}


/* =========================================================
   Rows
========================================================= */

.team-overview-standings
.lwf-standings-table tbody td {

    padding: 10px 8px;

    text-align: center;

    font-size: 13px;

    color: #334155;

    white-space: nowrap;

    border-bottom: 1px solid #f1f5f9;

    vertical-align: middle;
}


/* =========================================================
   Current Team
========================================================= */

.team-overview-standings
.lwf-standings-table tr.current-team td {

    font-weight: 700;
}


/* =========================================================
   Team Cell
========================================================= */

.team-overview-standings
.lwf-team-cell {

    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 9px;

    min-width: 170px;

    text-align: right;
}


.team-overview-standings
.lwf-team-cell span {

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   Team Logo
========================================================= */

.team-overview-standings
.lwf-team-logo {

    width: 32px;

    height: 32px;

    flex: 0 0 32px;

    object-fit: contain;
}


/* =========================================================
   Rank
========================================================= */

.team-overview-standings
.standings-rank {

    width: 42px;

    font-weight: 800;
}


/* =========================================================
   Points
========================================================= */

.team-overview-standings
.standings-points strong {

    font-size: 14px;

    font-weight: 900;
}


/* =========================================================
   Deduction
========================================================= */

.team-overview-standings
.lwf-deduction {

    color: #dc2626;

    font-weight: 800;
}


/* =========================================================
   Next Opponent
========================================================= */

.team-overview-standings
.lwf-next-team {

    width: 30px;

    height: 30px;

    object-fit: contain;
}


/* =========================================================
   Status Rows
========================================================= */

.team-overview-standings
.lwf-standings-table tr.champion-row td:first-child {

    font-weight: 900;
}


.team-overview-standings
.lwf-standings-table tr.promotion-row td:first-child {

    font-weight: 900;
}


.team-overview-standings
.lwf-standings-table tr.relegation-row td:first-child {

    font-weight: 900;
}


.team-overview-standings
.lwf-standings-table tr.withdrawn-row {

    opacity: .55;
}


.team-overview-standings
.lwf-standings-table tr.excluded-row {

    opacity: .45;
}


/* =========================================================
   Mobile
========================================================= */

@media (max-width: 700px) {

    .team-overview-standings-card
    .team-overview-card__header {

        padding: 14px 15px;

    }


    .team-overview-standings-card
    .team-overview-card__header h2 {

        font-size: 16px;

    }


    .team-overview-standings
    .lwf-standings-table {

        min-width: 850px;

    }

}

.lwf-team-cell {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.lwf-team-cell:hover {
    color: inherit;
}

.lwf-team-cell span {
    text-decoration: none;
}

.lwf-team-cell:hover span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =========================================================
   ألوان إبراز مراكز الترتيب
========================================================= */

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

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

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

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

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

.lwf-standings-legend {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 18px;
}

.lwf-standings-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

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

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

/* =========================================================
   French — Team Standings
========================================================= */

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

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

.lwf-standings-page--fr .match-standings-card-header {
    direction: ltr;
}

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

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

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

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

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

/* =========================================================
   French — Team page: move status indicators to the left
========================================================= */

/* يعتمد على لغة الصفحة مباشرة حتى لا يتوقف على وجود class إضافي في القالب */
html[lang^="fr"] .team-overview-standings
.lwf-standings-table tbody tr.withdrawn-row {
    box-shadow: inset 4px 0 0 #9ca3af !important;
    border-right: 0 !important;
}

html[lang^="fr"] .team-overview-standings
.lwf-standings-table tbody tr.excluded-row {
    box-shadow: inset 4px 0 0 #f97316 !important;
    border-right: 0 !important;
}
