/* .page-scale-container--dealer {
    overflow-x: hidden;
} */

@media (min-width: 1200px) {
    .page-scale--dealer {
        --dealer-page-scale: 0.9;
        transform: scale(var(--dealer-page-scale));
        transform-origin: top left;
        width: calc(100% / var(--dealer-page-scale));
    }
}

.container-search-agentcy-page {
    width: 100%;
    text-align: center;
    max-width: 1440px;
    margin-top: 60px;
    margin-bottom: 60px;
    margin-left: auto;
    margin-right: auto;
    /* Tu dong can le theo viewport: desktop rong hon se co gutter lon hon */
    padding-left: clamp(16px, 2.2vw, 36px);
    padding-right: clamp(16px, 2.2vw, 36px);
    box-sizing: border-box;
    font-family: Toyota type;
}

.map-location-error {
    width: 100%;
    text-align: center;
    color: #5f5f5f;
    border: 1px solid #e9e9e9;
    background: #fff;
    padding: 16px;
    margin-top: 65px;
    height: fit-content;
    align-self: flex-start;
}

.map-location-error .map-location-error-title {
    font-size: 28px;
    font-weight: 600;
    color: #3a3a3a;
    margin-bottom: 10px;
}

.map-location-error .map-location-error-subtitle {
    font-size: 14px;
    color: #7a7a7a;
    line-height: 1.5;
}

.dealer-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.btn-back-dealer-list-inline {
    border: 1px solid #111;
    background: #fff;
    color: #111;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    height: 40px;
    margin-left: 20px;
}

.btn-back-dealer-list-inline:hover {
    background: #111;
    color: #fff;
}

.container-search-agentcy-page .box-hero-banner {
    max-width: 1440px;
    max-height: 404px;
    width: 100%;
    height: 100%;
    position: relative;
}

    .container-search-agentcy-page .box-hero-banner .hero-banner-image {
        height: 404px;
        background-color: rgb(220, 38, 38);
    }

    .container-search-agentcy-page .box-hero-banner .hero-banner-content {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        text-align: center;
    }

        .container-search-agentcy-page .box-hero-banner .hero-banner-content .hero-banner-content-title {
            margin-top: 28px;
            margin-bottom: 0;
            font-weight: 600;
            text-align: center;
            color: #fff;
            font-family: Toyota Type;
            font-style: normal;
            font-weight: 600;
            font-size: 40px;
            line-height: 120%;
            align-items: center;
        }
        .container-search-agentcy-page .box-hero-banner .hero-banner-content .hero-banner-content-description {
            color:#fff;
            max-width:700px;
            margin:auto;
            margin-top:15px;
        }

        .container-search-agentcy-page .box-hero-banner .hero-banner-content .box-search-location-agentcy {
            max-width: 1440px;
            padding-top: 15px;
            display: flex;
            width: 100%;
            justify-content: center;
        }

.container-search-agentcy-page .box-map-location {
    width: 100%;
    margin: 0px 0px 110px 0px;
    height: auto;
    padding-top: 30px;
    padding-left: 5px;
    padding-right: 5px;
    display: none;
}

    .container-search-agentcy-page .box-map-location .map-iframe {
        margin: 0px;
        padding: 0px;
        margin-top: 0;
        /* Tăng chiều cao map để hiển thị được nhiều nội dung hơn */
        min-height: calc(100vh - 40px);
        align-self: flex-start;
        /*padding-right: 20px;*/
    }

        .container-search-agentcy-page .box-map-location .map-iframe > iframe {
            border: none;
            width: 100%;
            min-height: 280px;
            height: calc(100vh - 40px);
            max-height: calc(100vh - 40px);
            margin-left: 15px;
            box-sizing: border-box;
        }

/* Hai cột: danh sách cuộn theo trang, map dính dưới header (khớp offset scroll trong search-agentcy.js ~90px) */
@media (min-width: 769px) {
    .container-search-agentcy-page .box-map-location .map-iframe {
        position: -webkit-sticky;
        position: sticky;
        top: 90px;
        margin-top: 0;
        z-index: 2;
    }
}

    .container-search-agentcy-page .box-map-location .select-location {
        overflow: visible;
        width: 100%;
        height: auto;
        text-align: left;
        padding: 0px;
        display: flex;
        flex-direction: column;
        min-height: auto;
        /*padding-left: 20px;*/
    }

    .container-search-agentcy-page .box-map-location .select-location .dealer-list-scroll {
        overflow: visible;
        flex: initial;
        min-height: auto;
        padding-right: 0;
    }

        .container-search-agentcy-page .box-map-location .select-location .location-item {
            border: 1px solid #afafaf;
            width: 100%;
            height: auto;
            background: white;
            position: relative;
        }

            .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title {
                display: flex;
                margin-top: 32px;
                align-items: center;
                cursor: pointer;
            }

                .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title .icon-location {
                    position: relative;
                    margin-left: 14px;
                    margin-right: 16px;
                    width: 42px;
                    height: 46px;
                    text-align: center;
                    display: flex;
                    justify-content: center;
                }
                  .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-header{
                display: flex;
                margin-top: 30px;
                align-items: center;
                cursor: pointer;
            }

                .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-header .icon-location {
                    position: relative;
                    margin-left: 24px;
                    margin-right: 16px;
                    width: 18px;
                    height: 6px;
                    text-align: center;
                    display: flex;      
                    justify-content: center;
                }

.icon-location::after {
    position: absolute;
    top: -8px;
    left: 3px;
    width: 36px;
    height: 36px;
    content: url(../../../images/search-agentcy/icon-location.png?v=20260429-1);
}
.dealer-header .icon-location::after {
    position: absolute;
    top: -8px;
    left: 3px;
    width: 28px;   /* chỉnh nhỏ lại */
    height: 28px;

    content: "";
    background-image: url(../../../images/search-agentcy/icon-dealer-header-location.svg?v=20260429-1);
    background-size: contain;   /* hoặc 100% 100% */
    background-repeat: no-repeat;
}
.container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title .icon-location span {
    font-size: 13px;
    position: absolute;
    top: 0;
    /* left: 18px; */
/*    padding-left: 8px;*/
    z-index: 1;
    left: 50%;
    transform: translateX(-50%);
}

.container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title > span , .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title > a {
    width: 85%;
    font-weight: 600;
    font-size: 16px;
    line-height: 120%;
    height: auto;
    padding-right: 35px;
    color: #000000;
}

.container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content {
    display: none;
    margin-left: 34px;
    align-items: stretch;
    padding-right: 35px;
    position:relative;
}
/* item active thì hiện content */
.location-item.active .location-item-content {
    display: block !important;
}

.container-search-agentcy-page .box-map-location .select-location .location-item.active {
    background-color: #ffffff !important;
}

.location-item .dealer-header a.title-text {
    color: #000000;
    font-weight: 800;
    font-size: 18px;
}

/* title đỏ khi active */
.location-item.active .dealer-header a.title-text {
    color: #eb0a1e;
    font-weight: 900;
    font-size: 18px;
    line-height: 1.2;
}
    .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content::before {
        position: absolute;
        content: "";
        top: 0;
        left: 0;
     
    }
    .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .border-bar {
        width: 1px;
        background-color: rgba(130, 130, 130, 0.29);
        height: auto;
        margin-right: 23px;
    }

    .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .content-location {
        text-align: left;
    }

        .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .content-location > div {
            display: flex;
            margin-top: 40px;
            width: 100%;
        }

            .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .content-location > div > img {
                height: 20px;
                width: 20px;
            }

            .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .content-location > div > span {
                align-items: center;
                font-size: 16px;
                line-height: 23px;
                margin-left: 12px;
                height: auto;
                word-wrap: break-word;
            }

.container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item {
    margin: clamp(12px, 2.2vw, 30px) clamp(8px, 3vw, 35px) clamp(18px, 3.5vw, 60px) 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: clamp(6px, 1.2vw, 10px);
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 17px;
    letter-spacing: clamp(0.03em, 0.35vw, 0.12em);
}

    .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register {
        background: #ffffff;
        border: 2px solid #101010;
        box-sizing: border-box;
        flex: 0 1 36%;
        max-width: 45%;
        min-width: 0;
        width: auto;
        min-height: clamp(34px, 4.2vw, 42px);
        height: auto;
        margin-left: 0px;
        color: #101010;
        display: flex;
        padding: 0;
        align-items: stretch;
        justify-content: center;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
    }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register > a {
            color: #101010;
            font-weight: 900;
            font-size: clamp(10px, 0.55vw + 8px, 16px);
            line-height: 1.2;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 1 1 auto;
            min-width: 0;
            padding: 6px clamp(3px, 0.85vw, 8px);
            text-align: center;
            white-space: normal;
            word-wrap: break-word;
            transition: color 0.2s;
        }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register:hover {
            background: #101010;
            border-color: #101010;
        }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register:hover > a {
            color: #ffffff;
        }

    .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order {
        background: #ffffff;
        border: 2px solid #101010;
        box-sizing: border-box;
        flex: 0 1 36%;
        max-width: 45%;
        min-width: 0;
        width: auto;
        min-height: clamp(34px, 4.2vw, 42px);
        height: auto;
        margin-left: 0;
        color: #101010;
        display: flex;
        padding: 0;
        align-items: stretch;
        justify-content: center;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
    }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order > a {
            color: #101010;
            font-weight: 700;
            text-decoration: none;
            font-size: clamp(10px, 0.55vw + 8px, 16px);
            line-height: 1.2;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 1 1 auto;
            min-width: 0;
            padding: 6px clamp(3px, 0.85vw, 8px);
            text-align: center;
            white-space: normal;
            word-wrap: break-word;
            transition: color 0.2s;
        }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order:hover {
            background: #101010;
            border-color: #101010;
        }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order:hover > a {
            color: #ffffff;
        }

.container-search-agentcy-page .box-map-location .select-location .location-item .viewmap {
    display: none;
    align-items: center;
    text-align: center;
    margin-left: 35px;
    margin-bottom: 33px;
}

    .container-search-agentcy-page .box-map-location .select-location .location-item .viewmap > button {
        font-family: Toyota Type;
        font-style: normal;
        font-weight: 600;
        font-size: 12px;
        line-height: 17px;
        color: #eb0a1e;
        border: none;
        border-bottom: 1px solid #eb0a1e;
        background: none;
    }

    .container-search-agentcy-page .box-map-location .select-location .location-item .viewmap :hover {
        color: #cc0000;
        border-bottom: 1px solid #cc0000;
    }

.container-search-agentcy-page .box-map-location .select-location .location-item .map-location > div {
    width: 100%;
    height: 410px;
    display: none;
}

.container-search-agentcy-page .box-map-location .select-location::-webkit-scrollbar {
    width: 3px;
}

.container-search-agentcy-page .box-map-location .select-location::-webkit-scrollbar-track {
    background-color: none;
}

.container-search-agentcy-page .box-map-location .select-location::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
    position: absolute;
}
#seeMore{
    color: #ffffff;
    background-color: #eb0a1e;
    margin-right: 10px;
    border: none;
    width: 100%;
    height: 40px;
    outline: none;
}
.content-location .button-view-more {
    display: flex;
    align-items: center;
    position: relative;
    color: rgba(220, 38, 38, 1);
    cursor:pointer;
}
    .content-location .button-view-more .button-minus {
        opacity: 0;
        visibility: hidden;
        transition: all linear .3s;
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 100%;
        transform: translate(-0%,-50%);
    }
    .content-location .button-view-more.button-view-show .button-minus {
        opacity: 1;
        visibility: unset;
        z-index:1;
    }
    .content-location .button-view-more.button-view-show .button-plus {
        opacity:0;
    }
    .content-location .button-view-more .text-view-hide {
        display: none;
        transition: all linear .3s;
    }
    .content-location .button-view-more.button-view-show .text-view-hide {
        display: block;
        transition: all linear .3s;
    }
    .content-location .button-view-more.button-view-show .text-view-more {
        display: none;
        transition: all linear .3s;
    }
.content-location .data-more {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    background: #f8f8f8;
    padding: 0 10px;
    border-radius: 0 0 5px 5px;
}
    .content-location .data-more.data-show {
        max-height: 200px; 
    }
    @media only screen and (min-width: 768px) {
        .map-location {
            display: none;
        }
    }

    @media (max-width: 1200px) {
        .container-search-agentcy-page .box-map-location {
            margin: 0px;
            padding: 0 clamp(14px, 3.2vw, 34px);
        }

            .container-search-agentcy-page .box-map-location .map-iframe {
                padding-right: 5px;
            }

            .container-search-agentcy-page .box-map-location .select-location {
                padding-left: 5px;
            }
    }

    @media (max-width: 992px) {
        .container-search-agentcy-page .box-map-location {
            margin: 0px;
            padding: 0 clamp(12px, 3.6vw, 24px);
        }

        .container-search-agentcy-page .box-hero-banner .hero-banner-content .box-search-location-agentcy .box-filter-search {
            margin: 0px 20px 0 20px;
            align-items: center;
            padding: 0;
        }

            .container-search-agentcy-page .box-hero-banner .hero-banner-content .box-search-location-agentcy .box-filter-search > div {
                text-align: center;
                padding: 0;
                padding-bottom: 20px;
                width: 100%;
            }

                .container-search-agentcy-page .box-hero-banner .hero-banner-content .box-search-location-agentcy .box-filter-search > div:last-child {
                    text-align: center;
                    padding: 0;
                    width: 100%;
                }

 .form-select-location {
                width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    background: transparent;
    padding: 8px 0;
    font-size: 15px;
    outline: none;
    box-shadow: none;
    color: #333;
            }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register {
            margin-right: 0px;
        }
    }

    @media (max-width: 768px) {
        .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .content-location > div {
            margin-left:5px;
        }
        .container-search-agentcy-page .box-map-location {
            margin-top: 22px;
            width: 100%;
            height: auto;
            display: flex;
            flex-wrap: wrap;
            padding-left: 10px;
            padding-right: 10px;
        }

            .container-search-agentcy-page .box-map-location .select-location {
                height: auto;
                padding: 0px;
                overflow-y: visible;
                display: contents;
            }

            .container-search-agentcy-page .box-map-location .select-location .dealer-list-scroll {
                overflow: visible;
                flex: initial;
                padding-right: 0;
                order: 4;
                width: 100%;
            }

        .container-search-agentcy-page .box-map-location > .pagination-custom {
            width: 100%;
            flex: 0 0 100%;
            order: 5;
        }

        .container-search-agentcy-page .box-map-location .select-location .hero-banner-content {
            order: 1;
            width: 100%;
        }

        .container-search-agentcy-page .box-map-location .select-location .total-dealer {
            order: 3;
            width: 100%;
        }

                .container-search-agentcy-page .box-map-location .select-location .location-item {
                    margin-bottom: 24px;
                }

                    .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title > div {
                        text-align: center;
                        align-items: center;
                        width: 33px;
                        height: 40px;
                    }

                        .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title > div > span {
                            font-size: 10px;
                        }

                    .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-title > span {
                        width: 85%;
                    }

                    .container-search-agentcy-page .box-map-location .select-location .location-item .viewmap {
                        display: block;
                    }

                    .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item {
                        margin: 16px 0 20px 0;
                        display: flex;
                        flex-wrap: wrap;
                        justify-content: flex-start;
                        gap: clamp(8px, 2.4vw, 14px);
                        letter-spacing: normal;
                    }

                    .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register,
                    .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order {
                        flex: 0 1 calc(50% - 6px);
                        max-width: calc(50% - 6px);
                        min-width: 0;
                        width: auto;
                        min-height: clamp(46px, 12vw, 56px);
                        height: auto;
                        margin: 0;
                    }

                    .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register > a,
                    .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order > a {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: 100%;
                        min-height: clamp(46px, 12vw, 56px);
                        font-size: clamp(12px, 3.4vw, 15px);
                        line-height: 1.2;
                        font-weight: 700;
                        letter-spacing: 0;
                        white-space: normal;
                        word-wrap: break-word;
                        padding: 10px clamp(6px, 2vw, 12px);
                        text-align: center;
                    }

            .container-search-agentcy-page .box-map-location .map-iframe {
                display: block;
                order: 2;
                width: 100%;
                max-width: 100%;
                margin-top: 12px;
                margin-bottom: 12px;
            }

            .container-search-agentcy-page .box-map-location .map-iframe > iframe {
                margin-left: 0;
                width: 100%;
                min-height: 260px;
                height: calc(100svh - 148px);
                max-height: calc(100svh - 148px);
            }

            .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content {
                margin-left: 14px;
            }

            .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-header .icon-location {
                margin-left: 14px;
                margin-right: 10px;
            }

                .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .border-bar {
                    height: 180px;
                }

        .container-search-agentcy-page .box-hero-banner .hero-banner-content .hero-banner-content-title {
            font-size: 32px;
        }

        .hero-banner-content-title-new {
            font-size: 30px;
        }

        .total-dealer {
            font-size: 14px;
        }

        .location-item .dealer-header a.title-text {
            font-size: 16px;
            margin-left: 10px;
        }

        .location-item.active .dealer-header a.title-text {
            font-size: 16px;
            margin-left: 10px;
        }

        .dealer-address {
            font-size: 12px;
            margin-left: 55px !important;
            margin-right: 12px;
        }

        .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .content-location > div > span {
            font-size: 14px;
            line-height: 21px;
        }

        .opening-header {
            font-size: 14px;
        }

        .opening-content {
            font-size: 13px;
        }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register > a,
        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order > a {
            font-size: clamp(12px, 3.4vw, 15px);
        }

        .pagination-custom span {
            font-size: 14px;
        }

        .pagination-custom button {
            font-size: 16px;
        }

        .dealer-address .icon-chose-location {
            margin-left: 12px;
        }
    }

    @media (max-width: 576px) {
        .container-search-agentcy-page .box-map-location .select-location .location-item .location-item-content .border-bar {
            height: 240px;
        }
    }

    /* Rất hẹp: xếp 2 nút full width để không tràn / rớt layout */
    @media (max-width: 380px) {
        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register,
        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order {
            flex: 1 1 100%;
            max-width: 100%;
            min-height: clamp(48px, 14vw, 58px);
        }

        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-register > a,
        .container-search-agentcy-page .box-map-location .select-location .location-item .btn-location-item .btn-order > a {
            min-height: clamp(48px, 14vw, 58px);
            font-size: clamp(13px, 3.8vw, 16px);
            padding: 12px 14px;
        }
    }

    @media (max-width: 400px) {
        .container-search-agentcy-page .box-map-location {
            padding: 0px 8px;
        }
    }

    .data-location {
        display:flex;
        align-items: center;
        cursor: pointer;
}
.data-location .underline{
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    padding-bottom: 1px;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-size: 100% 1px;
    background-position: right calc(100% - 1px);
    transition: background-size 0.28s ease;
}

.data-location:hover .underline{
    background-size: 0% 1px;
}

.map-location {
    background-color: #ccc;
}

    .map-location iframe {
        /* display: none; */
        height: 410px;
        max-width: 100%;
    }

.content-location span a {
    color: #3a3a3a
}

.content-location a.website-link {
    text-decoration: none;
    font-weight: 600;
}

.content-location .website-text {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.content-location .website-text br {
    display: none;
}

/* Icon globe cạnh Website — căn dọc với dòng chữ */
.content-location img[src*="search-agentcy/iconwww.svg"] {
    margin-top: 3px;
}

.content-location a.website-link:hover,
.content-location a.website-link:focus,
.content-location a.website-link:active,
.content-location a.website-link:visited {
    text-decoration: none;
    font-weight: 600;
}
.dealer-address {
    font-weight: 600;
    display: flex;
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-top: 20px;
    margin-left: 60px;
    margin-right: 34px;
}
.dealer-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-top: 20px;
    margin-left: clamp(8px, 2.5vw, 30px);
    margin-right: clamp(8px, 2.5vw, 30px);
    padding-left: clamp(12px, 3.5vw, 40px);
    padding-right: clamp(4px, 1.5vw, 16px);
    gap: clamp(6px, 1.4vw, 12px);
    row-gap: clamp(8px, 2vw, 12px);
    padding-bottom: 40px;
}

.location-item.active .dealer-contact {
    border-bottom: 1px solid #ccc;
}
.contact-pill{
    background-color: #f0f0f0;
    padding: 8px;
    border-radius: 20px;
    font-size: 16px;
    color: #000;
    text-decoration: none;
}

/* Zalo / Messenger / Phone: co giãn theo màn hình, tránh tràn nội dung */
.dealer-contact .contact-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    box-sizing: border-box;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    width: auto;
    height: auto;
    min-height: clamp(30px, 4.5vw, 40px);
    padding: clamp(4px, 1vw, 8px) clamp(6px, 1.4vw, 12px);
    border-radius: clamp(14px, 3vw, 20px);
    font-size: clamp(11px, 0.45vw + 9px, 16px);
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-align: center;
}

.dealer-contact .contact-pill:visited,
.dealer-contact .contact-pill:hover,
.dealer-contact .contact-pill:active,
.dealer-contact .contact-pill:focus {
    color: #000;
    text-decoration: none;
}

/* Messenger / Zalo: fill màu từ dưới lên khi hover (--contact-pill-social-fill đổi sau) */
.dealer-contact .contact-pill.contact-pill--social {
    --contact-pill-social-base: #ececec;
    border: 1px solid transparent;
    background-color: transparent;
    background-image: linear-gradient(var(--contact-pill-social-base), var(--contact-pill-social-base));
    background-repeat: no-repeat;
    /* Keep animation but make it move from top to bottom. */
    background-position: center bottom;
    background-size: 100% 100%;
    transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.dealer-contact .contact-pill.contact-pill--social:hover,
.dealer-contact .contact-pill.contact-pill--social:focus-visible {
    background-size: 100% 0%;
    background-color: transparent;
    border-color: #9d9d9d;
    color: #000;
    text-decoration: none;
}

/* Phone: same hover effect as Messenger/Zalo */
.dealer-contact .contact-pill:not(.contact-pill--social) {
    --contact-pill-phone-base: #ececec;
    border: 1px solid transparent;
    background-color: transparent;
    background-image: linear-gradient(var(--contact-pill-phone-base), var(--contact-pill-phone-base));
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% 100%;
    transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.dealer-contact .contact-pill:not(.contact-pill--social):hover,
.dealer-contact .contact-pill:not(.contact-pill--social):focus-visible {
    background-size: 100% 0%;
    background-color: transparent;
    border-color: #9d9d9d;
    color: #000;
    text-decoration: none;
}

.dealer-contact .contact-pill.contact-pill--social img {
    width: clamp(12px, 2.6vw, 16px);
    height: clamp(12px, 2.6vw, 16px);
    max-width: clamp(12px, 2.6vw, 16px);
    max-height: clamp(12px, 2.6vw, 16px);
    flex-shrink: 0;
    object-fit: contain;
    vertical-align: middle;
}

.dealer-contact .contact-pill img[src*="search-agentcy/iconcall.svg"] {
    width: clamp(12px, 2.6vw, 16px);
    height: clamp(12px, 2.6vw, 16px);
    max-width: clamp(12px, 2.6vw, 16px);
    max-height: clamp(12px, 2.6vw, 16px);
    flex-shrink: 0;
    object-fit: contain;
    vertical-align: middle;
}

/* ≤768px: specificity cao hơn block .dealer-contact phía trên — pill co giãn, không tràn */
@media (max-width: 768px) {
    .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-contact {
        margin-left: 53px;
        margin-right: clamp(6px, 2vw, 12px);
        padding-left: 0 !important;
        padding-right: clamp(3px, 1.2vw, 8px);
        gap: clamp(4px, 1.4vw, 6px);
        row-gap: clamp(5px, 1.6vw, 8px);
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: stretch;
        padding-bottom: 12px !important;
    }

    .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-contact .contact-pill {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
        width: auto;
        height: auto;
        min-height: clamp(32px, 8.2vw, 38px);
        padding: clamp(4px, 1.2vw, 6px) clamp(8px, 2vw, 11px);
        font-size: 12px;
        border-radius: clamp(13px, 3vw, 16px);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: normal;
        overflow-wrap: break-word;
        line-height: 1.15;
    }

    .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-contact .contact-pill img {
        width: clamp(11px, 2.8vw, 14px);
        height: clamp(11px, 2.8vw, 14px);
        flex-shrink: 0;
        object-fit: contain;
    }

    .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-contact .contact-pill.contact-pill--social img {
        width: clamp(11px, 2.8vw, 15px);
        height: clamp(11px, 2.8vw, 15px);
        max-width: clamp(11px, 2.8vw, 15px);
        max-height: clamp(11px, 2.8vw, 15px);
    }

    .container-search-agentcy-page .box-map-location .select-location .location-item .dealer-contact .contact-pill img[src*="search-agentcy/iconcall.svg"] {
        width: clamp(11px, 2.8vw, 15px);
        height: clamp(11px, 2.8vw, 15px);
        max-width: clamp(11px, 2.8vw, 15px);
        max-height: clamp(11px, 2.8vw, 15px);
    }
}

.dealer-opening {
    display: block !important;
    margin-top: 12px;
}

/* Header */
.opening-header {
    display: flex;
    align-items: center;
    gap: 0px;
    cursor: default;
    color: #242323;
    font-size: 16px;
    font-weight: 700;
    /*font-family: 'ToyotaTypeRegular';*/
    width: fit-content;
}
    .opening-header span {
        margin-left: 12px;
        line-height: 1.2;
        padding-right: 10px;
    }

/* Icon clock */
.opening-header img:first-child {
    width: 20px;
    height: 20px;
}

/* Content */
.opening-content {
    display: block;
    margin-top: 12px;
    margin-left: 32px;
    padding: 0;
    background: transparent;
    color: #000000;
    font-size: 16px;
    line-height: 1.45;
    text-align: left;
    width: auto;
    min-width: 0;
    border-radius: 0;
}

.icon-address {
    width: 14px !important;
    height: 14px !important;
    margin-left: 10px;
    margin-top: 10px;
    object-fit: contain;
}
.pagination-custom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    margin-left: 0%;
    width: 100%;
    position: relative;
    z-index: 11;
    padding-bottom: 24px;
}

.container-search-agentcy-page .box-map-location > .pagination-custom {
    width: 50%;
    margin-left: 0;
    margin-right: 0;
    flex: 0 0 50%;
}

/* Số trang */
.pagination-custom span {
    cursor: pointer;
    font-size: 16px;
    color: #333;
    padding-bottom: 4px;
    position: relative;
}

.pagination-custom span.ellipsis {
    cursor: default;
    color: #8a8a8a;
}

/* Active có gạch đỏ */
.pagination-custom span.active {
    color: #d70018;
}

.pagination-custom span.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: #d70018;
}

/* Prev / Next button */
.pagination-custom button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    padding: 4px 8px;
}

.pagination-custom button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pagination-custom {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    .container-search-agentcy-page .box-map-location > .pagination-custom {
        width: 100%;
        flex: 0 0 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

.location-item.active .icon-chose-location {
    content: url("/Content/Images/search-agentcy/chose_location.png?v=20260429-1");
}
.total-dealer {
    margin-top: 20px;
    margin-bottom: 25px;
    display: flex;
    text-align: start;
    color: #3a3a3a;
}
.hero-banner-content-title-new {
    margin-top: 28px;
    margin-bottom: 0;
    font-weight: 800;
    text-align: start;
    color: #000000;
    font-family: Toyota Type;
    font-style: normal;
    font-weight: 800;
    font-size: 32px;
    line-height: 120%;
    align-items: center;
}
.hero-banner-content-description-new {
    color: #000000;
    max-width: 700px;
    /*margin:auto;*/
    margin-top: 25px;
    /* font-weight: 600; */
    text-align: start;
    margin-bottom: 15px !important;
}
.form-label {
    font-size: 15px;
    color: #000000;
    text-align: start;
    margin-top: 40px;
    font-weight: bold;
    margin-bottom: 10px;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy {
    width: 100%;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .box-filter-search {
    width: 100%;
    margin: 0;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .box-filter-search > div {
    width: 100%;
    padding: 0;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .select2-container {
    width: 100% !important;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .select2-selection--single {
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    border: none !important;
    border-bottom: 1px solid #cfcfcf !important;
    border-radius: 0 !important;
    background-color: #fff !important;
    padding: 0 0 !important;
    box-shadow: none !important;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .select2-selection__rendered {
    color: #1a1a1a !important;
    font-size: 15px !important;
    line-height: 44px !important;
    padding-left: 0 !important;
    padding-right: 24px !important;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .select2-selection__placeholder {
    color: #d0d0d0 !important;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .select2-selection__arrow {
    height: 44px !important;
    right: 2px !important;
    width: 20px !important;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .select2-selection__arrow b {
    border: none !important;
    width: 8px !important;
    height: 8px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    margin: -6px 0 0 -4px !important;
    border-right: 1.5px solid #5e5e5e !important;
    border-bottom: 1.5px solid #5e5e5e !important;
    transform: rotate(45deg) !important;
}

.container-search-agentcy-page .hero-banner-content .box-search-location-agentcy .select2-container--open .select2-selection__arrow b {
    margin: -2px 0 0 -4px !important;
    transform: rotate(-135deg) !important;
}
.btn-dealer-nearby{
    background-color: #000;
    color: #fff;
    border: none;
    width: auto;
    height: 40px;
    margin-top: 0px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Tam an tinh nang "Tim dai ly gan day" - giu code de bat lai sau */
.btn-dealer-nearby {
    display: none !important;
}

/* Hover: lớp xam full quet trai -> phai va giu trang thai mo khi hover */
.btn-dealer-nearby:not(.btn-dealer-nearby-attention) {
    position: relative;
    overflow: hidden;
}

.btn-dealer-nearby:not(.btn-dealer-nearby-attention) > a {
    position: relative;
    z-index: 2;
}

.btn-dealer-nearby:not(.btn-dealer-nearby-attention)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(180, 180, 180, 0.42);
    z-index: 1;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-dealer-nearby:not(.btn-dealer-nearby-attention):hover::before {
    transform: scaleX(1);
}

.btn-dealer-nearby.btn-dealer-nearby-attention {
    overflow: visible;
    animation: btnSearchPulse 1.3s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(215, 0, 24, 0.45);
    margin-left: 15px;
}

@keyframes btnSearchPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(215, 0, 24, 0.2);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 0 10px rgba(215, 0, 24, 0.14);
        filter: brightness(1.1);
    }
}
