/* =========================================================
   MOBILELEGENDSPEDIA - MATCHES
========================================================= */

.matches-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: start;
}

.matches-main,
.matches-sidebar {
    min-width: 0;
}

.matches-heading {
    margin-bottom: 14px;
}

.matches-heading h1 {
    margin: 0 0 5px;
    font-size: 25px;
    font-weight: 900;
}

.matches-heading p {
    margin: 0;
    color: #7f838a;
    font-size: 11px;
}

/* FILTERS */

.match-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px;
    background: #fff;
    border: 1px solid #d3d5d8;
    margin-bottom: 12px;
}

.filter-button {
    min-height: 32px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f2f3;
    border: 1px solid #d7d8da;
    color: #555960;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-button:hover {
    background: #e7e8ea;
}

.filter-button.active {
    background: #d62531;
    border-color: #d62531;
    color: #fff;
}

/* DATE GROUP */

.match-date-group {
    margin-bottom: 14px;
}

.match-date-title {
    padding: 9px 12px;
    background: #282b31;
    color: #fff;
    border-left: 4px solid #d62531;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

/* COLUMN HEADER */

.matches-columns {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 118px;
    gap: 0;
    background: #f2f3f4;
    border-left: 1px solid #d5d7da;
    border-right: 1px solid #d5d7da;
    border-bottom: 1px solid #d5d7da;
    color: #858990;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.matches-columns > div {
    padding: 7px 12px;
}

.matches-columns > div:last-child {
    text-align: center;
}

/* MATCH CARD */

.match-card {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 118px;
    align-items: stretch;
    min-height: 94px;
    background: #fff;
    border-left: 1px solid #d5d7da;
    border-right: 1px solid #d5d7da;
    border-bottom: 1px solid #e2e3e5;
    transition: background .15s ease;
}

.match-card:hover {
    background: #fafafb;
}

.match-card-live {
    border-left: 3px solid #d62531;
}

/* TIME */

.match-card-time {
    padding: 14px 10px;
    text-align: center;
    border-right: 1px solid #ececee;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.match-time-main {
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 900;
}

.match-time-live {
    color: #d62531;
}

.match-bo {
    color: #95989e;
    font-size: 9px;
    font-weight: 700;
}

/* TEAMS */

.match-card-teams {
    min-width: 0;
    padding: 10px 15px;
}

.match-league {
    margin-bottom: 8px;
    color: #898d94;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.match-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
}

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

.match-team-logo-placeholder {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7e8ea;
    color: #777b82;
    font-size: 7px;
    font-weight: 900;
}

.match-team-name {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-score {
    min-width: 24px;
    text-align: right;
    font-size: 13px;
    font-weight: 900;
}

/* ODDS */

.match-card-odds {
    border-left: 1px solid #ececee;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.odds-provider {
    margin-bottom: 1px;
    color: #999da4;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.odds-row {
    min-height: 27px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px;
    background: #f4f5f6;
    border: 1px solid #e1e3e5;
    border-radius: 2px;
}

.odds-team {
    min-width: 0;
    color: #7f8389;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.odds-value {
    color: #202329;
    font-size: 11px;
    font-weight: 900;
}

.odds-value.empty {
    color: #a0a4aa;
}

.odds-live {
    color: #d62531;
}

/* SIDEBAR */

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border-bottom: 1px solid #e8e9eb;
    font-size: 10px;
    font-weight: 800;
}

.sidebar-link:last-child {
    border-bottom: 0;
}

.sidebar-link:hover {
    background: #f7f7f8;
    color: #d62531;
}

/* EMPTY */

.matches-empty {
    padding: 45px 20px;
    background: #fff;
    border: 1px solid #d5d7da;
    text-align: center;
    color: #8c9097;
    font-size: 11px;
}

/* MOBILE */

@media (max-width: 850px) {
    .matches-layout {
        display: block;
    }

    .matches-sidebar {
        margin-top: 15px;
    }
}

@media (max-width: 600px) {
    .matches-heading h1 {
        font-size: 21px;
    }

    .match-filters {
        gap: 5px;
        padding: 8px;
    }

    .filter-button {
        flex: 1;
        padding: 0 8px;
        font-size: 9px;
    }

    .matches-columns {
        display: none;
    }

    .match-card {
        grid-template-columns: 58px minmax(0, 1fr) 92px;
        min-height: 88px;
    }

    .match-card-time {
        padding: 9px 5px;
    }

    .match-time-main {
        font-size: 12px;
    }

    .match-card-teams {
        padding: 9px;
    }

    .match-team {
        gap: 6px;
        font-size: 10px;
    }

    .match-team img,
    .match-team-logo-placeholder {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }

    .match-card-odds {
        padding: 8px 6px;
        gap: 5px;
    }

    .odds-provider {
        font-size: 7px;
    }

    .odds-row {
        padding: 0 5px;
        min-height: 25px;
    }

    .odds-team {
        display: none;
    }

    .odds-value {
        width: 100%;
        text-align: center;
        font-size: 10px;
    }
}