/* KN Facets : styles repris de FacetWP 4.4.1 (front.css) puis fSelect (licence MIT, FacetWP LLC), dans le même ordre que FacetWP. */

/* ---- FacetWP front.css (parties utilisées) ---- */
.facetwp-facet {
    margin-bottom: 40px;
}

.facetwp-facet.is-loading {
    opacity: 0.6;
    /** prevent clicks during refresh **/
    pointer-events: none;
}

.facetwp-overlay {
    position: absolute;
}

.facetwp-pager-label {
    display: inline-block;
    margin-right: 12px;
}

.facetwp-page {
    display: inline-block;
    padding: 0px 4px;
    margin-right: 6px;
    cursor: pointer;
}

.facetwp-page.dots {
    cursor: default;
}

.facetwp-page.active {
    font-weight: bold;
    cursor: default;
}

/* Checkboxes */

.facetwp-type-checkboxes .facetwp-depth {
    display: none;
}

.facetwp-type-checkboxes .facetwp-depth.visible {
    display: inherit;
}

.facetwp-checkbox {
    background: url('img/checkbox.png') 0 50% no-repeat;
    background-size: 14px 14px;
    margin-bottom: 4px;
    padding-left: 20px;
    cursor: pointer;
}

.facetwp-checkbox.checked {
    background-image: url('img/checkbox-on.png');
}

.facetwp-checkbox.disabled,
.facetwp-radio.disabled {
    opacity: 0.4;
    cursor: default;
}

.facetwp-checkbox .facetwp-expand {
    float: right;
}

.facetwp-display-value {
    padding-right: 5px;
}

/* Radio */

.facetwp-radio {
    background: url('img/radio.png') 0 50% no-repeat;
    background-size: 14px 14px;
    margin-bottom: 4px;
    padding-left: 20px;
    cursor: pointer;
}

.facetwp-radio.checked {
    background-image: url('img/radio-on.png');
}

/* fSelect */

.facetwp-type-fselect.is-loading {
    opacity: 1; /* prevent stack order issues */
}

.facetwp-type-fselect.is-loading .fs-label-wrap,
.facetwp-type-fselect.is-loading .fs-search,
.facetwp-type-fselect.is-loading .fs-no-results,
.facetwp-type-fselect.is-loading .fs-options {
    opacity: 0.6;
}

.facetwp-type-fselect.is-loading .fs-option {
    cursor: wait;
}

.facetwp-type-fselect .fs-wrap.fs-disabled .fs-option {
    opacity: 0.4;
    cursor: wait;
}

.facetwp-type-fselect .fs-option .fs-option-label {
    white-space: nowrap;
}

.facetwp-type-fselect .fs-option.d1 .fs-option-label {
    padding-left: 20px;
}

.facetwp-type-fselect .fs-option.d2 .fs-option-label {
    padding-left: 40px;
}

.facetwp-type-fselect .fs-option.d3 .fs-option-label {
    padding-left: 60px;
}

.facetwp-type-fselect .fs-option.d4 .fs-option-label {
    padding-left: 80px;
}

.facetwp-type-fselect .fs-option.d5 .fs-option-label {
    padding-left: 100px;
}

.facetwp-type-fselect .fs-option.d6 .fs-option-label {
    padding-left: 120px;
}

/* Hierarchy */

.facetwp-depth {
    margin-left: 12px;
}

.facetwp-link {
    cursor: pointer;
}

.facetwp-link.checked {
    font-weight: bold;
    cursor: default;
}

.facetwp-toggle {
    cursor: pointer;
}

.facetwp-hidden {
    display: none;
}


/* Search */

.facetwp-input-wrap {
    display: inline-block;
    position: relative;
}

.facetwp-facet input.facetwp-search,
.facetwp-facet input.facetwp-location {
    margin: 0;
    padding-right: 30px;
    min-width: 240px;
}

.facetwp-icon {
    right: 0;
    height: 100%;
    line-height: 1;
    position: absolute;
    cursor: pointer;
    opacity: 0.5;
}

.facetwp-icon:before {
    display: inline-block;
    content: '';
    width: 30px;
    height: 100%;
    background: url('img/icon-search.png') no-repeat;
    background-position: 5px 50%;
    background-size: 20px 20px;
}

/* Icônes de chargement */

.facetwp-icon.f-reset:before {
    background-image: url('img/icon-close.png');
}

.facetwp-icon.f-loading:before {
    background-image: url('img/loading.png');
    animation: spin 700ms infinite linear;
}

/* CSS animations */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* ---- fSelect ---- */
.fs-wrap {
    width: 220px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    line-height: 1;
}

.fs-label-wrap {
    position: relative;
    background-color: #fff;
    border: 1px solid #ddd;
    cursor: default;
}

.fs-label-wrap,
.fs-dropdown {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.fs-label-wrap .fs-label {
    padding: 6px 22px 6px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.fs-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    position: absolute;
    top: 0;
    right: 5px;
    bottom: 0;
    margin: auto;
    transition: ease-in 0.15s;
}

.fs-open .fs-arrow {
    transform: rotate(-180deg);
}

.fs-dropdown {
    width: 100%;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000;
}

.fs-dropdown .fs-options {
    max-height: 200px;
    overflow: auto;
}

.fs-search {
    background-color: #f8f8f8;
    padding: 0 8px;
}

.fs-wrap .fs-search input {
    border: none;
    box-shadow: none;
    background-color: transparent;
    outline: none;
    padding: 0;
    width: 100%;
}

.fs-option,
.fs-search,
.fs-optgroup-label {
    padding: 6px 8px;
    cursor: default;
}

.fs-option:last-child {
    border-bottom: none;
}

.fs-no-results {
    padding: 6px 8px;
}

.fs-option {
    cursor: pointer;
    word-break: break-all;
}

.fs-option.disabled {
    opacity: 0.4;
    cursor: default;
}

.fs-wrap.single .fs-option.selected {
    background-color: #dff3ff;
}

.fs-wrap.multiple .fs-option {
    position: relative;
    padding-left: 30px;
}

.fs-wrap.multiple .fs-checkbox {
    position: absolute;
    display: block;
    width: 30px;
    top: 0;
    left: 0;
    bottom: 0;
}

.fs-wrap.multiple .fs-option .fs-checkbox i {
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    height: 14px;
    border: 1px solid #aeaeae;
    border-radius: 2px;
    background-color: #fff;
}

.fs-wrap.multiple .fs-option.selected .fs-checkbox i {
    background-color: rgb(108, 138, 255);
    border-color: transparent;
}

.fs-optgroup-label {
    font-weight: bold;
    text-align: center;
    background-color: #f8f8f8;
}

.fs-hidden {
    display: none;
}
