﻿p, ul {
    margin: 0;
    padding: 0;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.justify-left {
    justify-content: flex-start;
}

.justify-right {
    justify-content: flex-end;
}

.d-flex-space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.d-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-center {
    text-align: center;
}





/*carousel*/
.owl-item {
    width: 250px;
    border-right: 1px solid #ccc;
}

    .owl-item:hover {
        background-color: #f5f5f5;
        cursor: pointer;
        color: #38404D;
    }

    .owl-item .b-grid {
        display: block;
        padding: 8px;
        color: #000;
    }

        .owl-item .b-grid .team-name {
            color: #38404D;
            white-space: nowrap; /* Không xuống dòng */
            overflow: hidden; /* Ẩn phần chữ bị tràn */
            text-overflow: ellipsis; /* Hiển thị dấu "..." */
            display: block; /* Cần thiết cho text-overflow hoạt động đúng */
            width: 100%;
        }

        .owl-item .b-grid .team-name:hover {
            text-decoration: none;
        }

    .owl-item:last-child .b-grid {
        display: block;
        padding: 33px 8px 33px 15px;
    }

        .owl-item:last-child .b-grid a {
            color: #38404D;
        }

.owl-carousel {
    position: relative;
}

        .b-grid_content__top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            align-items: center;
            color: #8c8b8b;
        }

.b-grid_content__bot {
    margin-top: 5px;
    font-size: 15px;
}

    .b-grid_content__bot .team-row-left {
        align-items: center;
    }

    .b-grid_content__bot .logo {
        width: 18px !important;
        height: 14px;
    }

    .b-grid_content__bot .team-name {
        margin: 0;
    }

.owl-nav {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: -49%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

    .owl-nav button {
        border: none;
        pointer-events: auto; /* Enable click trên button */
        transition: all 0.3s ease;
        cursor: pointer;
    }

.owl-carousel .owl-nav .owl-prev,
.owl-carousel .owl-nav .owl-next {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; /* Điều chỉnh chiều rộng theo ý muốn */
    height: 90px;
    margin: -1px 0 0 0;
    border-radius: 0 !important;
}


.owl-carousel .owl-nav .owl-prev {
    position: absolute;
    left: -30px;
}

.owl-carousel .owl-nav .owl-next {
    position: absolute;
    right: -30px;
}
.owl-nav button span {
    font-size: 40px;
    color: #38404D;
}

        .owl-nav button:hover {
            background-color: #a01b20;
            transform: scale(1);
        }

        .owl-nav button.disabled {
            opacity: 0;
            cursor: not-allowed;
        }

/*carousel*/




.c-h-league {
    padding: 10px 20px;
    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;
    border-top: 7px solid #000d76;
}

.h-league {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
    border: none !important;
    text-decoration:none;
}

    .h-league .logo {
        width: 35px;
        height: 35px;
        
    }

.h-league .name{
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #000;
}


.h-match-schedule, .h-result, .h-standing, .h-top-score {
    min-height: 70px;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #CF2228;
    border-radius: 10px;
}

.h-standing, .h-top-score {
    justify-content: center;
}

.h-match-schedule a {
    color: white;
    font-size: 14px;
}

.h-match-schedule img {
    width: 14px;
    height: 14px;
    margin: 0 10px;
}


.c-match__league {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
    border-top: 7px solid #000d76;
    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;
}

    .c-match__league .logo {
        width: 35px;
        height: 35px;
        margin: 0 20px;
    }

    .c-match__league a {
        font-size: 14px;
        font-weight: 600;
        color: #000;
        text-decoration: none;
    }


.group-btn {
    display: flex;
    gap: 8px;
}

.group-btn h2 {
    margin-bottom: 0;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid #AEB4C4;
    background-color: #ffffff;
    color: #38404D;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: "Bai Jamjuree", sans-serif;
}

.group-btn h2:hover {
    border-color: #66bb6a;
    color: #333333;
    background-color: #f5f5f5;
}

.group-btn h2.active {
    background-color: #CF2228;
    color: #ffffff;
}
.group-btn h2.active:hover {
    background-color: #CF2228;
    color: #ffffff;
}



/* Filter Buttons */
.filter {
    display: flex;
    gap: 10px;
}

.filter-dropdown {
    position: relative;
}

.btn-filter {
    background: #fff;
    color: #000;
    border: 1px solid #3d4149;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

    .btn-filter:hover {
        background: #ccc;
        border-color: #4d5159;
        color: #000;
    }

    .btn-filter span {
        font-size: 10px;
        transition: transform 0.2s ease;
    }

.filter-dropdown.active .btn-filter span {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    display: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.filter-dropdown.active .dropdown-menu {
    opacity: 1;
    display: block;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 16px;
    color: #3d4149;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .dropdown-item:hover {
        background: #fddede;
    }

    .dropdown-item:first-child {
        border-radius: 8px 8px 0 0;
    }

    .dropdown-item:last-child {
        border-radius: 0 0 8px 8px;
    }



.ranking-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    text-align: left;
    font-family: sans-serif;
    border: 1px solid #CF2228;
    border-radius: 8px;
    overflow: hidden;
    border-collapse: separate;
}

.ranking-table img{
    width: 14px;
    height: 14px;
    margin-right: 8px;
}

.ranking-table a{
    text-decoration: none;
    color: black;
    font-weight: 500;
}

.ranking-table thead{
    border-bottom: 2px solid #CF2228;
}

.ranking-table th,
.ranking-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;       /* đường ngang */
    border-right: 1px solid #ddd; 
    white-space: nowrap; /* tránh text tràn */
    text-overflow: ellipsis; /* thêm dấu ... nếu dài */
    overflow: hidden;
}

    .ranking-table th {
        background-color: #fddede;
        font-weight: 600;
    }

.ranking-table tr:hover {
    background-color: #f0f0f0;
}

.ranking-table thead tr:first-child th:first-child {
  border-top-left-radius: 8px;
}
.ranking-table thead tr:first-child th:last-child {
  border-top-right-radius: 8px;
}
.ranking-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}
.ranking-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}






/*Responsive*/
/* Responsive < 1024px: group-btn xuống hàng mới */
@media (max-width: 1023px) {
    .c-h-league {
        flex-direction: column;
        align-items: flex-start;
    }

    .group-btn {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .group-btn {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch; /* Smooth scroll trên iOS */
        scrollbar-width: thin; /* Firefox */
    }

        /* Tuỳ chỉnh scrollbar cho Webkit browsers */
        .group-btn::-webkit-scrollbar {
            height: 6px;
        }

        .group-btn::-webkit-scrollbar-track {
            background: #f1f1f1; 
            border-radius: 10px;
        }

        .group-btn::-webkit-scrollbar-thumb {
            background: #CF2228; 
            border-radius: 10px;
        }

            .group-btn::-webkit-scrollbar-thumb:hover {
                background: #a81c20; 
            }


        .group-btn button {
            flex-shrink: 0;
            padding: 5px 20px;
        }

            .group-btn button:last-child {
                margin-right: 2px;
            }

    .owl-carousel .owl-nav .owl-prev {
        position: absolute;
        left: -22px;
    }

    .owl-carousel .owl-nav .owl-next {
        position: absolute;
        right: -22px;
    }
}


@media (max-width: 450px){
    .owl-item .b-grid{
        padding-left: 35px;
        padding-right: 35px;
    }

    .owl-carousel .owl-nav .owl-prev {
        position: absolute;
        left: 0px;
    }

    .owl-carousel .owl-nav .owl-next {
        position: absolute;
        right: 0px;
    }
}

