/* Tỉnh/thành tích hợp trong thanh tìm kiếm mặc định của header/Flatsome. */
.wi-header-search-area{
    position:relative;
    display:flex!important;
    align-items:stretch;
    align-self:stretch;
    flex:0 0 auto!important;
    min-width:165px;
    max-width:220px;
    margin:0!important;
    z-index:30;
}
.wi-header-search-area-control{
    position:relative;
    display:flex;
    align-items:center;
    width:100%;
    min-height:40px;
    margin:0;
    border-left:1px solid rgba(25,53,87,.14);
    box-sizing:border-box;
}
.wi-header-search-area-button{
    appearance:none;
    -webkit-appearance:none;
    display:flex!important;
    align-items:center;
    width:100%;
    height:100%;
    min-height:40px!important;
    gap:8px;
    margin:0!important;
    padding:0 12px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#24364b!important;
    font:inherit!important;
    font-size:13px!important;
    font-weight:600!important;
    line-height:1.2!important;
    text-align:left!important;
    text-transform:none!important;
    letter-spacing:0!important;
    cursor:pointer;
}
.wi-header-search-area-button:hover,
.wi-header-search-area-button:focus,
.wi-header-search-area.is-open .wi-header-search-area-button{
    background:rgba(var(--wi-primary-rgb,25,53,87),.045)!important;
    box-shadow:none!important;
    outline:0!important;
}
.wi-header-search-area-pin{
    width:17px;
    height:17px;
    flex:0 0 17px;
    fill:none;
    stroke:var(--wi-primary,#193557);
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
    pointer-events:none;
}
.wi-header-search-area-label{
    display:block;
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}
/* Không hiển thị mũi tên xổ xuống; tránh trùng với icon tìm kiếm của Flatsome. */
.wi-header-search-area-arrow{display:none!important}

/* Popup tự vẽ thay cho native <select>, để danh sách tỉnh/thành đồng nhất với UI website. */
.wi-header-search-area-menu{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    z-index:999999;
    width:285px;
    max-width:min(285px,calc(100vw - 24px));
    padding:10px;
    border:1px solid rgba(25,53,87,.12);
    border-radius:14px;
    background:#fff;
    box-shadow:0 14px 36px rgba(14,36,62,.18);
    box-sizing:border-box;
}
.wi-header-search-area-menu[hidden]{display:none!important}
.wi-header-search-area-menu:before{
    content:"";
    position:absolute;
    right:30px;
    top:-6px;
    width:11px;
    height:11px;
    border-left:1px solid rgba(25,53,87,.12);
    border-top:1px solid rgba(25,53,87,.12);
    background:#fff;
    transform:rotate(45deg);
}
.wi-header-search-area-find{
    position:relative;
    margin-bottom:8px;
}
.wi-header-search-area-find svg{
    position:absolute;
    left:11px;
    top:50%;
    width:16px;
    height:16px;
    transform:translateY(-50%);
    fill:none;
    stroke:#77879a;
    stroke-width:1.8;
    pointer-events:none;
}
.wi-header-search-area-find input{
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    margin:0!important;
    padding:0 12px 0 34px!important;
    border:1px solid #e1e7ee!important;
    border-radius:9px!important;
    background:#f8fafc!important;
    box-shadow:none!important;
    color:#24364b!important;
    font-size:13px!important;
}
.wi-header-search-area-find input:focus{
    border-color:var(--wi-primary,#193557)!important;
    background:#fff!important;
    box-shadow:0 0 0 2px rgba(var(--wi-primary-rgb,25,53,87),.10)!important;
    outline:0!important;
}
.wi-header-search-area-list{
    display:grid;
    gap:2px;
    max-height:320px;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-right:3px;
    scrollbar-width:thin;
    scrollbar-color:#cbd5df transparent;
}
.wi-header-search-area-list::-webkit-scrollbar{width:6px}
.wi-header-search-area-list::-webkit-scrollbar-track{background:transparent}
.wi-header-search-area-list::-webkit-scrollbar-thumb{background:#cbd5df;border-radius:99px}
.wi-header-search-area-option{
    appearance:none;
    -webkit-appearance:none;
    display:flex!important;
    align-items:center;
    width:100%;
    min-height:38px!important;
    margin:0!important;
    padding:7px 10px!important;
    border:0!important;
    border-radius:8px!important;
    background:#fff!important;
    box-shadow:none!important;
    color:#2d4056!important;
    font-size:13px!important;
    font-weight:500!important;
    line-height:1.25!important;
    text-align:left!important;
    text-transform:none!important;
    letter-spacing:0!important;
    cursor:pointer;
}
.wi-header-search-area-option:hover,
.wi-header-search-area-option:focus{
    background:#f2f6fa!important;
    color:var(--wi-primary,#193557)!important;
    outline:0!important;
}
.wi-header-search-area-option.is-selected{
    position:relative;
    padding-right:34px!important;
    background:rgba(var(--wi-primary-rgb,25,53,87),.09)!important;
    color:var(--wi-primary,#193557)!important;
    font-weight:700!important;
}
.wi-header-search-area-option.is-selected:after{
    content:"✓";
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    font-size:14px;
    font-weight:800;
}
.wi-header-search-area-empty{
    padding:18px 10px;
    color:#7b8795;
    font-size:13px;
    text-align:center;
}

@media (max-width:849px){
    .wi-header-search-area{min-width:135px;max-width:165px}
    .wi-header-search-area-button{gap:6px;padding:0 9px!important;font-size:12px!important}
    .wi-header-search-area-pin{width:15px;height:15px;flex-basis:15px}
    .wi-header-search-area-menu{right:0;width:275px}
}
@media (max-width:480px){
    .wi-header-search-area{min-width:108px;max-width:128px}
    .wi-header-search-area-pin{display:none}
    .wi-header-search-area-button{padding:0 8px!important;font-size:11px!important}
    .wi-header-search-area-menu{position:fixed;left:12px;right:12px;top:auto;bottom:12px;width:auto;max-width:none;border-radius:16px;padding:12px}
    .wi-header-search-area-menu:before{display:none}
    .wi-header-search-area-list{max-height:min(52vh,360px)}
}

/* Mobile: trong Search Lightbox của Flatsome, tách khu vực thành một hàng riêng để dễ nhìn/chạm. */
@media (max-width:480px){
    #search-lightbox .searchform .flex-row{
        display:flex!important;
        flex-wrap:wrap!important;
        align-items:stretch!important;
        gap:8px!important;
        overflow:visible!important;
    }
    #search-lightbox .searchform .flex-row > .flex-col.flex-grow{
        order:1;
        flex:1 1 calc(100% - 48px)!important;
        min-width:0!important;
    }
    #search-lightbox .searchform .wi-header-search-area + .flex-col{
        order:2;
        flex:0 0 40px!important;
        width:40px!important;
        max-width:40px!important;
    }
    #search-lightbox .searchform .wi-header-search-area{
        order:3;
        flex:0 0 100%!important;
        width:100%!important;
        min-width:0!important;
        max-width:none!important;
        align-self:auto!important;
    }
    #search-lightbox .wi-header-search-area-control{
        width:100%!important;
        min-height:42px!important;
        border:1px solid rgba(255,255,255,.30)!important;
        border-radius:999px!important;
        background:rgba(255,255,255,.96)!important;
        box-shadow:0 5px 16px rgba(0,0,0,.14)!important;
        overflow:hidden!important;
    }
    #search-lightbox .wi-header-search-area-button{
        justify-content:center!important;
        min-height:42px!important;
        padding:0 14px!important;
        color:#24364b!important;
        font-size:13px!important;
        font-weight:700!important;
        text-align:center!important;
    }
    #search-lightbox .wi-header-search-area-pin{
        display:block!important;
        width:16px!important;
        height:16px!important;
        flex:0 0 16px!important;
        stroke:var(--wi-primary,#193557)!important;
    }
    #search-lightbox .wi-header-search-area-label{
        flex:0 1 auto!important;
        max-width:calc(100% - 28px)!important;
    }
    #search-lightbox .wi-header-search-area-menu{
        left:12px!important;
        right:12px!important;
        bottom:12px!important;
        width:auto!important;
        max-width:none!important;
    }
}

/* v1.9.43: chừa riêng vùng cho nút tìm kiếm của Flatsome.
 * Nút khu vực luôn nằm về bên trái nút search và không thể phủ lên vùng click search. */
@media (min-width:481px){
    #header .searchform .flex-row,
    #masthead .searchform .flex-row,
    .header-wrapper .searchform .flex-row{
        position:relative!important;
        display:flex!important;
        flex-wrap:nowrap!important;
        align-items:stretch!important;
        overflow:visible!important;
    }

    #header .searchform .flex-row > .flex-col.flex-grow,
    #masthead .searchform .flex-row > .flex-col.flex-grow,
    .header-wrapper .searchform .flex-row > .flex-col.flex-grow{
        flex:1 1 auto!important;
        min-width:0!important;
    }

    #header .searchform .wi-header-search-area,
    #masthead .searchform .wi-header-search-area,
    .header-wrapper .searchform .wi-header-search-area{
        position:relative!important;
        z-index:4!important;
        flex:0 0 clamp(150px,17vw,205px)!important;
        width:clamp(150px,17vw,205px)!important;
        min-width:150px!important;
        max-width:205px!important;
        margin-right:48px!important;
    }

    #header .searchform .wi-header-search-area + .flex-col,
    #masthead .searchform .wi-header-search-area + .flex-col,
    .header-wrapper .searchform .wi-header-search-area + .flex-col{
        position:absolute!important;
        top:0!important;
        right:0!important;
        bottom:0!important;
        z-index:8!important;
        display:flex!important;
        align-items:stretch!important;
        justify-content:center!important;
        flex:0 0 48px!important;
        width:48px!important;
        min-width:48px!important;
        max-width:48px!important;
        margin:0!important;
        pointer-events:auto!important;
    }

    #header .searchform .wi-header-search-area + .flex-col button,
    #header .searchform .wi-header-search-area + .flex-col input[type="submit"],
    #masthead .searchform .wi-header-search-area + .flex-col button,
    #masthead .searchform .wi-header-search-area + .flex-col input[type="submit"],
    .header-wrapper .searchform .wi-header-search-area + .flex-col button,
    .header-wrapper .searchform .wi-header-search-area + .flex-col input[type="submit"]{
        position:relative!important;
        z-index:9!important;
        display:flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:48px!important;
        min-width:48px!important;
        max-width:48px!important;
        height:100%!important;
        margin:0!important;
        padding:0!important;
        pointer-events:auto!important;
    }
}
