/********************************************************************************************
 ISTRUZIONI E HEADUPS

 ***-> Ricorda di wrappare la shortcode con filters-container-for-mob se hai la versione FREE
 ***-> Per gli swatch assicurati che l'attributo sia pa_color
 ***-> Il colore di default di hover e selected si fanno dall'admin del plugin

 **********************************************************************************************/
@media screen and (min-width: 1000px) {
    .widget_wpc_filters_widget {
        padding-right: 50px
    }
}

/******************************************
Blocchi widget
*******************************************/

.wpc-filters-section {

    --main-filter-color: #4e5562;
    --border-filter-color: #eaeaea;
    --hover-filter-color: #c86a3a;
    --filter-radius: 16px;

    padding: 2rem;
    font-size: 14px;
    line-height: 21px;
    color: var(--main-filter-color);
    background:white;
    border-radius: var(--filter-radius);
    border:1px solid var(--border-filter-color)
}


/***/
@media screen and (min-width: 769px) {

    .wpc-filters-section {
        padding-block:32px
    }

}

/******************************************
Dei buoni default
*******************************************/
.wpc-filters-ul-list{
    max-height: 400px;
    overflow-y: auto;
}

.wpc-filters-main-wrap ul.children{
    margin-left: 0;
}

.wpc-filter-link {
    margin-right: 0;
}


/******************************************
Tasto filtri da mobile
*******************************************/
body .wpc-filters-open-button-container a.wpc-open-close-filters-button{

}

/******************************************
Links
*******************************************/

.wpc-filters-section a {
    color: var(--main-filter-color);
}

.wpc-filters-section a:hover,
.wpc-filters-section a:active,
.wpc-filters-section a:focus {
    color: var(--hover-filter-color);
}

/******************************************
Title
*******************************************/
.widget-title.wpc-filter-title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 22px;
    color: #111;
}

/******************************************
Label tag filters
*******************************************/

.wpc-filter-label-wrapper .wpc-filter-link {
    font-weight: 500;
    transition: all 500ms ease-in-out;
}

/******************************************
Checkbox trick

input[type=checkbox][data-wpc-link] {
    display: none;
}

.wpc-filters-checkboxes input[type=checkbox][data-wpc-link]:checked ~ label .wpc-filter-link {
    border-left: 3px solid var(--hover-filter-color);
    font-weight: 600;
    padding-inline: 8px;
}

.wpc-filters-checkboxes input[type=checkbox][data-wpc-link]:checked ~ label .wpc-filter-link + span.wpc-term-count {
    color: var(--hover-filter-color);
    font-weight: bold;

}
*******************************************/

/******************************************
Prezzo a caselle
*******************************************/

.wpc-filters-range-column input {
    border-radius: var(--filter-radius)
}


/******************************************
Allinea il conteggio a dx
*******************************************/

.wpc-term-item-content-wrapper > label {
    width: 100%
}

.wpc-term-count {
    margin-left: auto;
}

/******************************************
Fixa i br per il tasto da mobile (Grazie FSE)
*******************************************/
span.wpc-icon-html-wrapper br {
    display: none;
}


/******************************************
Mobile della versione free
*******************************************/


body .wpc-filters-open-button-container a.wpc-open-close-filters-button {
    --btn-filter-color:  #e1e6ec;
    background: white !important;
    margin-bottom: 70px;
    border:1px solid var(--btn-filter-color) !important;
}

@media screen and (min-width: 769px) and (max-width: 1022px){
    .wpc_show_open_close_button .wpc-filters-open-button-container {
        display: block !important;
    }

}


@media screen and (max-width: 781px) {
    .wpc-filters-open-button-container {
        z-index: 99999;
        position: fixed;
        bottom: 0;
        display: grid !important;
        width: 100%;
        place-content: center;
    }



    .filters-container-for-mob {
        position: fixed;
        bottom: 0;
        z-index: 99999;
        left: 0;
        width: 100%;
        text-align: center;
    }

    .wpc-filters-widget-content.wpc-closed{display:none}

    .wpc-filters-widget-content.wpc-opened {
        max-height: 50vh;
        overflow-y: auto;
        background: white;
        padding-block: 2rem;
        box-shadow: 0 -11px 20px 3px rgb(163 163 163 / 47%);
        border-radius: 8px;
        padding-inline: 16px;
        margin-inline: 16px;

    }

    .wpc-filters-widget-wrapper {
        background: white;

    }

    .wpc-filters-main-wrap:has(.wpc-opened){
        bottom:-29px;

    }
}


/******************************************
CUSTOM SWATCHES
*******************************************/

.custom-swatch {
    width: 20px;
    height: 20px;
    border-radius:50%;
    display:block;
    border:1px solid;
}
.wpc-filter-pa_color .wpc-filter-link{
    display:flex;
    gap: 8px;
}

[class*="wpc-checkbox-taxonomy-pa_color"]{
    border: none;
}

/******************************************
FIX for filter everything FREE
Nasconde i box dei filtri che non hanno voci e mostrerebbero N/D
*******************************************/


.wpc-filters-section:has(.wpc-no-filter-terms){
    display: none;
}
