/* Modern filter-panel design shared by the sold-vehicles page and the
   inventory homepage. Scope: wrap the sidebar in .filter-modern (panel) and
   add .filter-modern-chips to the applied-filter chips list. Page-specific
   chrome (layout grids, apply bars, mobile sheets) stays in each page's own
   stylesheet. */

.filter-modern {
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(25, 40, 74, 0.06);
    overflow: hidden;
}

.filter-modern .fp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 1rem;
    color: #19284A;
    border-bottom: 1px solid #eef0f5;
}

.filter-modern .sidebar-left {
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    width: auto;
}

.filter-modern .filtersection {
    padding: 4px 6px 10px;
}

.filter-modern .sidebartoggle > li {
    border-bottom: 1px solid #f0f2f7;
    padding: 2px 12px;
    list-style: none;
}

.filter-modern .sidebartoggle > li:last-child {
    border-bottom: 0;
}

.filter-modern .sidebartoggle h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
    color: #19284A;
    padding: 12px 2px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

/* The theme adds its own FontAwesome chevron on ::before — ours lives on
   ::after, so silence the legacy one. */
.filter-modern .sidebartoggle h3::before {
    display: none !important;
}

.filter-modern .sidebartoggle h3::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid #8a93a8;
    border-bottom: 2px solid #8a93a8;
    transform: rotate(45deg);
    transition: transform 0.18s ease-in-out;
    flex-shrink: 0;
    margin-left: 10px;
}

.filter-modern .sidebartoggle h3:not(.collapsed)::after {
    transform: rotate(225deg);
}

.filter-modern .sidebartoggle .collapse,
.filter-modern .sidebartoggle .collapsing {
    padding-bottom: 10px;
}

.filter-modern .filtersection .magic-checkbox + label {
    font-size: 0.92rem;
    color: #3c4761;
    padding-top: 1px;
    padding-bottom: 1px;
}

.filter-modern .filtersection select {
    border: 1px solid #dde1ea;
    border-radius: 8px;
    font-size: 0.92rem;
    padding: 7px 10px;
    color: #19284A;
    background: #fff;
    width: 100%;
}

/* Single-tab "Vehicle finder" header adds nothing — the panel has its own
   title. (The homepage keeps its Saved Search tab, so only hide when the
   panel opts in via .fp-hide-tabs.) */
.filter-modern.fp-hide-tabs .usedCarLoction {
    display: none !important;
}

/* ---------- Applied-filter chips (legacy clearfilter list) ---------- */

.filter-modern-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0 0 10px;
}

.filter-modern-chips > li {
    list-style: none;
}

.filter-modern-chips li > div {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 107, 44, 0.08);
    border: 1px solid rgba(255, 107, 44, 0.35);
    color: #b3441a;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 2px 4px 2px 0;
}

.filter-modern-chips li > div span {
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
}

.filter-modern-chips #clearalldiv a {
    background: none;
    border: 1px solid #dde1ea;
    color: #6a7288;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
}

.filter-modern-chips #clearalldiv a span {
    color: inherit;
}

/* Facet value counts ("Ford  23") and the model-needs-make hint. */
.filter-modern .fp-facet-count {
    display: inline-block;
    background: #eef1f6;
    color: #6a7288;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 8px;
    margin-left: 6px;
    vertical-align: 1px;
}

.filter-modern .fp-model-hint {
    margin: 4px 2px 8px;
    font-size: 0.88rem;
    color: #8a93a8;
    line-height: 1.45;
}
