/* =========================================
   Home Standings Grid
   Font optimized for SolaimanLipi
   ========================================= */

:root {
    --wclh-home-standings-font: "SolaimanLipi", "Noto Sans Bengali", "Hind Siliguri", Arial, sans-serif;
}

.wclh-home-standings-block {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: var(--wclh-home-standings-font) !important;
}

.wclh-home-standings-block *,
.wclh-home-standings-block *::before,
.wclh-home-standings-block *::after {
    box-sizing: border-box;
    font-family: var(--wclh-home-standings-font) !important;
}

.wclh-home-standings-header {
    margin-bottom: 22px;
}

.wclh-home-standings-title {
    margin: 0;
    font-size: clamp(32px, 3vw, 42px);
    font-weight: 800;
    color: #071426;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.wclh-home-standings-grid {
    display: grid;
    grid-template-columns: repeat(var(--wclh-home-standings-columns, 4), minmax(0, 1fr));
    gap: 20px;
}

.wclh-home-standings-card {
    background: #ffffff;
    border: 1px solid #d9dee7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.wclh-home-standings-card-head {
    min-height: 60px;
    display: grid;
    grid-template-columns: minmax(110px, 1fr) 204px;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border-bottom: 1px solid #e5eaf0;
    background: #ffffff;
}

.wclh-home-standings-card-head h3 {
    margin: 0;
    color: #071426;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.wclh-home-standings-head-stats {
    display: grid;
    grid-template-columns: repeat(6, 33px);
    justify-content: end;
    align-items: center;
    gap: 0;
}

.wclh-home-standings-head-stats span {
    text-align: center;
    color: #53657c;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.wclh-home-standings-table {
    display: grid;
}

.wclh-home-standings-row {
    min-height: 56px;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 186px;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid #edf1f5;
    background: #ffffff;
}

.wclh-home-standings-row:last-child {
    border-bottom: none;
}

.wclh-home-standings-row:hover {
    background: #fafcff;
}

.wclh-home-standings-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wclh-home-standings-rank {
    color: #071426;
    font-size: 15px;
    font-weight: 800;
    width: 18px;
    flex: 0 0 18px;
    line-height: 1.2;
}

.wclh-home-standings-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
}

.wclh-home-standings-flag .wclh-team-flag,
.wclh-home-standings-flag .wclh-team-flag-placeholder {
    width: 24px;
    height: 17px;
    object-fit: cover;
    border: 1px solid #d6dbe3;
    background: #ffffff;
}

.wclh-home-standings-team-code {
    min-width: 0;
    color: #071426;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

.wclh-home-standings-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-content: end;
    align-items: center;
    gap: 0;
}

.wclh-home-standings-stats span,
.wclh-home-standings-stats strong {
    text-align: center;
    color: #071426;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.wclh-home-standings-stats strong {
    font-weight: 900;
}

.wclh-home-standings-stats .is-positive {
    color: #027a48;
}

.wclh-home-standings-stats .is-negative {
    color: #b42318;
}

.wclh-home-standings-stats .is-zero {
    color: #071426;
}

.wclh-home-standings-empty {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #d9dee7;
    border-radius: 12px;
    color: #334155;
    font-size: 17px;
    font-weight: 700;
}

/* 3 columns */
@media (max-width: 1280px) {
    .wclh-home-standings-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wclh-home-standings-card-head,
    .wclh-home-standings-row {
        grid-template-columns: minmax(110px, 1fr) 174px;
    }

    .wclh-home-standings-head-stats,
    .wclh-home-standings-stats {
        grid-template-columns: repeat(6, 29px);
    }

    .wclh-home-standings-card-head h3 {
        font-size: 19px;
    }

    .wclh-home-standings-team-code {
        font-size: 15px;
    }
}

/* 2 columns */
@media (max-width: 980px) {
    .wclh-home-standings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wclh-home-standings-card-head,
    .wclh-home-standings-row {
        grid-template-columns: minmax(120px, 1fr) 186px;
    }

    .wclh-home-standings-head-stats,
    .wclh-home-standings-stats {
        grid-template-columns: repeat(6, 31px);
    }

    .wclh-home-standings-card-head h3 {
        font-size: 20px;
    }

    .wclh-home-standings-team-code {
        font-size: 16px;
    }
}

/* 1 column */
@media (max-width: 640px) {
    .wclh-home-standings-block {
        padding: 26px 12px;
    }

    .wclh-home-standings-title {
        font-size: 28px;
    }

    .wclh-home-standings-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .wclh-home-standings-card-head {
        min-height: 58px;
    }

    .wclh-home-standings-row {
        min-height: 54px;
    }

    .wclh-home-standings-card-head,
    .wclh-home-standings-row {
        grid-template-columns: minmax(110px, 1fr) 174px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .wclh-home-standings-card-head h3 {
        font-size: 19px;
    }

    .wclh-home-standings-head-stats,
    .wclh-home-standings-stats {
        grid-template-columns: repeat(6, 29px);
    }

    .wclh-home-standings-rank {
        font-size: 14px;
        width: 16px;
        flex-basis: 16px;
    }

    .wclh-home-standings-flag {
        flex-basis: 24px;
    }

    .wclh-home-standings-flag .wclh-team-flag,
    .wclh-home-standings-flag .wclh-team-flag-placeholder {
        width: 22px;
        height: 16px;
    }

    .wclh-home-standings-team-code {
        font-size: 15px;
    }
}

/* Very small mobile */
@media (max-width: 380px) {
    .wclh-home-standings-card-head,
    .wclh-home-standings-row {
        grid-template-columns: minmax(96px, 1fr) 156px;
        gap: 8px;
    }

    .wclh-home-standings-head-stats,
    .wclh-home-standings-stats {
        grid-template-columns: repeat(6, 26px);
    }

    .wclh-home-standings-card-head h3 {
        font-size: 18px;
    }

    .wclh-home-standings-team-code {
        font-size: 14px;
    }
}