/* =========================================================
   WooAjaxFilter – filterbalk stijlen
   ========================================================= */

/* --- Wrapper -------------------------------------------- */
.waf-filter-wrapper {
    position: relative;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 24px;
}

/* Horizontale layout: facetten naast elkaar */
.waf-layout-horizontal .waf-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.waf-layout-horizontal .waf-facet {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 240px;
}

.waf-layout-horizontal .waf-actions {
    flex: 0 0 auto;
    align-self: flex-end;
    margin-top: 0;
}

/* Verticale layout: facetten onder elkaar (sidebar) */
.waf-layout-vertical .waf-facet {
    width: 100%;
}

/* --- Facet blok ----------------------------------------- */
.waf-facet {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 8px;
}

.waf-layout-horizontal .waf-facet {
    margin-bottom: 0;
}

.waf-facet-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c2c2c;
    gap: 8px;
    white-space: nowrap;
    transition: background .15s;
}

.waf-facet-toggle:hover { background: #f7f7f7; }

.waf-chevron {
    font-size: 9px;
    transition: transform .2s;
    display: inline-block;
    flex-shrink: 0;
}

.waf-facet-open .waf-chevron { transform: rotate(180deg); }

.waf-facet-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease, padding .25s ease;
    padding: 0 12px;
    background: #fff;
}

.waf-layout-horizontal .waf-facet-body {
    position: absolute;
    z-index: 100;
    min-width: 200px;
    border: 1px solid #e5e5e5;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.waf-facet-open .waf-facet-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 10px 12px 12px;
}

/* Zorg dat de horizontale facetten relatief zijn voor absolute dropdown */
.waf-layout-horizontal .waf-facet {
    position: relative;
}

/* --- Facet label (sorteren) ----------------------------- */
.waf-facet-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
    padding: 8px 12px 4px;
}

/* --- Checkboxes ----------------------------------------- */
.waf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    cursor: pointer;
    color: #444;
    font-size: 13px;
    line-height: 1.4;
    transition: color .15s;
}

.waf-checkbox-label:hover { color: #96588a; }

.waf-checkbox-label input {
    width: 14px;
    height: 14px;
    accent-color: #96588a;
    cursor: pointer;
    flex-shrink: 0;
}

.waf-count {
    margin-left: auto;
    color: #aaa;
    font-size: 11px;
}

/* --- Dropdown ------------------------------------------- */
.waf-dropdown {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
}

.waf-dropdown:focus { outline: 2px solid #96588a; border-color: transparent; }

.waf-facet-orderby .waf-dropdown {
    margin: 0 12px 10px;
    width: calc(100% - 24px);
}

/* --- Prijsslider ---------------------------------------- */
.waf-price-slider {
    margin: 14px 4px 18px;
}

.waf-price-slider.ui-slider {
    height: 5px;
    border: none;
    background: #e0e0e0;
    border-radius: 3px;
}

.waf-price-slider .ui-slider-range {
    background: #96588a;
    border-radius: 3px;
}

.waf-price-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    top: -7px;
    border-radius: 50%;
    background: #96588a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    cursor: grab;
}

.waf-price-slider .ui-slider-handle:active { cursor: grabbing; }
.waf-price-slider .ui-slider-handle:focus  { outline: 2px solid #96588a; }

.waf-price-display {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.waf-currency { font-size: 13px; color: #666; }

.waf-price-input {
    width: 64px;
    padding: 5px 7px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: right;
}

.waf-price-input:focus { outline: 2px solid #96588a; border-color: transparent; }

.waf-price-inputs { display: flex; gap: 12px; flex-wrap: wrap; }

.waf-price-inputs label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* --- Custom fields -------------------------------------- */
.waf-custom-field { margin-bottom: 8px; }

.waf-input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.waf-text-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.waf-text-input:focus { outline: 2px solid #96588a; border-color: transparent; }

/* --- Knoppen -------------------------------------------- */
.waf-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.waf-layout-horizontal .waf-actions {
    margin-top: 0;
}

.waf-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background .15s, transform .1s;
    white-space: nowrap;
}

.waf-btn:active { transform: scale(.97); }

.waf-btn-filter { background: #96588a; color: #fff; }
.waf-btn-filter:hover { background: #7e4876; }

.waf-btn-reset {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
}
.waf-btn-reset:hover { background: #e0e0e0; color: #333; }

/* --- Actieve filter-tags -------------------------------- */
.waf-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.waf-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f7f0f6;
    border: 1px solid #d4b8d0;
    color: #7e4876;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}

.waf-tag:hover { background: #eedbe9; }

.waf-tag-x {
    font-size: 10px;
    opacity: .6;
}

/* --- Responsive ----------------------------------------- */
@media ( max-width: 768px ) {
    .waf-layout-horizontal .waf-filter-form {
        flex-direction: column;
    }
    .waf-layout-horizontal .waf-facet {
        max-width: 100%;
        width: 100%;
    }
    .waf-layout-horizontal .waf-facet-body {
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
    }
    .waf-layout-horizontal .waf-actions {
        margin-top: 8px;
    }
}
