/* Match Schedule Widget Styles — themed */
:root {
    --ms-primary: #1C1C1C;
    --ms-secondary: #333333;
    --ms-accent: #D4AF37;
    --ms-bg: #F5F5F5
}

.match-schedule-widget {
    font-family: 'Noto Sans', system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
    color: var(--ms-secondary);
}

/* Countries */
.ms-controls {
    margin-bottom: 20px
}

.ms-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 18px
}

.ms-country-card {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all .18s;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04)
}

.ms-country-card .ms-flag-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: #fff
}

.ms-country-card .ms-country-name {
    font-family: 'Oswald', 'Noto Sans', sans-serif;
    font-weight: 600;
    color: var(--ms-primary);
    font-size: 16px
}

.ms-country-card.active {
    border-color: var(--ms-accent);
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06)
}

.ms-country-card:focus {
    outline: 3px solid rgba(212, 175, 55, 0.15)
}

/* Matches list container */
.ms-matches {
    background: transparent
}

.ms-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0
}

.ms-row {
    display: grid;
    grid-template-columns: 40% 1.6fr 150px 150px 120px;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04)
}

.ms-row.alt {
    background: #f8f9fb
}

/* Ensure left column keeps 40% and stack (id + group) is vertically centered */
.ms-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 40%
}

.ms-left>div:first-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center
}

.ms-match-id {
    font-weight: 700;
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--ms-primary);
    display: flex;
    justify-content: center;
}

.ms-team {
    display: flex;
    align-items: center;
    gap: 10px
}

.ms-team .ms-flag-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #fff
}

.ms-group {
    font-family: 'Oswald', 'Noto Sans', sans-serif;
    color: var(--ms-accent);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    margin-right: 8px
}

.ms-teams {
    font-family: 'Oswald', 'Noto Sans', sans-serif;
    font-weight: 700;
    color: var(--ms-primary);
    font-size: 18px
}

.ms-date {
    font-size: 16px;
    color: var(--ms-secondary);
    font-weight: 600
}

.ms-day {
    display: block;
    font-size: 13px;
    color: #777
}

.ms-venue {
    font-size: 14px;
    color: #666
}

.ms-price {
    font-weight: 700;
    color: var(--ms-primary);
    text-align: right
}

.ms-price.por {
    color: var(--ms-accent)
}

.ms-enquire {
    justify-self: end;
    cursor: pointer;
    font-weight: 700
}
.ms-load-more {
    border-radius: 3px!important;
}

/* Load more */
.ms-load-wrap{display:flex;justify-content:center;margin-top:18px}
.ms-load-more{padding:10px 18px;border-radius:8px;border:1px solid rgba(0,0,0,0.08);background:#fff;cursor:pointer;font-weight:700}
.ms-load-more.disabled{opacity:.45;cursor:not-allowed}

/* Typography scale */
@media (min-width: 992px) {
    .match-schedule-widget {
        font-size: 16px
    }

    .ms-teams {
        font-size: 20px
    }
}

@media (max-width: 991px) {
    .match-schedule-widget {
        font-size: 15px
    }

    .ms-row {
        grid-template-columns: 40% 1.4fr 160px 100px 110px
    }

    .ms-teams {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .match-schedule-widget {
        font-size: 14px;
    }

    .ms-countries {
        gap: 10px 4px;
        justify-content: flex-start;
    }

    .ms-country-card {
        width:88px;
        height: 98px;
    }

    .ms-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 14px;
    }

    .ms-left {
        order: 1;
        flex-direction: column;
    }

    .ms-date {
        order: 2;
    }

    /* Center venue, price, and button on mobile */
    .ms-venue {
        order: 3;
        text-align: center;
    }

    .ms-price {
        order: 4;
        text-align: center;
    }

    .cta-button {
        order: 5;
        justify-self: center;
        align-self: center;
        margin: 0
    }

    .ms-date-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-direction: row-reverse;
    }
    
    button.ms-country-card {
        padding: 8px 15px;
    }
    .ms-country-card .ms-country-name{
        font-size: 12px;
    }
    .ms-country-card .ms-flag-circle {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
   .ms-enquire, .ms-load-more {
        font-size: 14px;
    }
}
