﻿.w-50 {
    width: 50%;
}


.c-b-league {
    margin-top: 20px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    border-radius: 10px;
    padding: 20px 0px;
}

.match-schedule, .standing {
    padding: 0px 10px 0 20px;
}

.result, .top-score {
    padding: 0px 20px 0 10px;
}

.h-top-score, a {
    display: flex;
    align-items: center;
    color: white;
    font-size: 14px;
    text-decoration: none;
}

    .h-top-score a p {
        margin: 0;
        color: white;
        font-size: 14px;
    }

    .h-top-score img {
        width: 14px;
        height: 14px;
        margin: 0 10px;
        filter: brightness(0) invert(1);
    }

.c-b-league .row-1 {
    padding-bottom: 40px;
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #AEB4C4;
}

.c-b-league .row-2 {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
}





.c-match-schedule {
    margin: 20px 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}

/* Header */
.c-h-match-schedule {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #CF2228;
    color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

    .title img {
        width: 24px;
        height: 24px;
    }


/* Match Schedule Content */
.c-b-match-schedule {
    padding: 20px;
}

.l-match-schedule ul {
    list-style: none;
}

.l-match-schedule li {
    margin-top: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.24);
}


    .l-match-schedule li:last-child {
        border-bottom: none;
    }


.box-match-schedule {
    margin-bottom: 30px;
}

.time {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 15px;
}

.match-schedule__content {
    background: #fff;
    border-radius: 8px;
}

    .match-schedule__content > span {
        display: block;
        color: #666;
        font-size: 14px;
        margin-bottom: 15px;
        text-align: center;
    }

/*DetailResult*/
.c-match-result {
    margin: 20px 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}

/* Header */
.c-h-match-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #CF2228;
    color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

    .c-h-match-result .title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        font-weight: 600;
    }

        .c-h-match-result .title img {
            width: 24px;
            height: 24px;
        }

/* Body */
.c-b-match-result {
    padding: 20px;
}

.match-date-group {
    margin-bottom: 30px;
}

.match-date {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #CF2228;
}

.round-label {
    display: block;
    color: #666;
    font-size: 14px;
    margin: 15px;
    text-align: center;
}

/* Result Item */
.result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.24);
    transition: all 0.3s;
}

    .result-item:last-child {
        border-bottom: none;
    }

    .result-item:hover {
        background: #fddede;
        border-radius: 10px;
    }

    .result-item a {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        text-decoration: none;
        color: inherit;
    }

.match-time {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    min-width: 50px;
    flex-shrink: 0;
}

/* Team Styles */
.team {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 200px;
}

    .team.justify-right {
        justify-content: flex-end;
    }

    .team.justify-left {
        justify-content: flex-start;
    }

    .team .name {
        font-size: 15px;
        font-weight: 500;
        color: #2d3436;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .team .logo {
        width: 28px;
        height: 28px;
        object-fit: contain;
        flex-shrink: 0;
    }

/* Score */
.score {
    font-size: 18px;
    font-weight: 700;
    color: #2d3436;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

/* Button More */
.btn-more {
    background: none;
    border: none;
    font-size: 20px;
    color: #95a5a6;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s;
    flex-shrink: 0;
    min-width: 36px;
}

    .btn-more:hover {
        color: #CF2228;
    }
/*DetailResult*/



/* Tablet - 768px trở xuống */
@media (max-width: 768px) {
    /* MATCH RESULT */
    .c-match-result {
        margin: 15px 0;
        border-radius: 8px;
    }

    .c-h-match-result {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

        .c-h-match-result .title {
            font-size: 16px;
            justify-content: flex-start;
        }

    .c-b-match-result {
        padding: 15px;
    }

    .result-item {
        flex-direction: column;
        padding: 12px 10px;
        gap: 8px;
    }

        /* Match time lên trên và giữa */
        .result-item .match-time {
            text-align: center;
            width: 100%;
            order: -1;
            font-size: 14px;
            font-weight: 700;
        }

        .result-item a {
            width: 100%;
            gap: 3%; 
        }

        .result-item .team {
            flex: 1; 
            width: 38%; 
            gap: 2%; 
        }

        .result-item .score {
            flex: 0 0 15%; 
        }

        /* Button more xuống dưới và giữa */
        .result-item .btn-more {
            align-self: center;
        }

    /* MATCH SCHEDULE */
    .c-match-schedule {
        margin: 15px 0;
        border-radius: 8px;
    }

    .c-h-match-schedule {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .title {
        font-size: 16px;
        justify-content: flex-start;
    }

    .c-b-match-schedule {
        padding: 15px;
    }

    .match a {
        padding: 12px 10px;
    }

    /* COMMON - Filter */
    .filter {
        gap: 10px;
    }

    .filter-dropdown {
        flex: 1;
    }

    .btn-filter {
        width: 100%;
        justify-content: space-between;
        display: flex;
    }

    .dropdown-menu {
        width: 100%;
    }

    /* COMMON - Team */
    .team .logo {
        width: 40px;
        height: 40px;
    }

    .team .name {
        font-size: 14px;
    }

    /* RESULT - Score */
    .score {
        font-size: 16px;
        margin: 0 10px;
    }

    /* SCHEDULE - Time */
    .match .time {
        margin: 0 10px;
        font-size: 16px;
    }
}

/* Mobile - 480px trở xuống */
@media (max-width: 480px) {
    /* MATCH RESULT */
    .c-match-result {
        margin: 10px 0;
        border-radius: 6px;
    }

    .c-h-match-result {
        padding: 12px;
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
    }

        .c-h-match-result .title {
            font-size: 14px;
        }

            .c-h-match-result .title img {
                width: 20px;
                height: 20px;
            }

    .c-b-match-result {
        padding: 10px;
    }

    .match-date-group {
        margin-bottom: 20px;
    }

    .match-date {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .round-label {
        font-size: 12px;
        margin-bottom: 10px;
    }

    /* Result item - Giữ layout column */
    .result-item {
        flex-direction: column;
        padding: 10px 5px;
        gap: 8px;
    }

        /* Match time vẫn ở trên và giữa */
        .result-item .match-time {
            text-align: center;
            width: 100%;
            order: -1;
            font-size: 13px;
            font-weight: 700;
            min-width: auto;
        }

        .result-item a {
            display: flex;
            align-items: center;
            width: 100%;
            gap: 8px;
        }

        .result-item .btn-more {
            align-self: center;
            font-size: 18px;
            padding: 2px 4px;
        }

        .result-item .team {
            flex: 0 0 38%;
            min-width: 0;
        }

        .result-item .score {
            flex: 0 0 16%; 
        }

    /* MATCH SCHEDULE */
    .c-match-schedule {
        margin: 10px 0;
        border-radius: 6px;
    }

    .c-h-match-schedule {
        padding: 12px;
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
    }

    .title {
        font-size: 14px;
    }

        .title img {
            width: 20px;
            height: 20px;
        }

    .c-b-match-schedule {
        padding: 10px;
    }

    .box-match-schedule {
        margin-bottom: 20px;
    }

    .time {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .match a {
        padding: 10px 5px;
    }

    .match-schedule__content > span {
        font-size: 12px;
        margin-bottom: 10px;
    }

    /* COMMON - Filter */
    .filter {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .filter-dropdown {
        flex: 1;
    }

    .btn-filter {
        width: 100%;
        font-size: 12px;
        padding: 8px 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-menu {
        width: 100%;
        min-width: auto;
    }

    /* COMMON - Team */
    .team {
        min-width: auto;
        gap: 6px;
    }

        .team .logo {
            width: 32px;
            height: 32px;
        }

        .team .name {
            font-size: 12px;
            line-height: 1.2;
            white-space: nowrap; 
            overflow: hidden; 
            text-overflow: ellipsis; 
            flex: 1; 
        }



    /* RESULT - Score */
    .score {
        font-size: 14px;
        font-weight: 700;
        min-width: 40px;
    }

    /* SCHEDULE - Time */
    .match .time {
        font-size: 14px;
        font-weight: 700;
        margin: 0 5px;
        min-width: 40px;
        text-align: center;
    }
}

/* Desktop lớn - 1200px trở lên */
@media (min-width: 1200px) {
    /* MATCH RESULT */
    .result-item a {
        gap: 30px;
    }

    .score {
        margin: 0 30px;
    }

    /* MATCH SCHEDULE */
    .match .time {
        margin: 0 30px;
    }
}





/* ===== RESPONSIVE: < 1024px ===== */
@media (max-width: 1023px) {
    /* Vẫn giữ 2 cột */
    .c-b-league .row-1,
    .c-b-league .row-2 {
        display: flex;
        justify-content: space-between;
    }

    .w-50 {
        width: 49%;
    }

    /* Tên đội bóng trong lịch thi đấu & kết quả */
    .match .name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    /* Tên đội bóng trong bảng xếp hạng */
    .standing .team-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    /* Tên cầu thủ trong bảng vua phá lưới */
    .top-score .player-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

}

/* ===== RESPONSIVE: < 768px ===== */
@media (max-width: 767px) {
    /* Chuyển sang 1 cột */
    .c-b-league .row-1,
    .c-b-league .row-2 {
        flex-direction: column;
    }

    .w-50 {
        width: 100% !important;
    }

    /* Thêm khoảng cách giữa các phần */
    .result, .standing, .top-score {
        margin-top: 30px !important;
        padding: 25px 20px 0 20px !important;
        border-top: 2px solid #AEB4C4;
    }

        .match-schedule:last-child,
        .result:last-child,
        .standing:last-child,
        .top-score:last-child {
            margin-bottom: 0;
        }

    /* Border cho row-1 */
    .c-b-league .row-1 {
        padding-bottom: 0 !important;
        border-bottom: none;
    }

    .c-b-league .match-schedule, .standing {
        margin-bottom: 0;
    }
    .c-b-league .row-2 {
        margin-top: 0 ;
    }

    /* Tối ưu tên đội bóng full width */
    .match .name {
        max-width: 200px;
    }

    .standing .team-name,
    .top-score .player-name {
        max-width: 200px;
    }
}

/* ===== RESPONSIVE: < 480px ===== */
@media (max-width: 480px) {
    .c-b-league {
        padding: 15px 0;
    }

    /* Giảm padding các section */
    .match-schedule, .result, .standing, .top-score {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Tối ưu tên cho màn hình nhỏ */
    .match .name {
        max-width: 140px;
        font-size: 13px;
    }

    .standing .team-name,
    .top-score .player-name {
        max-width: 140px;
        font-size: 13px;
    }

    /* Giảm kích thước logo */
    .match .logo {
        width: 16px;
        height: 16px;
        margin: 0 8px;
    }

}

/* ===== RESPONSIVE: < 375px ===== */
@media (max-width: 375px) {
    .match .name {
        max-width: 110px;
        font-size: 12px;
    }

    .standing .name,
    .top-score .name {
        max-width: 110px;
        font-size: 12px;
    }

    .standing img,
    .top-score img {
        margin-left: 10px;
    }

    .match .time,
    .match .score {
        font-size: 18px;
    }

    /* Date filter xuống hàng dưới */
    .h-match-schedule,
    .h-result{
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .result, .standing, .top-score{
        padding-top: 25px !important;
    }

    .date-filter {
        width: 100%;
        justify-content: center;
    }

        /* Giảm padding của nav-btn */
        .date-filter .nav-btn {
            width: 30px;
            height: 30px;
            padding: 3px 6px;
        }

        /* Giảm size mũi tên */
        .date-filter #nextDay::before,
        .date-filter #prevDay::before {
            width: 6px;
            height: 6px;
        }

    /* Giảm font-size date display */
    .date-display #dayOfWeek {
        font-size: 13px;
    }

    .date-display #dateValue {
        font-size: 12px;
    }


    /* Thêm thanh cuộn cho 2 bảng */
    .standing .b-standing,
    .top-score .b-top-score {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Đảm bảo table không bị nén */
    .standing table,
    .top-score table {
        min-width: 100%;
        width: max-content;
    }

    /* Style thanh cuộn */
    .standing .b-standing::-webkit-scrollbar,
    .top-score .b-top-score::-webkit-scrollbar {
        height: 6px;
    }

    .standing .b-standing::-webkit-scrollbar-track,
    .top-score .b-top-score::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .standing .b-standing::-webkit-scrollbar-thumb,
    .top-score .b-top-score::-webkit-scrollbar-thumb {
        background: #CF2228;
        border-radius: 3px;
    }

        .standing .b-standing::-webkit-scrollbar-thumb:hover,
        .top-score .b-top-score::-webkit-scrollbar-thumb:hover {
            background: #a01b20;
        }
}

