/*
 * Biizaa Flex Search v1.7.0
 * Responsive near-full-width, slim, modern UI.
 */

.bfs-wrap{
    --bfs-accent:#1677ff;
    --bfs-border:#dbe3ec;
    --bfs-text:#172033;
    --bfs-muted:#6b778c;
    --bfs-bg:#ffffff;
    --bfs-soft:#f7f9fc;
    --bfs-height:40px;
    --bfs-radius:10px;
    --bfs-gap:6px;
    position:relative;
    width:calc(100% - 10px);
    max-width:calc(100% - 10px);
    min-width:0;
    margin-left:auto;
    margin-right:auto;
    color:var(--bfs-text);
    font-family:inherit;
    box-sizing:border-box;
}

.bfs-wrap,
.bfs-wrap *{
    box-sizing:border-box;
}

.bfs-form,
.bfs-main-row,
.bfs-input-wrap,
.bfs-filter-row{
    min-width:0;
    max-width:100%;
}

.bfs-form{
    width:100%;
    margin:0;
}

.bfs-main-row{
    display:flex;
    align-items:center;
    gap:var(--bfs-gap);
    width:100%;
}

.bfs-input-wrap{
    flex:1 1 auto;
    min-width:0;
    height:var(--bfs-height);
    display:flex;
    align-items:center;
    border:1px solid var(--bfs-border);
    border-radius:var(--bfs-radius);
    background:var(--bfs-bg);
    box-shadow:0 1px 2px rgba(15,23,42,.025);
    overflow:hidden;
    transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.bfs-input-wrap:hover{
    border-color:#cbd5e1;
}

.bfs-input-wrap:focus-within{
    border-color:var(--bfs-accent);
    box-shadow:0 0 0 2px color-mix(in srgb, var(--bfs-accent) 10%, transparent);
    background:#fff;
}

.bfs-search-icon{
    width:34px;
    min-width:34px;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#8290a3;
}

.bfs-search-icon svg,
.bfs-btn-icon svg,
.bfs-filter-icon svg{
    display:block;
    fill:currentColor;
}

.bfs-query{
    width:100%;
    height:100%;
    min-width:0;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
    padding:0 7px 0 0!important;
    margin:0!important;
    font-family:inherit!important;
    font-size:13px!important;
    line-height:1.2!important;
    color:var(--bfs-text)!important;
}

.bfs-query::placeholder{
    color:#96a1b2;
    opacity:1;
}

.bfs-query::-webkit-search-cancel-button{
    display:none;
}

.bfs-clear{
    width:30px;
    min-width:30px;
    height:30px;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#8b97a8;
    font:400 19px/1 Arial,sans-serif;
    cursor:pointer;
    padding:0;
    margin:0 3px 0 0;
    transition:background-color .15s ease,color .15s ease;
}

.bfs-clear:hover{
    background:#f1f5f9;
    color:#475569;
}

.bfs-submit{
    height:var(--bfs-height);
    min-width:82px;
    border:1px solid transparent;
    border-radius:var(--bfs-radius);
    padding:0 13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    background:var(--bfs-accent);
    color:#fff;
    font-family:inherit;
    font-size:12px;
    font-weight:650;
    line-height:1;
    cursor:pointer;
    white-space:nowrap;
    box-shadow:0 2px 7px color-mix(in srgb, var(--bfs-accent) 18%, transparent);
    transition:filter .15s ease,transform .15s ease,box-shadow .15s ease;
}

.bfs-submit:hover{
    filter:brightness(.97);
    transform:translateY(-1px);
    box-shadow:0 4px 10px color-mix(in srgb, var(--bfs-accent) 20%, transparent);
}

.bfs-submit:active{
    transform:translateY(0);
}

.bfs-btn-style-icon{
    min-width:var(--bfs-height);
    width:var(--bfs-height);
    padding:0;
}

.bfs-btn-style-icon .bfs-btn-text{
    display:none;
}

.bfs-btn-style-text .bfs-btn-icon{
    display:none;
}

.bfs-filter-row{
    display:flex;
    align-items:center;
    gap:var(--bfs-gap);
    margin-top:var(--bfs-gap);
    flex-wrap:wrap;
}

.bfs-select-wrap{
    height:34px;
    max-width:100%;
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:0 8px;
    border:1px solid var(--bfs-border);
    border-radius:9px;
    background:var(--bfs-soft);
    color:#7b8798;
    transition:border-color .15s ease,background-color .15s ease;
}

.bfs-select-wrap:hover{
    border-color:#cbd5e1;
    background:#fff;
}

.bfs-filter-icon{
    flex:0 0 auto;
}

.bfs-select-wrap select{
    min-width:0;
    max-width:180px;
    min-height:0!important;
    height:32px!important;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
    color:var(--bfs-text)!important;
    font-family:inherit!important;
    font-size:11.5px!important;
    line-height:1.2!important;
    padding:0 20px 0 0!important;
    margin:0!important;
}

.bfs-compact .bfs-filter-row{
    margin-top:5px;
}

.bfs-compact .bfs-select-wrap{
    height:32px;
}

.bfs-compact .bfs-select-wrap select{
    height:30px!important;
}

.bfs-results{
    position:absolute;
    z-index:99999;
    top:calc(100% + 6px);
    left:0;
    right:0;
    background:#fff;
    border:1px solid var(--bfs-border);
    border-radius:12px;
    box-shadow:0 14px 34px rgba(15,23,42,.12);
    overflow:hidden;
}

.bfs-results-head{
    min-height:34px;
    padding:7px 10px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    background:#fbfcfe;
    border-bottom:1px solid #edf1f5;
    font-size:10px;
    font-weight:600;
    color:var(--bfs-muted);
    letter-spacing:.035em;
    text-transform:uppercase;
}

.bfs-result-item{
    display:flex;
    align-items:center;
    gap:9px;
    padding:8px 10px;
    border-bottom:1px solid #eef2f6;
    color:inherit!important;
    text-decoration:none!important;
    transition:background-color .14s ease;
}

.bfs-result-item:last-child{
    border-bottom:0;
}

.bfs-result-item:hover{
    background:#f8fafc;
}

.bfs-result-thumb,
.bfs-result-noimage{
    width:40px;
    height:40px;
    min-width:40px;
    border-radius:8px;
    background:#eef2f7;
}

.bfs-result-thumb{
    object-fit:cover;
}

.bfs-result-noimage{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#94a3b8;
    font-size:16px;
}

.bfs-result-body{
    min-width:0;
    flex:1;
}

.bfs-result-title{
    display:block;
    overflow:hidden;
    color:#1e293b;
    font-size:12.5px;
    font-weight:650;
    line-height:1.35;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.bfs-result-meta{
    display:flex;
    align-items:center;
    gap:7px;
    margin-top:2px;
    color:#6f7d90;
    font-size:10.5px;
    line-height:1.3;
}

.bfs-result-price{
    color:var(--bfs-accent);
    font-weight:650;
}

.bfs-empty,
.bfs-loading{
    padding:14px 12px;
    text-align:center;
    color:#6f7d90;
    font-size:11.5px;
}

/* Desktop: field -> filters -> button, one slim horizontal line. */
@media (min-width:1025px){
    .bfs-form{
        display:flex;
        align-items:center;
        gap:var(--bfs-gap);
    }

    .bfs-main-row{
        display:contents;
    }

    .bfs-input-wrap{
        order:1;
        flex:1 1 420px;
        min-width:220px;
    }

    .bfs-filter-row{
        order:2;
        flex:0 0 auto;
        flex-wrap:nowrap;
        margin:0;
        gap:var(--bfs-gap);
    }

    .bfs-submit{
        order:3;
        flex:0 0 auto;
    }

    .bfs-select-wrap{
        height:var(--bfs-height);
        min-width:118px;
        max-width:174px;
        border-radius:var(--bfs-radius);
        background:#fff;
    }

    .bfs-select-wrap select,
    .bfs-compact .bfs-select-wrap select{
        height:calc(var(--bfs-height) - 2px)!important;
        max-width:148px;
        font-size:11.5px!important;
    }

    .bfs-compact .bfs-select-wrap{
        height:var(--bfs-height);
    }

    .bfs-filter-desktop-hide .bfs-filter-row{
        display:none;
    }
}

/* Tablet: near-full-width and compact. */
@media (min-width:768px) and (max-width:1024px){
    .bfs-wrap{
        width:calc(100% - 8px);
        max-width:calc(100% - 8px);
        --bfs-height:39px;
    }

    .bfs-form{
        display:flex;
        flex-direction:column;
    }

    .bfs-main-row{
        order:1;
    }

    .bfs-filter-row{
        order:2;
    }

    .bfs-filter-tablet-hide .bfs-filter-row{
        display:none;
    }

    .bfs-submit{
        min-width:74px;
        padding:0 11px;
    }

    .bfs-filter-tablet-show .bfs-select-wrap{
        flex:1 1 150px;
    }

    .bfs-filter-tablet-show .bfs-select-wrap select{
        width:100%;
        max-width:none;
    }
}

/* Mobile: almost edge-to-edge, slim search and compact controls. */
@media (max-width:767px){
    .bfs-wrap{
        width:calc(100% - 8px)!important;
        max-width:calc(100% - 8px)!important;
        margin-left:auto!important;
        margin-right:auto!important;
        --bfs-height:38px;
        --bfs-gap:5px;
    }

    .bfs-form{
        display:flex;
        flex-direction:column;
    }

    .bfs-main-row{
        order:1;
    }

    .bfs-filter-row{
        order:2;
    }

    .bfs-filter-mobile-hide .bfs-filter-row{
        display:none;
    }

    .bfs-search-icon{
        width:31px;
        min-width:31px;
    }

    .bfs-search-icon svg{
        width:16px;
        height:16px;
    }

    .bfs-query{
        font-size:12.5px!important;
    }

    .bfs-submit{
        width:auto;
        min-width:58px;
        padding:0 10px;
        border-radius:9px;
        box-shadow:none;
    }

    .bfs-submit .bfs-btn-icon{
        display:none!important;
    }

    .bfs-submit .bfs-btn-text{
        display:inline!important;
        font-size:11.5px;
    }

    .bfs-filter-mobile-show .bfs-filter-row{
        width:100%;
        margin-top:5px;
        gap:5px;
    }

    .bfs-filter-mobile-show .bfs-select-wrap{
        flex:1 1 calc(50% - 3px);
        min-width:0;
    }

    .bfs-filter-mobile-show .bfs-select-wrap select{
        width:100%;
        max-width:none;
    }

    .bfs-results{
        top:calc(100% + 5px);
        border-radius:10px;
    }

    .bfs-result-item{
        gap:8px;
        padding:7px 9px;
    }

    .bfs-result-thumb,
    .bfs-result-noimage{
        width:38px;
        height:38px;
        min-width:38px;
        border-radius:7px;
    }
}

@media (max-width:430px){
    .bfs-wrap{
        width:calc(100% - 6px)!important;
        max-width:calc(100% - 6px)!important;
    }

    .bfs-submit{
        min-width:54px;
        padding:0 9px;
    }
}

/* Same width behavior inside WooCommerce / workshop containers. */
.single-product .bfs-wrap,
.post-type-archive-product .bfs-wrap,
.woocommerce .bfs-wrap{
    box-sizing:border-box;
}
