/**
 * Houzez Custom AJAX Filter — styling
 * Adjust --hzcaf-accent to match your exact brand orange.
 */
.houzez-custom-filter-bar {
    --hzcaf-accent: #f2600c;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 4px;
}

.houzez-custom-filter-bar #houzez-custom-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.houzez-custom-filter-bar .hzcaf-field {
    min-width: 180px;
}

/* --- Select2 tweaks so it blends into the bar --- */
.houzez-custom-filter-bar .select2-container .select2-selection--single {
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: flex;
    align-items: center;
    padding: 0 8px;
}
.houzez-custom-filter-bar .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 4px;
}
.houzez-custom-filter-bar .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

/* --- Price range slider --- */
.hzcaf-price-wrap {
    min-width: 240px;
    flex: 1 1 240px;
}
.hzcaf-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
    color: #444;
}
.hzcaf-price-labels span {
    font-weight: 600;
}
#hzcaf-price-slider {
    margin: 0 4px 4px 4px;
}
#hzcaf-price-slider .noUi-connect {
    background: var(--hzcaf-accent);
}
#hzcaf-price-slider .noUi-handle {
    border-radius: 50%;
    width: 18px;
    height: 18px;
    right: -9px;
    top: -6px;
    border: 2px solid var(--hzcaf-accent);
    box-shadow: none;
}
#hzcaf-price-slider .noUi-handle::before,
#hzcaf-price-slider .noUi-handle::after {
    display: none;
}
#hzcaf-price-slider.noUi-target {
    background: #e9e9e9;
    border: none;
    box-shadow: none;
    height: 4px;
}

/* --- Mobile toggle button: hidden on desktop by default, theme-matched --- */
.houzez-custom-filter-bar .hzcaf-toggle-btn {
    display: none !important;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    background: var(--hzcaf-accent);
    color: #fff !important;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}
.houzez-custom-filter-bar .hzcaf-toggle-btn:hover,
.houzez-custom-filter-bar .hzcaf-toggle-btn:focus {
    background: #d9540a;
    color: #fff;
}
.houzez-custom-filter-bar .hzcaf-toggle-btn::before {
    content: "\2630"; /* simple filter/menu glyph */
    margin-right: 8px;
    font-size: 13px;
}
.houzez-custom-filter-bar .hzcaf-toggle-btn::after {
    content: "\25BE";
    transition: transform 0.15s ease;
}
.houzez-custom-filter-bar.is-open .hzcaf-toggle-btn::after {
    transform: rotate(180deg);
}

/* --- Clear button: same accent theme as the toggle button --- */
.houzez-custom-filter-bar .hzcaf-clear-btn {
    background: var(--hzcaf-accent);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    padding: 11px 22px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}
.houzez-custom-filter-bar .hzcaf-clear-btn:hover,
.houzez-custom-filter-bar .hzcaf-clear-btn:focus {
    background: #d9540a;
    color: #fff;
}

/* --- Responsive: stack fields full-width, hide behind toggle on mobile --- */
@media (max-width: 768px) {
    .houzez-custom-filter-bar {
        padding: 0;
        border: none;
        gap: 0;
    }
    .houzez-custom-filter-bar .hzcaf-toggle-btn {
        display: flex !important;
    }
    .houzez-custom-filter-bar #houzez-custom-filter-form {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
        border: 1px solid #ececec;
        border-top: none;
    }
    .houzez-custom-filter-bar.is-open #houzez-custom-filter-form {
        display: flex;
    }
    .houzez-custom-filter-bar .hzcaf-field,
    .houzez-custom-filter-bar .hzcaf-price-wrap,
    .houzez-custom-filter-bar .hzcaf-clear-btn {
        width: 100%;
        min-width: 0;
    }
}
