/* Custom styling for book filter facet checkboxes with custom scrollbars */
.book-filter-options {
    max-height: 140px;
    overflow-y: auto;
    overscroll-behavior: auto;
}

.book-filter-options label {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.35;
    cursor: pointer;
}

.book-filter-options input[type="checkbox"],
.book-filter-options input[type="radio"] {
    flex: 0 0 auto;
    margin-right: 0.5rem;
}

.book-filter-options::-webkit-scrollbar {
    width: 6px;
}

.book-filter-options::-webkit-scrollbar-thumb {
    background-color: #ced4da;
    border-radius: 999px;
}

.book-filter-options::-webkit-scrollbar-track {
    background: transparent;
}

/* Ensure form preserves flex column in scrollable modal */
.modal-dialog-scrollable #filter-form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.modal-dialog-scrollable #filter-form .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#filter-section .modal-content {
    max-height: 90vh;
}

@media (max-width: 575.98px) {
    #filter-section .modal-dialog {
        margin: 0.5rem;
        max-height: calc(100% - 1rem);
    }
}
