/* =========================================================
BO - Vehicle Listing Filter
Owns filter controls, chips, range sliders and listing filter drawer.
========================================================= */

/* =========================================================
General Filter
========================================================= */
.bo-btn-query{
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.bo-btn-query .bo-icon{
    width: 1.5rem;
    height:1.5rem;
}

.bo-btn-query .is-active{
    background: var(--bo-filter-tag-bg-active);
}

.bo-filter.is-hidden {
    display: none;
}

.bo-query-tags-btn {
    background: var(--bo-filter-tag-bg);
    margin: var(--bo-space-1);
}

.bo-query-tags-btn:hover{
    background: var(--bo-filter-tag-bg-active);
}

.bo-query-tags-btn.is-active, 
.bo-query-tags-btn :focus {
    background: var(--bo-filter-tag-bg-active);
}

.bo-filter-count{
    padding: 0 0.45rem;
    background:var(--bo-soft);
    font-size: 0.85rem;
    color: var(--bo-filter-count-color);
    border-radius: var(--bo-radius-xs);
    border: 1px solid var(--bo-filter-count-border);
}

.bo-filter-group{
    margin: 0 0 var(--bo-space-2) 0;
}

.bo-vehicle-listing #boFilterAside {
    display: flex;
    flex-direction: column;
}

.bo-vehicle-listing .bo-filter-quick-options {
    margin-top: var(--bo-space-3);
    padding: var(--bo-space-3);
    border: 1px solid var(--bo-quick-options-border, var(--bo-alpha-black-10, rgba(0, 0, 0, .1)));
    border-radius: var(--bo-radius-sm);
    background: transparent;
}

.bo-vehicle-listing .bo-filter-quick-options__head {
    display: flex;
    align-items: center;
    gap: var(--bo-space-2);
}

.bo-vehicle-listing .bo-filter-quick-options__head .bo-filter-title {
    margin: 0;
    font-size: .95rem;
}

.bo-vehicle-listing .bo-filter-quick-options__icon {
    box-sizing: border-box;
    width: 2rem;
    height: 2rem;
    padding: .4rem;
    border-radius: 50%;
    background: var(--bo-theme-primary-soft, rgba(37, 99, 235, .1));
    color: var(--bo-theme-primary, #2563eb);
    transition: transform .16s ease;
}

.bo-vehicle-listing .bo-filter-quick-options__items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bo-space-2);
    padding: var(--bo-space-2) 0 0;
}

.bo-vehicle-listing .bo-filter-quick-options .bo-query-tags-btn {
    margin: 0;
    padding: .4rem .7rem;
    border: 1px solid var(--bo-quick-option-border, var(--bo-alpha-black-15, rgba(0, 0, 0, .15)));
    border-radius: var(--bo-radius-pill, 999px);
    background: transparent;
    color: var(--bo-text, #1f2937);
    font-size: .875rem;
    line-height: 1.2;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.bo-vehicle-listing .bo-filter-quick-options .bo-query-tags-btn.is-active {
    border-color: var(--bo-theme-primary, #2563eb);
    background: var(--bo-theme-primary-soft, rgba(37, 99, 235, .1));
}

@media (hover: hover) and (pointer: fine) {
    .bo-vehicle-listing .bo-filter-quick-options:hover .bo-filter-quick-options__icon {
        transform: scale(1.06) rotate(-4deg);
    }

    .bo-vehicle-listing .bo-filter-quick-options .bo-query-tags-btn:hover {
        border-color: var(--bo-theme-primary, #2563eb);
        background: var(--bo-theme-primary-soft, rgba(37, 99, 235, .1));
        box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bo-vehicle-listing .bo-filter-quick-options__icon,
    .bo-vehicle-listing .bo-filter-quick-options .bo-query-tags-btn {
        transition: none;
    }
}

@media (max-width: 991.98px) {
    .bo-vehicle-listing #boFilterAside > .bo-vehicle-search--filter {
        order: 0;
    }

    .bo-vehicle-listing .bo-filter-quick-options {
        order: 1;
        margin-top: 0;
        margin-bottom: var(--bo-space-3);
    }

    .bo-vehicle-listing #boFilterGroups {
        order: 2;
    }

    .bo-vehicle-listing .bo-filter-quick-options__items {
        flex-wrap: nowrap;
        padding-bottom: var(--bo-space-1);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    .bo-vehicle-listing .bo-filter-quick-options .bo-query-tags-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

.bo-filter-body{
    display: grid;
    gap: var(--bo-space-1);
    padding: var(--bo-space-1);
}

.bo-filter-body > label.bo-filter-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--bo-space-2);
    width: 100%;
    margin: 0;
    padding: .3rem 0;
    line-height: 1.25;
    cursor: pointer;
}

.bo-filter-body > label.bo-filter-row > input {
    margin: 0;
}

.bo-filter-body > label.bo-filter-row > .bo-filter-count {
    justify-self: end;
}

.bo-filter-group .is-active .bo-filter-title {
    font-weight: 600;
}

.bo-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bo-space-3);
    padding: 0.65rem;
    border-radius: .25rem;
    background: var(--bo-filter-head-bg);
    cursor:pointer;
}

    .bo-filter-head:hover {
        background: var(--bo-filter-head-bg-hover);
    }

.bo-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bo-space-3);
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
}

.bo-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--bo-space-2);
}

.bo-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    border-radius: var(--bo-radius-lg);
    opacity: .75;
    padding: 0;
}

.bo-filter-clear:hover {
    opacity: 1;
    background: var(--bo-filter-clear-bg-hover);
}


.bo-filter-head.is-active .bo-filter-title {
    font-weight: 600;
}

.bo-filter-actions .bo-icon{
    width: 1.25rem;
    height: 1.25rem;
}

.bo-filter-chevron-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: var(--bo-radius-pill);
    background: transparent;
    color: var(--bo-muted, #667085);
}

.bo-filter-chevron-btn:focus-visible {
    outline: 2px solid var(--bo-theme-primary, #2563eb);
    outline-offset: 2px;
}

.bo-filter-chevron {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform .18s ease;
}

.bo-filter-head[aria-expanded="true"] .bo-filter-chevron {
    transform: rotate(180deg);
}

.bo-range-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--bo-space-3);
}

.bo-range input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.45rem;
    border-radius: .25rem;
    border: 1px solid var(--bo-input-border);
}

.bo-badge .bo-icon{
    width:1.25rem;
    height:1.25rem;
}

.bo-meta-ico .bo-icon{
    width:1.75rem;
    height:1.75rem;
}

.bo-btn-cta .bo-icon{
    width: 1.25rem;
    height: 1.25rem;
}

.bo-loc .bo-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.25rem;
}

.boQuerySort{
    display: flex;
    flex-wrap: wrap;
    gap: var(--bo-space-4);
    align-items: center;
}

.boQuerySort .bo-icons{
    width:1.5rem;
    height:1.5rem;
}

.boQuerySort select{
    min-width: 0;
    box-sizing: border-box;
    padding: 0.45rem;
    border-radius: .25rem;
    border: 1px solid var(--bo-input-border);
}

#boToogleCover.is-active {
    outline: 2px solid currentColor;
}

.bo-range-sliders {
    position: relative;
    height: var(--bo-size-6xl);
}

.bo-range-slider {
    width: 100%;
    margin: 0;
    height: 2.125rem;
}

.bo-noui {
margin: 1.25rem .75rem;
}

.noUi-target {
    border: 0;
    box-shadow: none;
    background: var(--bo-range-track);
    border-radius: 999px;
    height: 0.375rem;
}

.noUi-connect {
    background: var(--bo-range-connect);
}

.noUi-handle {
    width: var(--bo-size-xl) !important;
    height: var(--bo-size-xl) !important;
    border-radius: 999px;
    background: var(--bo-range-thumb-bg);
    border: 2px solid var(--bo-range-thumb-border);
    box-shadow: var(--bo-range-thumb-shadow);
    top: -0.375rem !important;
    right: -0.5625rem !important;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

.noUi-touch-area{
    cursor: grab;
}


/* =========================================================
Ny kod - 2026-03-17
========================================================= */

.bo-filter-chips{
    padding: var(--bo-space-2) 0;
}

.bo-offcanvas-filter{
    z-index:9999; /*Fr?gan ?r om vi ska s?tta dessa d? och tweaka baserat p? navbar*/
}

.bo-filter-drawer__footer {
    border-top: 1px solid var(--bo-border-color);
    background: var(--bo-surface);
    position: sticky;
    bottom: 0;
}
