/* Sticky sidebar for filters */
.sticky-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Algolia/Typesense search styling */
.ais-Hits-item {
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.ais-Hits-item:hover {
    background-color: rgba(84, 160, 183, 0.16);
}

.ais-Panel-header {
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.ais-Panel-collapseButton {
    z-index: 20;
    inset: 0;
    display: flex;
    flex-direction: row;
    justify-content: right;
}

.ais-ClearRefinements-button {
    background: rgba(84, 160, 183);
    transition: color 0.2s ease;
}

.ais-ClearRefinements .ais-ClearRefinements-button:hover {
    color: white;
}

.ais-CurrentRefinements-category .ais-CurrentRefinements-delete:hover {
    color: red;
}

.ais-ClearRefinements-button--disabled {
    visibility: hidden;
}

/* Mobile filter toggle button */
#filter-button {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    #refinements-section {
        margin-bottom: 1rem;
    }

    #refinements-section.d-none {
        display: none !important;
    }
}

@media (min-width: 768px) {
    #filter-button {
        display: none !important;
    }
}
