/* SMOOTH DROPDOWN EXPANSION - NO LAYOUT SHIFTS */
.wpc-filters-section {
    position: relative !important;
    margin-bottom: 0 !important;
}

.wpc-horizontal-layout .wpc-filters-widget-wrapper {
    gap: 12px;
}

.wpc-filter-content {
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 10px !important;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: initial !important;
    background: white !important;
    /* border: 1px solid #ddd !important; */
    border-top: none !important;
    border-radius: 0 !important;
    z-index: 50 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}

.wpc-filters-section.open .wpc-filter-content {
    max-height: 300px !important;
    min-width: 210px;
    width: fit-content;
    padding: 0 !important;
    overflow-y: auto !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.wpc-instead-of-posts-found {
    display: none;
}

.wpc-filter-title {
    cursor: pointer !important;
    user-select: none !important;
    /* background: #f2f2f2 !important; */
    padding: 14px 15px !important;
    border: 1px solid transparent !important;
    position: relative !important;
    border-radius: 0 !important;
    transition: background-color 0.2s ease !important;
    margin-bottom: 0 !important;
    font-size: 18px !important;
}

.wpc-filters-section.open .wpc-filter-title,
.wpc-filter-title:hover {
    /* background: #e8e8e8 !important; */
    border: 1px solid rgba(24, 23, 22, 1) !important;
}

.wpc-filters-section:not(.wpc-filter-more-less):not(.wpc-filter-post_meta_num):not(.wpc-filter-tax_numeric):not(.wpc-filter-layout-dropdown):not(.wpc-filter-terms-count-0) .wpc-filter-content:not(.wpc-filter-has-hierarchy) ul.wpc-filters-ul-list {
    max-height: initial !important;
    overflow: initial !important;
}

body .wpc-filters-main-wrap .wpc-term-item-content-wrapper input[type="checkbox"] {
    margin-top: 6px !important;
}

body .wpc-filters-main-wrap .wpc-term-item-content-wrapper {
    align-items: flex-start;
}

.wpc-filter-title::after {
    content: "" !important;
    /* position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important; */
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEwIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik05IDEuNUw1IDUuNUwxIDEuNSIgc3Ryb2tlPSIjMTgxNzE2IiBzdHJva2Utd2lkdGg9IjEuMjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4=);
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease !important;
    margin-left: 10px;
}

.wpc-filters-section.open .wpc-filter-title::after {
    transform: rotate(180deg) !important;
}

.widget_wpc_filters_widget {
    width: 100%;
}

.wpc-horizontal-layout .wpc-filters-section:not(.wpc-filter-layout-submit-button),
.wpc-horizontal-layout.wpc-horizontal-cols-3 .wpc-filters-section:not(.wpc-filter-layout-submit-button) {
    max-width: initial !important;
    width: initial !important;
    width: initial !important;
    margin-right: 0 !important;
}

.wpc-term-item-content-wrapper {
    display: flex;
    align-items: center;
    /* padding: 16px 0; */
    /* border-bottom: 1px solid #e0e0e0; */
    position: relative;
}

/* Keep input accessible but hidden visually */
.wpc-term-item-content-wrapper input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 5px;
    cursor: pointer;
    opacity: 0;
}

/* Label styling with custom checkbox */
.wpc-term-item-content-wrapper label {
    position: relative;
    padding-left: 32px;
}

/* Draw the box */
.wpc-term-item-content-wrapper label::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 0;
    width: 16px;
    height: 16px;
    display: inline-block;

    /* Optional: background icon */
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMC43NSIgeT0iMS4yNSIgd2lkdGg9IjE0LjUiIGhlaWdodD0iMTQuNSIgc3Ryb2tlPSIjMTgxNzE2IiBzdHJva2Utd2lkdGg9IjEuNSIvPgo8L3N2Zz4=');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-size: 14px 14px;
}

/* Draw checkmark (when checked) */
.wpc-term-item-content-wrapper input[type="checkbox"]:checked+label::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 0;
    width: 16px;
    height: 16px;

    /* Replace with your checkmark image */
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzU3MjhfNDM1OTkpIj4KPHBhdGggZD0iTTEyLjI0MDIgNS41TDYuNzQwMjMgMTEuNUw0LjI0MDIzIDguNzcyNzMiIHN0cm9rZT0iIzE4MTcxNiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8cmVjdCB4PSIwLjc1IiB5PSIxLjI1IiB3aWR0aD0iMTQuNSIgaGVpZ2h0PSIxNC41IiBzdHJva2U9IiMxODE3MTYiIHN0cm9rZS13aWR0aD0iMS41Ii8+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzU3MjhfNDM1OTkiPgo8cmVjdCB5PSIwLjUiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
}

.wpc-filters-main-wrap li.wpc-term-item a {
    margin-right: 0 !important;
}


@media (min-width: 769px) {
    body .wpc-filters-main-wrap li.wpc-term-item {
        padding: 10px 14px !important;
        margin-bottom: 0 !important;
    }

    body .wpc-filters-main-wrap li.wpc-term-item:hover {
        background-color: #F0F0F0 !important;
    }

    .wpc-filters-main-wrap ul.wpc-filters-ul-list {
        padding: 0 !important;
    }
}

@media (max-width: 768px) {
    .wpc-filters-widget-content {
        /* position: fixed; */
        /* bottom: 0;
        left: 0;
        right: 0;
        top: 0; */
        background: #FFF;
        z-index: 99999;
        padding-top: 10px;
        padding-bottom: 10px;
        max-height: 100%;
        height: auto !important;
        overflow-y: auto;
        /* transform: translateX(100%) !important; */
        max-height: 0;
        opacity: 0 !important;
        transition: max-height 0.5s ease;
        /* display: block !important; */
        /* display: none; */
        /* width: calc(100% - 40px);
        max-width: 400px; */
    }

    .wpc-filters-widget-content.slide-in,
    .wpc-filters-widget-content.wpc-opened {
        /* transform: translateX(0) !important; */
        opacity: 1 !important;
        max-height: 1000000px;
    }

    .wpc-filters-open-button-container {
        border-top: 1px solid rgba(123, 123, 123, 0.35) !important;
        border-bottom: 1px solid rgba(123, 123, 123, 0.35) !important;
        margin-left: -16px !important;
        margin-right: -16px !important;
        padding: 0 16px !important;
    }

    body .wpc-filters-open-button-container a.wpc-filters-open-widget,
    body .wpc-filters-open-button-container a.wpc-open-close-filters-button {
        padding: 15px 16px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        border-color: transparent !important;

    }

    .wpc-horizontal-layout .wpc-filters-widget-wrapper {
        display: block;
    }

    body .wpc-filters-open-button-container a.wpc-open-close-filters-button.wpc-opened {
        /* padding: 16px !important;
        font-size: 24px !important;
        font-weight: 300 !important;
        line-height: 1.5 !important; */
        /* border-bottom: 1px solid rgba(123, 123, 123, 0.35) !important; */
        /* font-family: "Merriweather", Sans-serif !important; */
    }

    .wpc-open-close-filters-button .wpc-button-inner {
        flex-direction: row-reverse !important;
        justify-content: space-between !important;
    }

    .wpc-open-close-filters-button .wpc-button-inner .wpc-icon-html-wrapper {
        margin-right: 0 !important;
    }

    body .wpc-filters-open-button-container .wpc-open-close-filters-button.wpc-opened {
        /* position: fixed !important;
        top: 0;
        right: 0; */
        z-index: 1;
        left: 0;
        border: 0 !important;
        /* max-width: 400px;
        width: calc(100% - 40px) !important; */
    }

    .wpc-filters-section {
        border-bottom: 1px solid rgba(123, 123, 123, 0.35) !important;
    }

    .wpc-filters-section.open .wpc-filter-title,
    .wpc-filter-title:hover {
        border-color: transparent !important;
    }

    .wpc-filters-section .wpc-filter-content {
        position: initial !important;
    }

    .wpc-filters-section.open .wpc-filter-content {
        position: initial !important;
        border-color: transparent !important;
        box-shadow: none !important;
        min-width: 100% !important;
        padding-bottom: 20px !important;
    }

    .wpc-checkbox-item .wpc-term-item-content-wrapper {
        padding: 0;
        border-bottom: 20px !important;
    }

    body .wpc-filters-main-wrap li.wpc-term-item {
        padding: 0 16px 10px !important;
        margin-bottom: 10px !important;
    }

    body .wpc-filters-main-wrap li.wpc-term-item:last-child {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .wpc-filters-section.open .wpc-filter-content {
        padding-top: 0 !important;
    }

    .filter-news .wpc-filter-content .wpc-filters-ul-list .wpc-radio-item {
        padding-left: 0px !important;
        padding-bottom: 10px !important;
        margin-bottom: 0px !important;
        padding-right: 6% !important;
    }

    .filter-news .widget-title.wpc-filter-title {
        margin-bottom: 10px !important;
    }

    .filter-news .wpc-filter-content.wpc-filter-post_type {
        width: 74%;
    }

    .filter-news .wpc-filter-header {
        width: 26%;
    }

    .filter-news .wpc-filter-content .wpc-filters-ul-list .wpc-radio-item label {
        padding-left: 25px;
    }
}