/* filtre */

.sf-field-post-meta-agent_de_la_col-leccio .select {
    position: relative;
}

.searchandfilter>ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    list-style: none;
    margin: 0 0 20px !important;
    width: 100%;
    justify-content: center;
}

.searchandfilter>ul>li {
    width: 24%;
    position: relative;
    margin: 0 !important;
    padding: 0;
}

.searchandfilter>ul>li.sf-field-post-meta-agent_de_la_col-leccio {
    width: 50%;
}

.searchandfilter>ul>li:first-child {
    padding-left: 0;
}

.searchandfilter>ul>li.sf-field-reset,
.searchandfilter>ul>li.sf-field-submit {
    width: 42px;
}

.searchandfilter>ul>li label {
    width: 100%;
    cursor: pointer;
}

.custom-select,
.searchandfilter>ul>li select.sf-input-select,
.searchandfilter>ul>li input {
    max-width: 100%;
    width: 100%;
    padding: 8px 20px;
    border-radius: 20px;
    min-width: unset;
    border: 1px solid var(--global-palette1);
    color: var(--global-palette1);
    line-height: 1.3;
    background-color: transparent;
}

.searchandfilter>ul>li.sf-field-reset input,
.searchandfilter>ul>li.sf-field-submit input {
    font-size: 0;
    line-height: 40px;
    background-color: var(--global-palette1);
    background-image: url('../img/search-white.svg');
    background-repeat: no-repeat;
    background-size: 40px;
    background-position: center;
    border-radius: 30px;
    padding: 0;
}

.searchandfilter>ul>li.sf-field-reset input {
    background-image: url('../img/cross-white.svg');
    background-size: 28px;
}

.searchandfilter>ul>li.sf-field-reset input:hover {
    background-color: var(--global-palette8);
    background-image: url('../img/cross.svg');
}

.searchandfilter>ul>li.sf-field-submit input:hover {
    background-color: var(--global-palette8);
    background-image: url('../img/search.svg');
}

.searchandfilter>ul>li select option {
    max-width: 100px
}

.custom-select,
.searchandfilter ul>li select.sf-input-select {
    webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('../img/arrow-up.svg');
    background-repeat: no-repeat;
    background-size: 15px;
    background-position: center right 10px;
}

.custom-select:active,
.custom-select.active,
.searchandfilter>ul>li select.sf-input-select:focus {
    background-image: url('../img/arrow-down.svg');
}

.sf-input-select {
    cursor: pointer;
    display: inline-block;
    position: relative;
    font-size: 16px;
    color: var(--global-palette8);
    width: 100%;
    height: 40px;
}

.sf-input-select {
    display: none;
}

.custom-select:active,
.custom-select.active {
    border-bottom-color: var(--global-palette8);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.searchandfilter ul .select-options {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background-color: var(--global-palette8);
    margin: 0;
    border: 1px solid var(--global-palette1);
    border-top: 0;
    padding-bottom: 10px;
    margin-top: -1px;
    position: absolute;
    z-index: 99999;
    width: calc(100% - 10px);
}

.searchandfilter>ul>li:first-child .select-options {
    background-color: var(--global-palette1);
    width: 100%;
}

.searchandfilter ul .select-options li {
    color: var(--global-palette1);
    padding: 5px 20px;
    cursor: pointer;
}

.searchandfilter>ul>li:first-child .select-options li {
    color: var(--global-palette8);
}

.searchandfilter ul .select-options li[rel="hide"] {
    display: none;
}

.filter-count,
.filter-tags {
    margin-bottom: 20px !important;
}

.filter-tags span {
    display: inline-block;
    padding: 10px 20px;
    background-color: #eee;
    border-radius: 30px;
    margin-right: 10px;
}


/* filtre amb checkbox */

.searchandfilter>ul>li h4 {
    max-width: 100%;
    width: 100%;
    padding: 8px 30px 8px 20px;
    border-radius: 20px;
    min-width: unset;
    border: 1px solid var(--global-palette1);
    color: var(--global-palette1);
    font-size: 20px;
    line-height: 24px;
    font-weight: normal;
    background-repeat: no-repeat;
    background-size: 15px;
    background-position: center right 10px;
    background-image: url('../img/arrow-down.svg');
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    cursor: pointer;
}

.searchandfilter>ul>li h4.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background-image: url('../img/arrow-up.svg');
    background-color: var(--global-palette8);
}


.searchandfilter>ul>li[data-sf-field-input-type="radio"]>ul,
.searchandfilter>ul>li[data-sf-field-input-type="checkbox"]>ul {
    display: none;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background-color: var(--global-palette8);
    margin: 0;
    border: 1px solid var(--global-palette1);
    border-top: 0;
    padding-bottom: 10px;
    margin-top: -1px;
    position: absolute;
    z-index: 9;
    width: 100%;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
}

.searchandfilter>ul>li[data-sf-field-input-type="radio"]:first-child>ul,
.searchandfilter>ul>li[data-sf-field-input-type="checkbox"]:first-child>ul {
    background-color: var(--global-palette1);
}

.searchandfilter>ul>li[data-sf-field-input-type="radio"]:first-child>ul label,
.searchandfilter>ul>li[data-sf-field-input-type="checkbox"]:first-child>ul label {
    color: var(--global-palette8);
}

.searchandfilter li[data-sf-field-input-type="radio"] li,
.searchandfilter li[data-sf-field-input-type="checkbox"] li {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 15 px;
}

.searchandfilter li[data-sf-field-input-type="radio"] input,
.searchandfilter li[data-sf-field-input-type="checkbox"] input {
    position: relative;
    font-size: 24px;
    max-width: 20px;
}

.searchandfilter li[data-sf-field-input-type="radio"] label:before,
.searchandfilter li[data-sf-field-input-type="checkbox"] label:before {
    background: transparent;
    border: 1px solid var(--global-palette1);
    border-radius: 4px;
    cursor: pointer;
    content: "";
    height: 18px;
    width: 18px;
    left: 10px;
    position: absolute;
    top: 50%;
    margin-top: -8px;
}

.searchandfilter li[data-sf-field-input-type="radio"]:first-child label:before,
.searchandfilter li[data-sf-field-input-type="checkbox"]:first-child label:before {
    border-color: var(--global-palette8);
}

.searchandfilter li[data-sf-field-input-type="radio"] input[type=radio],
.searchandfilter li[data-sf-field-input-type="checkbox"] input[type=checkbox] {
    visibility: hidden;
}

.searchandfilter li[data-sf-field-input-type="radio"] input[type=radio]:checked+label:before,
.searchandfilter li[data-sf-field-input-type="checkbox"] input[type=checkbox]:checked+label:before {
    content: '';
    display: block;
    position: absolute;
    left: 10px;
    top: 13px;
    width: 6px;
    height: 15px;
    border-width: 0 2px 2px 0;
    border-style: solid;
    border-color: var(--global-palette1);
    transform-origin: bottom left;
    transform: rotate(45deg);
    border-radius: 0;
}

.searchandfilter li[data-sf-field-input-type="radio"]:first-child input[type=radio]:checked+label:before,
.searchandfilter li[data-sf-field-input-type="checkbox"]:first-child input[type=checkbox]:checked+label:before {
    border-color: var(--global-palette8);
}

.searchandfilter li[data-sf-field-input-type="radio"]:first-child>ul>li input[type=radio]:checked+label:after,
.searchandfilter li[data-sf-field-input-type="checkbox"]:first-child>ul>li input[type=checkbox]:checked+label:after {
    opacity: 1;
}

.searchandfilter li[data-sf-field-input-type=radio] label,
.searchandfilter li[data-sf-field-input-type="checkbox"] label {
    padding-left: 15px;
}

@media only screen and (max-width: 767px) {
    .searchandfilter>ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .searchandfilter>ul>li.sf-field-post-meta-agent_de_la_col-leccio,
    .searchandfilter>ul>li {
        width: 100%;
        margin-bottom: 20px;
    }
}