/* ==========================================================
   Team Form — Last 5 Matches
   ========================================================== */

.match-team-form-widget {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 16px;
    margin-bottom: 8px;
}

.match-team-form-title {
    margin-bottom: 20px;
    color: #111827;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.match-team-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 0;

}

.match-team-form-row:last-of-type {
    border-bottom: 0;
}

.match-team-form-name {
    display: flex;
    align-items: center;
    gap: 9px;

    flex: 1;
    min-width: 0;

    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.match-team-form-name img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    object-fit: contain;
}

.match-team-form-name span {
    min-width: 0;
    line-height: 1.5;
}

.match-team-form-results {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;

    flex: 0 0 auto;
    direction: ltr;
}

.match-team-form-circle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 27px;
    height: 27px;
    flex: 0 0 27px;

    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;

    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.match-team-form-circle.win,
.match-team-form-legend i.win {
    background-color: #008F4C;
}

.match-team-form-circle.draw,
.match-team-form-legend i.draw {
    background-color: #F59E0B;
}

.match-team-form-circle.loss,
.match-team-form-legend i.loss {
    background-color: #DC2626;
}

.match-team-form-empty {
    color: #9CA3AF;
    font-size: 12px;
    white-space: nowrap;
}

.match-team-form-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;

    margin-top: 16px;
    padding-top: 8px;
}

.match-team-form-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: #6B7280;
    font-size: 11px;
}

.match-team-form-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

@media (max-width: 480px) {

    .match-team-form-row {
        gap: 8px;
    }

    .match-team-form-name {
        gap: 6px;
        font-size: 12px;
    }

    .match-team-form-name img {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .match-team-form-results {
        gap: 3px;
    }

    .match-team-form-circle {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        font-size: 11px;
    }
}

/* =========================================
   آخر 5 مباريات - توحيد العرض في الهاتف
========================================= */

@media (max-width: 768px) {

    .match-team-form-widget {
        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;
    }

}

/* =========================================
   Team Form — French LTR
========================================= */

.match-single-card--fr .match-team-form-widget {
    direction: ltr;
    text-align: left;
}

.match-single-card--fr .match-team-form-title {
    direction: ltr;
    text-align: center;
}

.match-single-card--fr .match-team-form-row {
    direction: ltr;
    flex-direction: row;
}

.match-single-card--fr .match-team-form-name {
    direction: ltr;
    flex-direction: row;
    text-align: left;
}

.match-single-card--fr .match-team-form-name span {
    direction: ltr;
    text-align: left;
}

.match-single-card--fr .match-team-form-results {
    direction: ltr;
    flex-direction: row;
    justify-content: flex-start;
}

.match-single-card--fr .match-team-form-legend {
    direction: ltr;
}

.match-single-card--fr .match-team-form-legend span {
    direction: ltr;
}

/* =========================================
   Team Form — French LTR
========================================= */

.match-team-form-widget--fr {
    direction: ltr !important;
    text-align: left !important;
}

.match-team-form-widget--fr .match-team-form-row {
    direction: ltr !important;
    flex-direction: row !important;
}

.match-team-form-widget--fr .match-team-form-name {
    direction: ltr !important;
    flex-direction: row !important;
    text-align: left !important;
    order: 1;
}

.match-team-form-widget--fr .match-team-form-results {
    direction: ltr !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    order: 2;
}

.match-team-form-widget--fr .match-team-form-legend {
    direction: ltr !important;
    flex-direction: row !important;
}