/* =========================================================
   TEAM LEVEL — LAST 5 MATCHES
========================================================= */

.team-level-card {
    overflow: hidden;
    box-sizing: border-box;
    min-height: 250px;
}

/* =========================================================
   Matches Container
========================================================= */

.team-level-card__matches {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    align-items: center;

    width: 100%;

    padding: 16px 14px 12px;

    box-sizing: border-box;

    gap: 10px;
}


/* =========================================================
   Match
========================================================= */

.team-level-match {
       overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 0;

    padding: 4px 2px;

    text-decoration: none;
    color: inherit;

    border: 0;
    background: transparent;

    box-sizing: border-box;

    transition: transform .2s ease;
}

.team-level-match:hover {

    transform: translateY(-2px);

}


/* =========================================================
   Score
========================================================= */

.team-level-match__score {

    display: flex;

    align-items: center;

    justify-content: center;

    min-width: 48px;

    height: 28px;

    padding: 0 7px;

    border-radius: 6px;

    box-sizing: border-box;

    font-size: 12px;

    font-weight: 700;

    line-height: 1;

    color: #ffffff;

    direction: ltr;

    margin-bottom: 0px;

}


/* =========================================================
   Win
========================================================= */

.team-level-match--w .team-level-match__score {

    background: #009b55;

}


/* =========================================================
   Draw
========================================================= */

.team-level-match--d .team-level-match__score {

    background: #9ca3af;

}


/* =========================================================
   Loss
========================================================= */

.team-level-match--l .team-level-match__score {

    background: #e33434;

}


/* =========================================================
   Opponent Logo
========================================================= */

.team-level-match img {

    width: 42px;

    height: 42px;

    flex: 0 0 42px;

    object-fit: contain;

}


/* =========================================================
   Empty
========================================================= */

.team-level-card .team-overview-empty {

    grid-column: 1 / -1;

    padding: 25px 20px;

    text-align: center;

    font-size: 14px;

    color: #9ca3af;

}


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

@media (max-width: 700px) {

    .team-level-card__matches {

        grid-template-columns:
            repeat(5, minmax(0, 1fr));

        padding: 15px 8px;

        gap: 2px;

    }


    .team-level-match {

        gap: 20px;

    }


    .team-level-match__score {

        min-width: 42px;

        height: 26px;

        font-size: 11px;

    }


    .team-level-match img {

        width: 45px;

        height: 45px;

        flex-basis: 36px;

    }

}

/* =========================================================
   FIX — توحيد ارتفاع بطاقة مستوى الفريق
========================================================= */

.team-level-card {
    height: auto;
    min-height: 250px;
    box-sizing: border-box;
}

.team-level-card__matches {
    min-height: 150px;
    box-sizing: border-box;
}

.team-level-card .team-overview-card__header h2 {
    font-size: 14px;
    font-weight: 600;
}

/* =========================================================
   TEAM LEVEL — FRENCH / LTR
   ========================================================= */

.team-level-card--fr {
    direction: ltr;
}

.team-level-card--fr .team-overview-card__header {
    direction: ltr;
}

.team-level-card--fr .team-overview-card__header h2 {
    text-align: left;
}

.team-level-card--fr .team-overview-card__header span {
    text-align: right;
}