/* 09/10/25 SIDEBAR WITH FILTERS - rfpdesign match, scoped, desktop + tablet + mobile */

.categories-section .categories-filter-sidebar.rfp-sb {
    border: 2px solid #907DFC;
    background: #fff;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    padding: 20px 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__hr,
.categories-section .categories-filter-sidebar.rfp-sb hr {
    margin: 0;
    border: none;
    border-top: 1px solid #D9CFFF;
    color: #4530BA;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__applied,
.categories-section .categories-filter-sidebar.rfp-sb .applied-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0;
    min-height: 36px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__applied .badge,
.categories-section .categories-filter-sidebar.rfp-sb .applied-filters .badge,
.categories-section .categories-filter-sidebar.rfp-sb .applied-filters .badge.badge-bg {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    background: #D9CFFF;
    color: #000;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__header,
.categories-section .categories-filter-sidebar.rfp-sb .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    margin: 0 0 10px 0;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__title,
.categories-section .categories-filter-sidebar.rfp-sb .sidebar-header h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #4530BA;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__close,
.categories-section .categories-filter-sidebar.rfp-sb .sidebar-header .close-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: #000;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__close:hover,
.categories-section .categories-filter-sidebar.rfp-sb .sidebar-header .close-btn:hover {
    color: #333;
}

/* Change 1: Removed .rfp-sb__search / .search-filters rules */

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panels {
    border: none;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel {
    border-bottom: 1px solid #D9CFFF;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel:last-child {
    border-bottom: none;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel__head {
    display: block;
    width: 100%;
    text-align: left;
    color: #000;
    font-weight: 600;
    font-size: 0.9375rem;
    background: #fff;
    border: none;
    padding: 12px 10px;
    padding-right: 28px;
    cursor: pointer;
    position: relative;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel__head:hover {
    color: #000;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel__head:focus,
.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel__head:focus-visible {
    outline: none;
    box-shadow: none;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel__head::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.2s ease;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel.is-open .rfp-sb-panel__head::after {
    transform: translateY(-50%) rotate(180deg);
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel__body {
    padding: 10px;
    overflow: hidden;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-panel:not(.is-open) .rfp-sb-panel__body {
    display: none;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-daterange,
.categories-section .categories-filter-sidebar.rfp-sb .date-range-filters {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}

.categories-section .categories-filter-sidebar.rfp-sb .date-range-filters .date-input-box {
    flex: 1;
    min-width: 0;
}

.categories-section .categories-filter-sidebar.rfp-sb .date-range-filters .date-range-input,
.categories-section .categories-filter-sidebar.rfp-sb .date-range-filters input[type="date"] {
    width: 100%;
    border: 1.5px solid #D9CFFF;
    border-radius: 10px;
    padding: 8px;
    font-size: 0.875rem;
    color: #333;
    outline: none;
    background: #fff;
    box-sizing: border-box;
}

.categories-section .categories-filter-sidebar.rfp-sb .date-range-filters .date-range-input:focus,
.categories-section .categories-filter-sidebar.rfp-sb .date-range-filters .date-range-input:focus-visible {
    border-color: #4530BA;
    outline: none;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-daterange__to,
.categories-section .categories-filter-sidebar.rfp-sb .date-range-filters .to {
    font-weight: 600;
    color: #000;
    font-size: 0.875rem;
    white-space: nowrap;
    margin: 0 5px;
    flex-shrink: 0;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__search-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #4530BA;
    margin-bottom: 10px;
    padding: 5px 10px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__search-inner .rfp-sb__search-icon {
    color: #4530BA;
    font-size: 1rem;
    margin-right: 8px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__search-inner .rfp-sb__search-input {
    flex: 1;
    border: none;
    padding: 5px 10px;
    font-size: 0.875rem;
    background: transparent;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__search-inner .rfp-sb__search-input:focus,
.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__search-inner .rfp-sb__search-input:focus-visible {
    outline: none;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 186px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list::-webkit-scrollbar {
    width: 6px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list::-webkit-scrollbar-thumb {
    background: #D9CFFF;
    border-radius: 3px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list::-webkit-scrollbar-thumb:hover {
    background: #907DFC;
}

@supports (scrollbar-width: thin) {
    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list {
        scrollbar-width: thin;
        scrollbar-color: #D9CFFF #f0f0f0;
    }
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list__row[hidden] {
    display: none !important;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-check__input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid #4530BA;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    cursor: pointer;
    vertical-align: middle;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-check__input:checked {
    background: #4530BA;
    border-color: #4530BA;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='%23fff' d='M4 8L0 4l1.5-1.5L4 5 10.5-1.5 12 0 4 8z'/%3E%3C/svg%3E");
    background-size: 10px 8px;
    background-position: center;
    background-repeat: no-repeat;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-check__input:focus,
.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-check__input:focus-visible {
    outline: none;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-check__label {
    font-size: 0.875rem;
    color: #000;
    font-weight: 500;
    cursor: pointer;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__apply,
.categories-section .categories-filter-sidebar.rfp-sb .mobile-apply-btn {
    padding: 16px 10px;
    border-top: 1px solid #D9CFFF;
    background: #fafafa;
    margin-top: 10px;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__apply .apply-filter-btn,
.categories-section .categories-filter-sidebar.rfp-sb .mobile-apply-btn .apply-filter-btn,
.categories-section .categories-filter-sidebar.rfp-sb .mobile-apply-btn #filter-apply {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #4530BA 0%, #6C32AD 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__apply .apply-filter-btn:hover,
.categories-section .categories-filter-sidebar.rfp-sb .mobile-apply-btn .apply-filter-btn:hover,
.categories-section .categories-filter-sidebar.rfp-sb .mobile-apply-btn #filter-apply:hover {
    opacity: 0.9;
    color: #fff;
}

.categories-section .mobile-top-sticky-filter,
.categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__header,
.categories-section .sidebar-header {
    display: none;
}

@media (min-width: 1024px) {
    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list {
        max-height: 186px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list {
        max-height: 160px;
    }
}

@media (max-width: 767px) {
    /* Change 3: Override responsive.css – sidebar column visible for overlay when Filter opens */
    .categories-section .mobile_view_category_section {
        display: block !important;
        position: absolute;
        width: 0;
        height: 0;
        overflow: visible;
        margin: 0;
        padding: 0;
        z-index: 999;
    }
    .categories-section .mobile-top-sticky-filter {
        display: block !important;
        position: sticky;
        top: 130px;
        background: #fff;
        padding: 10px;
        z-index: 997;
        border-bottom: 1px solid #D9CFFF;
    }

    .categories-section .filter-btn {
        display: flex;
        align-items: center;
        background: #4530BA;
        border-radius: 10px;
    }

    .categories-section .filter-btn button {
        flex: 1;
        background: #4530BA;
        color: #fff;
        border: none;
        padding: 10px 15px;
        font-size: 0.875rem;
        font-weight: 600;
    }

    .categories-section .filter-btn button:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

    .categories-section .filter-btn .dropdown {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
        flex: 1;
    }

    .categories-section .filter-btn .dropdown button {
        width: 100%;
    }

    .categories-section .categories-filter-sidebar.rfp-sb {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 100%;
        height: 100%;
        background: #fff;
        overflow-y: auto;
        overflow-x: hidden;
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 15px;
        margin-bottom: 0;
        -webkit-overflow-scrolling: touch;
    }

    .categories-section .categories-filter-sidebar.rfp-sb.active {
        right: 0;
    }

    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__header,
    .categories-section .categories-filter-sidebar.rfp-sb .sidebar-header,
    .categories-section .sidebar-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        margin: 0 0 10px 0;
        padding: 0 10px 10px 10px;
    }

    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__apply,
    .categories-section .mobile-apply-btn {
        display: block !important;
        position: sticky;
        bottom: 0;
        width: 100%;
        left: 0;
        right: 0;
    }

    .categories-section .mobile-apply-btn button,
    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__apply .apply-filter-btn {
        width: 100%;
        background: #4530BA;
        color: #fff;
        border: none;
        padding: 10px 15px;
        border-radius: 15px;
        font-size: 1rem;
        font-weight: 600;
    }

    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb__close,
    .categories-section .sidebar-header .close-btn {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #000;
    }

    .categories-section .categories-filter-sidebar.rfp-sb .rfp-sb-list {
        max-height: 140px;
    }
}

.categories-section .categories-sidebar {
    display: block;
}
