/* 
 * Chordia Jewels - WooCommerce Archive Side Filters 
 * 100% SVG ICON INTEGRATION (No Emojis)
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap');

/* ========== FILTER PLUGIN STYLES ========== */

.cj-archive-filters-container {
    background: #fff;
    padding: 0;
}

.cj-archive-filter-section {
    border-bottom: 1px solid #f2f2f2;
    padding: 20px 0 10px;
}

.cj-archive-section-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-style: italic !important;
    color: #444 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

/* gemstone */

.ui-slider.ui-widget-content .ui-slider-handle{border-radius: 100px !important;}
.cj-archive-sidebar .wpfMainWrapper .wpfFilterWrapper {
    border-bottom: solid 1px #e1dcdc !important;
    padding-bottom: 20px !important;
}
/* gemstone */

/* SVG Toggle Icons (+/-) */
.cj-archive-toggle {
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' class='bi bi-plus' viewBox='0 0 16 16'%3E%3Cpath d='M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z'/%3E%3C/svg%3E");
}

.cj-archive-filter-section.active .cj-archive-toggle {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' class='bi bi-dash' viewBox='0 0 16 16'%3E%3Cpath d='M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'/%3E%3C/svg%3E");
}

/* Checkbox Styling */
.cj-archive-list,
.cj-archive-list li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cj-archive-list li {
    padding: 8px 0 !important;
}

.cj-archive-list li::before,
.cj-archive-list li::after {
    content: none !important;
    display: none !important;
}

.cj-archive-list li label {
    display: flex !important;
    align-items: center !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    color: #555 !important;
    padding: 0 !important;
    cursor: pointer !important;
}

.cj-archive-list input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 19px;
    height: 19px;
    border: 1px solid #999;
    background: #fff;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
}

.cj-archive-list input[type="checkbox"]:checked {
    background: #111;
    border-color: #111;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' class='bi bi-check-lg' viewBox='0 0 16 16'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.037a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.42-6.446a.733.733 0 0 1 0-1.047z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.cj-archive-count {
    color: #888;
    margin-left: 5px;
    font-size: 14px;
    font-weight: 300;
}

/* Hide scrollbar */
.cj-archive-list {
    max-height: 280px !important;
    overflow-y: auto !important;
    padding-right: 0 !important;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cj-archive-list::-webkit-scrollbar {
    display: none;
}

/* ========== DESKTOP STYLES ========== */

.cj-mobile-filter-trigger {
    display: none;
}

/* Sidebar Header */
.cj-archive-sidebar-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cj-archive-sidebar-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin: 0 !important;
}

#cj-filter-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: color 0.2s ease;
}

#cj-filter-close:hover {
    color: #666;
}

#cj-filter-close svg {
    width: 24px;
    height: 24px;
}


/* ========== MOBILE/TABLET STYLES (max-width: 1024px) ========== */

@media (max-width: 1024px) {
    /* Show sidebar header */
    .cj-archive-sidebar-header {
        display: flex !important;
    }

    /* Filter trigger button */
    .cj-mobile-filter-trigger {
        display: block !important;
        margin-bottom: 20px;
    }

    #cj-filter-open {
        background: #111;
        color: #fff;
        border: none;
        padding: 8px 15px;
        text-transform: uppercase;
        font-family: 'Montserrat', sans-serif;
        font-size: 13px;
        letter-spacing: 1px;
        border-radius: 2px;
        cursor: pointer;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: background-color 0.2s ease;
    }

    #cj-filter-open:hover {
        background: #333;
    }

    #cj-filter-open svg {
        margin-top: -1px;
    }

    /* Sidebar Drawer */
    .cj-archive-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 320px !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 100000 !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        padding: 25px !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1) !important;
        overflow-y: auto !important;
        margin: 0 !important;
    }

    .cj-archive-sidebar.active {
        left: 0 !important;
    }

    .cj-archive-filters-container {
        padding: 0 !important;
        display: block !important;
    }

    /* Backdrop overlay */
    .cj-filter-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 99999 !important;
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
    }

    .cj-filter-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }

    /* Filter sections in drawer */
    .cj-archive-filter-section {
        border-bottom: 1px solid #f9f9f9 !important;
        padding: 15px 0 !important;
    }
}

/* ========== SMALL PHONES (max-width: 480px) ========== */

@media (max-width: 480px) {
    .cj-archive-sidebar {
        width: 100% !important;
    }
}

/* Prevent body scroll when drawer is open */
body.cj-drawer-open {
    overflow: hidden !important;
}